summaryrefslogtreecommitdiff
path: root/man/Makefile.am
diff options
context:
space:
mode:
Diffstat (limited to 'man/Makefile.am')
-rw-r--r--man/Makefile.am14
1 files changed, 14 insertions, 0 deletions
diff --git a/man/Makefile.am b/man/Makefile.am
new file mode 100644
index 0000000..b54b78c
--- /dev/null
+++ b/man/Makefile.am
@@ -0,0 +1,14 @@
+man_MANS = inotifywait.1 inotifywatch.1
+EXTRA_DIST = $(man_MANS)
+
+dist-hook:
+ # Custom man page preprocessing! Yippee!!!
+ PACKAGE_VERSION=`sed -n -r -e 's|AC_INIT\(.+, \[(.+)\], .+\)|\1|p' \
+ $(top_distdir)/configure.ac`; \
+ DATE=`date +'%B %d, %Y'`; \
+ for file in $(man_MANS); do \
+ sed -r -i -e "s|_PACKAGE_VERSION_|$${PACKAGE_VERSION}|g" \
+ -e "s|_DATE_|$${DATE}|g" $(distdir)/$${file}; \
+ done
+ touch -d '2 days ago' $(distdir)/*
+