[llvm-commits] CVS: llvm/docs/CommandGuide/Makefile

Reid Spencer reid at x10sys.com
Sun Nov 28 19:45:13 PST 2004



Changes in directory llvm/docs/CommandGuide:

Makefile updated: 1.4 -> 1.5
---
Log message:

* Adjust so this falls in line with LLVM Makefile standards.
* Implement installation of doxygen and html documentation
* Fix it so it works with objdir != srcdir.


---
Diffs of the changes:  (+48 -11)

Index: llvm/docs/CommandGuide/Makefile
diff -u llvm/docs/CommandGuide/Makefile:1.4 llvm/docs/CommandGuide/Makefile:1.5
--- llvm/docs/CommandGuide/Makefile:1.4	Mon Nov 15 14:06:11 2004
+++ llvm/docs/CommandGuide/Makefile	Sun Nov 28 21:45:02 2004
@@ -1,23 +1,60 @@
-POD = $(wildcard *.pod)
-HTML = $(patsubst %.pod, html/%.html, $(POD))
-MAN = $(patsubst %.pod, man/man1/%.1, $(POD))
-PS = $(patsubst %.pod, ps/%.ps, $(POD))
+##===- docs/CommandGuide/Makefile --------------------------*- Makefile -*-===##
+# 
+#                     The LLVM Compiler Infrastructure
+#
+# This file was developed by the LLVM research group and is distributed under
+# the University of Illinois Open Source License. See LICENSE.TXT for details.
+# 
+##===----------------------------------------------------------------------===##
 
-all: $(HTML) $(MAN) $(PS)
+LEVEL := ../..
+
+include $(LEVEL)/Makefile.common
+
+POD := $(wildcard $(BUILD_SRC_DIR)/*.pod)
+
+EXTRA_DIST := $(POD) index.html
+
+HTML = $(patsubst $(BUILD_SRC_DIR)/%.pod, html/%.html, $(POD))
+MAN = $(patsubst $(BUILD_SRC_DIR)/%.pod, man/man1/%.1, $(POD))
+PS = $(patsubst $(BUILD_SRC_DIR)/%.pod, ps/%.ps, $(POD))
+
+all-local:: $(HTML) $(MAN) $(PS)
 
 .SUFFIXES:
 .SUFFIXES: .html .pod .1 .ps
 
+$(HTML) : html/.dir man/.dir man/man1/.dir ps/.dir
+
 html/%.html: %.pod
-	pod2html --css=manpage.css --htmlroot=. \
-		--podpath=. --noindex --infile=$< --outfile=$@
+	$(POD2HTML) --css=manpage.css --htmlroot=. --podpath=. \
+	  --noindex --infile=$< --outfile=$@ --title=$*
 
 man/man1/%.1: %.pod
-	pod2man --release=1.4 --center="LLVM Command Guide" $< $@
+	$(POD2MAN) --release=$(PACKAGE_VERSION) \
+	  --center="LLVM Command Guide" $< $@
 
 ps/%.ps: man/man1/%.1
-	groff -Tps -man $< > $@
+	$(GROFF) -Tps -man $< > $@
 
-clean:
-	rm -f pod2htm*.*~~ $(HTML) $(MAN) $(PS)
+clean-local::
+	$(Verb) $(RM) -f pod2htm*.*~~ $(HTML) $(MAN) $(PS)
 
+install-local:: $(HTML) $(MAN) $(PS)
+	$(Echo) Installing HTML CommandGuide Documentation
+	$(Verb) $(INSTALL) -d $(LLVM_DOCSDIR)/html/CommandGuide
+	$(Verb) $(INSTALL) -C $(HTML) $(LLVM_DOCSDIR)/html/CommandGuide
+	$(Echo) Installing MAN CommandGuide Documentation
+	$(Verb) $(INSTALL) -d $(LLVM_MANDIR)/man1
+	$(Verb) $(INSTALL) -C $(MAN) $(LLVM_MANDIR)/man1
+	$(Echo) Installing PS CommandGuide Documentation
+	$(Verb) $(INSTALL) -d $(LLVM_DOCSDIR)/ps
+	$(Verb) $(INSTALL) -C $(PS) $(LLVM_DOCSDIR)/ps
+
+uninstall-local::
+	$(Echo) Uninstalling Documentation
+	$(Verb) $(RM) -rf $(LLVM_DOCSDIR)
+
+printvars::
+	$(Echo) "POD            : " '$(POD)'
+	$(Echo) "HTML           : " '$(HTML)'






More information about the llvm-commits mailing list