diff options
author | P. J. McDermott <pjm@nac.net> | 2013-05-08 13:29:17 (EDT) |
---|---|---|
committer | P. J. McDermott <pjm@nac.net> | 2013-05-08 13:29:17 (EDT) |
commit | 1e64742211ab37a98f57d5fdd25e26542a7ef2a7 (patch) | |
tree | 71b8da4cc3fc161f5e8d137f3c237ec3916b2f35 /Makefile.in | |
parent | dfbd13cb7e81506c6d9237f5f4b4ab973f6a006a (diff) |
Move code from man/local.mk to Makefile.in.
Diffstat (limited to 'Makefile.in')
-rw-r--r-- | Makefile.in | 23 |
1 files changed, 20 insertions, 3 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) |