summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Makefile.in23
-rw-r--r--man/local.mk26
2 files changed, 21 insertions, 28 deletions
diff --git a/Makefile.in b/Makefile.in
index 797ed2d..ac35fc3 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -52,7 +52,7 @@ include $(srcdir)/locale/local.mk
bin = $(bin_srcs:.sh=)
pkglib = $(pkglib_srcs:.sh=.sm)
pkglibbuildsystem = $(pkglibbuildsystem_srcs:.sh=.sm)
-man1 = $(man_man1)
+man1 = $(man1_srcs:.1in=.1)
locale = $(locale_locale)
distdir = $(package_name)-$(package_version)
@@ -67,22 +67,24 @@ distfiles = \
TODO \
src/local.mk \
lib/local.mk \
+ man/local.mk \
$(bin_srcs) \
$(pkglib_srcs) \
$(pkglibbuildsystem_srcs) \
- $(man_distfiles) \
+ $(man1_srcs) \
$(locale_distfiles)
# FIXME: libopkhelper is deprecated. Migrate code and remove this variable.
script = \
s&@@PACKAGE_NAME@@&$(package_name)&;\
s&@@PACKAGE_VERSION@@&$(package_version)&;\
+ s&@@PACKAGE_DESCRIPTION@@&$(package_description)&;\
s&@@PKGLIBDIR@@&$(pkglibdir)&;\
s&@@LIBOPKHELPER@@&$(libopkhelper)&;\
s&@@LOCALEDIR@@&$(localedir)&;\
s&@@SH@@&$(sh)&;
-.SUFFIXES: .sh .sm
+.SUFFIXES: .sh .sm .1in .1
.sh:
@printf ' SED %s\n' '$*'
@@ -92,6 +94,21 @@ script = \
@printf ' SED %s\n' '$*.sm'
@sed '$(script)' '$(srcdir)/$*.sh' >'$*.sm'
+.1in.1:
+ @printf ' SED %s\n' '$*.1'
+ @abmon='Nul Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec '; \
+ date=$$(LC_TIME=POSIX ls -l '$(srcdir)/$*.1in' | sed 's/ / /g' | \
+ cut -d ' ' -f 6-8); \
+ md="$${date% *}"; \
+ m="$$(echo $${abmon% $${md% *} *} | wc -w)"; \
+ d="$${md#* }"; \
+ [ $${m} -lt 10 ] && m="0$${m}"; \
+ [ $${d} -lt 10 ] && d="0$${d}"; \
+ y="$${date##* }"; \
+ [ "$${y%:*}" != "$${y}" ] && y=$$(date '+%Y'); \
+ sed "$(script) s&@@DATE@@&$${y}-$${m}-$${d}&;" \
+ '$(srcdir)/$*.1in' >'$*.1'
+
all: all-exec all-data
all-exec: all-bin all-pkglib all-pkglibbuildsystem
all-bin: $(bin)
diff --git a/man/local.mk b/man/local.mk
index 2035e8a..808e325 100644
--- a/man/local.mk
+++ b/man/local.mk
@@ -16,7 +16,7 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-man_srcs1 = \
+man1_srcs = \
man/oh-installfiles.1in \
man/oh-strip.1in \
man/oh-fixperms.1in \
@@ -26,27 +26,3 @@ man_srcs1 = \
man/oh-autotest.1in \
man/oh-autoinstall.1in \
man/oh-architecture.1in
-man_man1 = $(man_srcs1:.1in=.1)
-man_distfiles = man/local.mk $(man_srcs1)
-
-man_script = \
- s&@@PACKAGE_NAME@@&$(package_name)&;\
- s&@@PACKAGE_VERSION@@&$(package_version)&;\
- s&@@PACKAGE_DESCRIPTION@@&$(package_description)&;
-
-.SUFFIXES: .1in .1
-
-.1in.1:
- @printf ' SED %s\n' '$*.1'
- @abmon='Nul Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec '; \
- date=$$(LC_TIME=POSIX ls -l '$(srcdir)/$*.1in' | sed 's/ / /g' | \
- cut -d ' ' -f 6-8); \
- md="$${date% *}"; \
- m="$$(echo $${abmon% $${md% *} *} | wc -w)"; \
- d="$${md#* }"; \
- [ $${m} -lt 10 ] && m="0$${m}"; \
- [ $${d} -lt 10 ] && d="0$${d}"; \
- y="$${date##* }"; \
- [ "$${y%:*}" != "$${y}" ] && y=$$(date '+%Y'); \
- sed "$(man_script) s&@@DATE@@&$${y}-$${m}-$${d}&;" \
- '$(srcdir)/$*.1in' >'$*.1'