summaryrefslogtreecommitdiffstats
path: root/doc/Makefile.am
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--doc/Makefile.am32
1 files changed, 32 insertions, 0 deletions
diff --git a/doc/Makefile.am b/doc/Makefile.am
new file mode 100644
index 0000000..4a78589
--- /dev/null
+++ b/doc/Makefile.am
@@ -0,0 +1,32 @@
+MAGIC = $(pkgdatadir)/magic
+if FSECT5
+man_MAGIC = magic.5
+else
+man_MAGIC = magic.4
+endif
+fsect = @fsect@
+man_MANS = file.1 $(man_MAGIC) libmagic.3
+
+EXTRA_DIST = file.man magic.man libmagic.man
+CLEANFILES = $(man_MANS)
+
+file.1: Makefile file.man
+ @rm -f $@
+ sed -e s@__CSECTION__@1@g \
+ -e s@__FSECTION__@${fsect}@g \
+ -e s@__VERSION__@${VERSION}@g \
+ -e s@__MAGIC__@${MAGIC}@g $(srcdir)/file.man > $@
+
+magic.${fsect}: Makefile magic.man
+ @rm -f $@
+ sed -e s@__CSECTION__@1@g \
+ -e s@__FSECTION__@${fsect}@g \
+ -e s@__VERSION__@${VERSION}@g \
+ -e s@__MAGIC__@${MAGIC}@g $(srcdir)/magic.man > $@
+
+libmagic.3: Makefile libmagic.man
+ @rm -f $@
+ sed -e s@__CSECTION__@1@g \
+ -e s@__FSECTION__@${fsect}@g \
+ -e s@__VERSION__@${VERSION}@g \
+ -e s@__MAGIC__@${MAGIC}@g $(srcdir)/libmagic.man > $@