Make an alternate version of this Makefile that can be used in an
authorReid Spencer <rspencer@reidspencer.com>
Wed, 8 Dec 2004 04:43:40 +0000 (04:43 +0000)
committerReid Spencer <rspencer@reidspencer.com>
Wed, 8 Dec 2004 04:43:40 +0000 (04:43 +0000)
unconfigured tree for rebuilding the html files from POD sources for the
website update on cvs commit.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@18616 91177308-0d34-0410-b5e6-96231b3b80d8

docs/CommandGuide/Makefile

index 5b1afa9aa8a3ec5c457b3b79ca4b4f7d36d4750c..ee5834cda7d60c8c128ab17087decd8d0bba6e88 100644 (file)
@@ -7,6 +7,24 @@
 # 
 ##===----------------------------------------------------------------------===##
 
+ifdef BUILD_FOR_WEBSITE
+# This special case is for keeping the CommandGuide on the LLVM web site
+# up to date automatically as the documents are checked in. It must build
+# the POD files to HTML only and keep them in the src directories. It must also
+# build in an unconfigured tree, hence the ifdef. To use this, run
+# make -s BUILD_FOR_WEBSITE=1 inside the cvs commit script.
+
+POD  := $(wildcard *.pod)
+HTML := $(patsubst %.pod,html/%.html, $(POD))
+
+all: $(HTML)
+
+html/%.html : %.pod
+       pod2html --css=manpage.css --htmlroot=. --podpath=. \
+         --noindex --infile=$< --outfile=$@ --title=$*
+
+else 
+
 LEVEL := ../..
 
 include $(LEVEL)/Makefile.common
@@ -62,3 +80,5 @@ uninstall-local::
 printvars::
        $(Echo) "POD            : " '$(POD)'
        $(Echo) "HTML           : " '$(HTML)'
+
+endif