X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=docs%2Fman%2FMakefile;h=e4e0c33f04a7f2c509a05f0f1b16a19264f0f9ec;hb=9060e51e4773bdff1829d17e3f7c42edb910d805;hp=047a348d20739bce94bed6dd36d40db03b68123c;hpb=4217c6caef9f6d261df1449c590331878a493f14;p=ghc-hetmet.git diff --git a/docs/man/Makefile b/docs/man/Makefile index 047a348..e4e0c33 100644 --- a/docs/man/Makefile +++ b/docs/man/Makefile @@ -1,6 +1,8 @@ TOP = ../.. include $(TOP)/mk/boilerplate.mk +ifneq "$(strip $(XSLTPROC))" "" + # The commands which should be mentioned in the man page GHC_COMMANDS = ghc ghci @@ -14,12 +16,14 @@ CLEAN_FILES += $(MAN_PAGE).$(MAN_SECTION) flags.xsl flags.xml ifneq "$(DOING_BIN_DIST)" "YES" +all:: $(MAN_PAGE).$(MAN_SECTION) + $(MAN_PAGE).$(MAN_SECTION): flags.xsl flags.xml $(XSLTPROC) $(XSLTPROC_OPTS) flags.xsl flags.xml > $@ # Insert the commands and the library directory into the man page flags.xsl: gen_flags.xsl.pl - perl gen_flags.xsl.pl "$(GHC_COMMANDS)" "$(libdir)" > $@ + $(PERL) gen_flags.xsl.pl "$(GHC_COMMANDS)" "$(libdir)" > $@ # Re-use the flags documentation from the user's guide by injecting some # entities after the XML declaration to make it a stand-alone document. @@ -29,7 +33,8 @@ flags.xml: ../users_guide/flags.xml echo " \ \ ]>" >> $@ - tail -n +2 $< >> $@ + # "sed 1d" == "tail -n +2", but Solaris apparently rejects the latter + sed 1d $< >> $@ endif @@ -38,9 +43,9 @@ install-docs:: $(MAN_PAGE).$(MAN_SECTION) $(INSTALL_DIR) $(DESTDIR)$(mandir)/man$(MAN_SECTION) $(INSTALL_MAN) $(INSTALL_OPTS) $(MAN_PAGE).$(MAN_SECTION) $(DESTDIR)$(mandir)/man$(MAN_SECTION) -binary-dist:: $(MAN_PAGE).$(MAN_SECTION) - $(MKDIRHIER) $(BIN_DIST_DIR)/docs/man - cp Makefile $(BIN_DIST_DIR)/docs/man/ - cp $(MAN_PAGE).$(MAN_SECTION) $(BIN_DIST_DIR)/docs/man/ +endif + +BINDIST_EXTRAS += $(MAN_PAGE).$(MAN_SECTION) +include $(TOP)/mk/bindist.mk include $(TOP)/mk/target.mk