2004-11-29 03:45:02 +00:00
|
|
|
##===- 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.
|
|
|
|
#
|
|
|
|
##===----------------------------------------------------------------------===##
|
2004-05-14 19:50:33 +00:00
|
|
|
|
2004-12-08 04:43:40 +00:00
|
|
|
ifdef BUILD_FOR_WEBSITE
|
2004-12-08 19:01:01 +00:00
|
|
|
|
2004-12-08 04:43:40 +00:00
|
|
|
# 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)
|
2004-12-08 19:01:01 +00:00
|
|
|
HTML := $(patsubst %.pod, html/%.html, $(POD))
|
|
|
|
MAN := $(patsubst %.pod, man/man1/%.1, $(POD))
|
|
|
|
PS := $(patsubst %.pod, ps/%.ps, $(POD))
|
2004-12-08 04:43:40 +00:00
|
|
|
|
2004-12-08 19:01:01 +00:00
|
|
|
all: $(HTML) $(MAN) $(PS)
|
2004-12-08 04:43:40 +00:00
|
|
|
|
2004-12-08 19:01:01 +00:00
|
|
|
.SUFFIXES:
|
|
|
|
.SUFFIXES: .html .pod .1 .ps
|
|
|
|
|
|
|
|
html/%.html: %.pod
|
|
|
|
pod2html --css=manpage.css --htmlroot=. \
|
|
|
|
--podpath=. --noindex --infile=$< --outfile=$@ --title=$*
|
|
|
|
|
|
|
|
man/man1/%.1: %.pod
|
2006-04-20 06:24:16 +00:00
|
|
|
pod2man --release=CVS --center="LLVM Command Guide" $< $@
|
2004-12-08 19:01:01 +00:00
|
|
|
|
|
|
|
ps/%.ps: man/man1/%.1
|
|
|
|
groff -Tps -man $< > $@
|
|
|
|
|
|
|
|
clean:
|
|
|
|
rm -f pod2htm*.*~~ $(HTML) $(MAN) $(PS)
|
2004-12-08 04:43:40 +00:00
|
|
|
|
|
|
|
else
|
|
|
|
|
2004-11-29 03:45:02 +00:00
|
|
|
LEVEL := ../..
|
|
|
|
|
|
|
|
include $(LEVEL)/Makefile.common
|
|
|
|
|
2005-01-16 02:21:29 +00:00
|
|
|
POD := $(wildcard $(PROJ_SRC_DIR)/*.pod)
|
2004-11-29 03:45:02 +00:00
|
|
|
|
|
|
|
EXTRA_DIST := $(POD) index.html
|
|
|
|
|
2005-01-16 02:21:29 +00:00
|
|
|
HTML = $(patsubst $(PROJ_SRC_DIR)/%.pod, $(PROJ_OBJ_DIR)/%.html, $(POD))
|
|
|
|
MAN = $(patsubst $(PROJ_SRC_DIR)/%.pod, $(PROJ_OBJ_DIR)/%.1, $(POD))
|
|
|
|
PS = $(patsubst $(PROJ_SRC_DIR)/%.pod, $(PROJ_OBJ_DIR)/%.ps, $(POD))
|
2004-11-29 03:45:02 +00:00
|
|
|
|
2004-05-14 19:50:33 +00:00
|
|
|
.SUFFIXES:
|
|
|
|
.SUFFIXES: .html .pod .1 .ps
|
|
|
|
|
2004-11-29 03:45:02 +00:00
|
|
|
$(HTML) : html/.dir man/.dir man/man1/.dir ps/.dir
|
|
|
|
|
2004-12-09 21:06:32 +00:00
|
|
|
html: $(HTML)
|
|
|
|
|
2005-01-16 02:21:29 +00:00
|
|
|
$(PROJ_OBJ_DIR)/%.html: %.pod
|
2004-11-29 03:45:02 +00:00
|
|
|
$(POD2HTML) --css=manpage.css --htmlroot=. --podpath=. \
|
|
|
|
--noindex --infile=$< --outfile=$@ --title=$*
|
2004-05-14 19:50:33 +00:00
|
|
|
|
2005-01-16 02:21:29 +00:00
|
|
|
$(PROJ_OBJ_DIR)/%.1: %.pod
|
|
|
|
$(POD2MAN) --release=$(LLVMVersion) \
|
2004-11-29 03:45:02 +00:00
|
|
|
--center="LLVM Command Guide" $< $@
|
2004-05-14 19:50:33 +00:00
|
|
|
|
2005-01-16 02:21:29 +00:00
|
|
|
$(PROJ_OBJ_DIR)/%.ps: $(PROJ_OBJ_DIR)/%.1
|
2004-11-29 03:45:02 +00:00
|
|
|
$(GROFF) -Tps -man $< > $@
|
|
|
|
|
|
|
|
clean-local::
|
|
|
|
$(Verb) $(RM) -f pod2htm*.*~~ $(HTML) $(MAN) $(PS)
|
|
|
|
|
2005-01-16 02:21:29 +00:00
|
|
|
HTML_DIR := $(PROJ_docsdir)/html/CommandGuide
|
|
|
|
MAN_DIR := $(PROJ_mandir)/man1
|
|
|
|
PS_DIR := $(PROJ_docsdir)/ps
|
2004-11-29 04:34:05 +00:00
|
|
|
|
2004-11-29 03:45:02 +00:00
|
|
|
install-local:: $(HTML) $(MAN) $(PS)
|
|
|
|
$(Echo) Installing HTML CommandGuide Documentation
|
2005-02-24 21:28:08 +00:00
|
|
|
$(Verb) $(MKDIR) $(HTML_DIR)
|
|
|
|
$(Verb) $(DataInstall) $(HTML) $(HTML_DIR)
|
|
|
|
$(Verb) $(DataInstall) $(PROJ_SRC_DIR)/index.html $(HTML_DIR)
|
2005-02-24 21:41:26 +00:00
|
|
|
$(Verb) $(DataInstall) $(PROJ_SRC_DIR)/manpage.css $(HTML_DIR)
|
2004-11-29 03:45:02 +00:00
|
|
|
$(Echo) Installing MAN CommandGuide Documentation
|
2005-02-24 21:28:08 +00:00
|
|
|
$(Verb) $(MKDIR) $(MAN_DIR)
|
|
|
|
$(Verb) $(DataInstall) $(MAN) $(MAN_DIR)
|
2004-11-29 03:45:02 +00:00
|
|
|
$(Echo) Installing PS CommandGuide Documentation
|
2005-02-24 21:28:08 +00:00
|
|
|
$(Verb) $(MKDIR) $(PS_DIR)
|
|
|
|
$(Verb) $(DataInstall) $(PS) $(PS_DIR)
|
2004-05-14 19:50:33 +00:00
|
|
|
|
2004-11-29 03:45:02 +00:00
|
|
|
uninstall-local::
|
|
|
|
$(Echo) Uninstalling Documentation
|
|
|
|
$(Verb) $(RM) -rf $(LLVM_DOCSDIR)
|
2004-05-14 19:50:33 +00:00
|
|
|
|
2004-11-29 03:45:02 +00:00
|
|
|
printvars::
|
|
|
|
$(Echo) "POD : " '$(POD)'
|
|
|
|
$(Echo) "HTML : " '$(HTML)'
|
2004-12-08 04:43:40 +00:00
|
|
|
|
|
|
|
endif
|