Reworked the man page system and some man page contents (mmh-intro).
[mmh] / man / Makefile.in
index e4add41..de3c254 100644 (file)
@@ -19,6 +19,7 @@ etcdir      = @sysconfdir@
 mandir      = @mandir@
 manext1     = 1
 manext5     = 5
+manext7     = 7
 manext8     = 8
 
 mailspool    = @mailspool@
@@ -31,54 +32,62 @@ SED = sed
 SEDMAN = $(SED) -f man.sed $< > $@
 
 .SUFFIXES:
-.SUFFIXES: .man .$(manext1) .$(manext5) .$(manext8)
+.SUFFIXES: .man1 .man5 .man7 .man8 \
+       .$(manext1) .$(manext5) .$(manext7) .$(manext8)
 
-.man.$(manext1):
+.man1.$(manext1):
        $(SEDMAN)
 
-.man.$(manext5):
+.man5.$(manext5):
        $(SEDMAN)
 
-.man.$(manext8):
+.man7.$(manext7):
+       $(SEDMAN)
+
+.man8.$(manext8):
        $(SEDMAN)
 
 # man pages to install in $(mandir)/$(manext1)
 MAN1SRC = ali. anno. burst. comp. dist. flist. flists. folder. folders.    \
-       forw. inc. mark. mh-chart. nmh. mhbuild. mhl. mhlist.   \
+       forw. inc. mark. mh-chart. mhbuild. mhl. mhlist. mmh.               \
        mhmail. mhparam. mhpath. mhshow. mhstore. msgchk. new. fnext.       \
        fprev. unseen. next. packf. pick. prev. prompter. rcvdist. rcvpack. \
        rcvstore. rcvtty. refile. repl. rmf. rmm. scan. send. sendfiles.    \
        show. slocal. sortm. whatnow.
 
-MAN5SRC = mh-alias. mh-draft. mh-format. mh-mail. mh-profile. mh-sequence. \
-       mh-tailor. mts.conf.
+MAN5SRC = mh-alias. mh-format. mh-mail. mh-profile. mh-tailor. mts.conf.
 
-MAN8SRC = ap. conflict. dp. fmtdump. mmh. post.
+MAN7SRC = mmh-intro. mh-draft. mh-sequence. 
+
+MAN8SRC = ap. conflict. dp. fmtdump. post.
 
 MAN1 = $(MAN1SRC:.=.$(manext1))
 MAN5 = $(MAN5SRC:.=.$(manext5))
+MAN7 = $(MAN7SRC:.=.$(manext7))
 MAN8 = $(MAN8SRC:.=.$(manext8))
 
 # source for man pages
-DIST_MANSRC = $(MAN1SRC) $(MAN5SRC) $(MAN8SRC)
-DIST_MAN = $(DIST_MANSRC:.=.man)
+DIST_MAN1 = $(MAN1SRC:.=.man1)
+DIST_MAN5 = $(MAN5SRC:.=.man5)
+DIST_MAN7 = $(MAN7SRC:.=.man7)
+DIST_MAN8 = $(MAN8SRC:.=.man8)
 
 # auxiliary files
 AUX = Makefile.in
 
 # all files in this directory included in the distribution
-DIST = $(DIST_MAN) $(AUX)
+DIST = $(DIST_MAN1) $(DIST_MAN5) $(DIST_MAN7) $(DIST_MAN8) $(AUX)
 
 # ========= DEFAULT TARGET ==========
 
-all: $(MAN1) $(MAN5) $(MAN8)
+all: $(MAN1) $(MAN5) $(MAN7) $(MAN8)
 
-$(MAN1) $(MAN5) $(MAN8): man.sed
+$(MAN1) $(MAN5) $(MAN7) $(MAN8): man.sed
 
 # create the sed file for building man pages
 man.sed: Makefile
        echo 's,%nmhwarning%,THIS FILE HAS BEEN AUTOMATICALLY GENERATED.  DO NOT EDIT.,g' > $@
-       echo 's,%nmhversion%,nmh-$(VERSION),g' >> $@
+       echo 's,%nmhversion%,mmh-$(VERSION),g' >> $@
        echo 's,%nmhdate%,$(DATE),g' >> $@
        echo 's,%bindir%,$(bindir),g' >> $@
        echo 's,%etcdir%,$(etcdir),g' >> $@
@@ -88,6 +97,7 @@ man.sed: Makefile
        echo 's,%sendmailpath%,$(sendmailpath),g' >> $@
        echo 's,%manext1%,$(manext1),g' >> $@
        echo 's,%manext5%,$(manext5),g' >> $@
+       echo 's,%manext7%,$(manext7),g' >> $@
        echo 's,%manext8%,$(manext8),g' >> $@
        echo '/%components%/r $(top_srcdir)/etc/components' >> $@
        echo ' s,%components%,,g' >> $@
@@ -104,7 +114,7 @@ man.sed: Makefile
 
 # ========= INSTALL TARGETS =========
 
-install: install-man1 install-man5 install-man8
+install: install-man1 install-man5 install-man7 install-man8
 
 # install the man pages in man1
 install-man1:
@@ -119,10 +129,13 @@ install-man5:
        for file in $(MAN5); do \
          $(INSTALL_DATA) $$file $(DESTDIR)$(mandir)/man$(manext5) ; \
        done
-       if [ ! -f $(DESTDIR)$(mandir)/man$(manext5)/mh_profile.$(manext5) ] ; then \
-         ( cd $(DESTDIR)$(mandir)/man$(manext5) ; ln mh-profile.$(manext5) \
-            mh_profile.$(manext5) ) \
-       fi
+
+# install the man pages in man7
+install-man7:
+       $(top_srcdir)/mkinstalldirs $(DESTDIR)$(mandir)/man$(manext7)
+       for file in $(MAN7); do \
+         $(INSTALL_DATA) $$file $(DESTDIR)$(mandir)/man$(manext7) ; \
+       done
 
 # install the man pages in man8
 install-man8:
@@ -147,6 +160,12 @@ uninstall-man5:
          rm -f $(DESTDIR)$(mandir)/man$(manext5)/$$file; \
        done
 
+# uninstall the man pages in man7
+uninstall-man7:
+       for file in $(MAN7); do \
+         rm -f $(DESTDIR)$(mandir)/man$(manext7)/$$file; \
+       done
+
 # uninstall the man pages in man8
 uninstall-man8:
        for file in $(MAN8); do \
@@ -159,7 +178,7 @@ mostlyclean:
        rm -f *~
 
 clean: mostlyclean
-       rm -f man.sed *.$(manext1) *.$(manext5) *.$(manext8)
+       rm -f man.sed *.$(manext1) *.$(manext5) *.$(manext7) *.$(manext8)
 
 distclean: clean
        rm -f Makefile