1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202
|
# -*-makefile-*-
# Names
# These definitions are somewhat redundant, cause they are the same as
# in the toplevel makefile. They tell where the doc source got pyhsical
# installed
prefix=/usr/local
BASE = $(prefix)
# Here went the distribution by the toplevel make install.
DD = $(BASE)/lib/sgml
# Here goes the documentation:
WWW = $(BASE)/www/doc/$(EXE)
INFO = $(BASE)/info
MAN = $(BASE)/man/man1
# The program names used within this Makefile
# Don't use the full path on `EXE'
EXE=sdc
MKDIR=mkdir
MKDIROPT=-p
CP=cp
# The first make target should be help. A personal rule of mine.
all: help
doc: # Create the documentation
doc: # you might select a subset for your installation
# .gdate german doc
# .indate english intro
# .mandate manpage
# .infodate info file
# remove unwanted targets
doc: .indate .mandate .infodate .alldate
#-------------------------------------------------------------------------
# There should be noting to change below this line.
#-------------------------------------------------------------------------
# This is only a shorthand
DOCD = $(DD)/doc
TYPESET = $(DD)/bin/$(EXE)
.SUFFIXES: .sgml .html .lout .info .man
# Switch to typeset
TSO = -D$(DD)/doc -i use-inl -L$(DD)
COMTXT = common.ent descript.text environ.text files.text options.text
install: # copy the doc-source into the installation directory
install: e.dd+pwd installdirs
$(CP) `find * ! -path "CVS" ! -name "*~" -print` $(DD)/doc
intro-en.ps::
set -e; cd $(WWW) && \
$(TYPESET) $(TSO) -o intro-en.ps $(DOCD)/intro-en.sgml
intro-en2.ps::
set -e; cd $(WWW) && \
$(TYPESET) $(TSO) -O latex \
-o intro-en2.tex $(DOCD)/intro-en.sgml && \
latex intro-en2 && \
latex intro-en2 && \
dvips intro-en2 && \
mv intro-en2.ps ps.intro-en2 && \
rm -f intro-en2.* && \
mv ps.intro-en2 intro-en2.ps
intro-en.html::
set -e; cd $(WWW) && \
$(TYPESET) $(TSO) -R HTML2 -o intro-en.html \
$(DOCD)/intro-en.sgml
targets.html::
set -e; cd $(WWW) && \
$(TYPESET) $(TSO) -o targets.html $(DOCD)/targets.sgml
AllDoc.ps::
set -e; cd $(WWW) && \
$(TYPESET) $(TSO) -o AllDoc.ps $(DOCD)/AllDoc.sgml
AllDoc.html::
set -e; cd $(WWW) && \
$(TYPESET) $(TSO) -o AllDoc.html $(DOCD)/AllDoc.sgml
uudecodem:
uudecode testgif.gif.uu
mv testgif.gif $(DOCD)
uudecode testpng.png.uu
mv testpng.png $(DOCD)
nottest2.ps:: uudecodem
set -e; cd $(WWW) && \
$(TYPESET) $(TSO) -o nottest2.tex -O latex \
$(DOCD)/nottest.sgml
set -e; cd $(WWW) && \
latex nottest2 && \
dvips nottest2
##FIXME && \
# mv nottest2.ps ps.nottest2 &&\
# rm nottest2* && \
# mv ps.nottest2 nottest2.ps \
nottest.ps:: uudecodem
set -e; cd $(WWW) && \
$(TYPESET) $(TSO) -o nottest.ps $(DOCD)/nottest.sgml && \
rm nottest-*
.gdate: # update the german documentation
.gdate: intro.sgml
set -e; cd $(WWW) && \
$(TYPESET) $(TSO) -o intro.ps $(DOCD)/intro.sgml && \
$(TYPESET) $(TSO) -o intro.html $(DOCD)/intro.sgml
touch .gdate
.indate: # update the english intro
.indate: intro-en.sgml $(COMTXT) intro-bib.sgml targets.sgml nottest.sgml
$(MAKE) -e intro-en.html intro-en.ps targets.html \
nottest.ps
touch .indate
.mandate: # update the manpage
.mandate: manpage.sgml $(COMTXT)
set -e; cd $(MAN) && \
$(TYPESET) $(TSO) -Oman -o $(EXE).1 $(DOCD)/manpage.sgml
set -e; cd $(WWW) && \
$(TYPESET) $(TSO) -o sdc_man.html $(DOCD)/manpage.sgml
touch .mandate
.infodate: # update the info file
.infodate: intro-en.sgml
set -e; cd $(INFO) && \
$(TYPESET) $(TSO) -Oinfo -o $(EXE) $(DOCD)/intro-en.sgml
touch .infodate
.alldate: # update the english intro
.alldate: intro-en.sgml $(COMTXT) intro-bib.sgml targets.sgml nottest.sgml
$(MAKE) -e intro-en.html intro-en.ps targets.html \
AllDoc.ps AllDoc.html \
nottest.ps nottest2.ps
touch .alldate
installdirs:
$(MAKE) e.dir DIRECTORY=$(WWW)
$(MAKE) e.dir DIRECTORY=$(MAN)
$(MAKE) e.dir DIRECTORY=$(INFO)
$(MAKE) e.dir DIRECTORY=$(DOCD)
nottest: $(WWW)/nottest.ps
$(WWW)/nottest.ps: $(DOCD)/nottest.sgml installdirs
set -e; cd $(WWW) && \
$(TYPESET) $(TSO) -o nottest.ps $(DOCD)/nottest.sgml
clean: # remove redundant files
touch core
rm -f `find . \( -name "*~" -o -name core \) -print`
clobber: # remove all generated files (did I catch all?)
clobber: clean
rm -f .alldate .infodate .mandate .indate .gdate
rm -f *.ps *.html *-0 *.1
rm -f testpng.png testgif.gif
rm -f notation.ent
purge: # same as clean but removes files containing only "deleted"
purge: clean
@echo -n deleted >deleted7
@echo deleted >deleted8
@rm -f `find . \
\( \( -size 8c -exec cmp -s {} deleted8 \; \) \
-o \( -size 7c -exec cmp -s {} deleted7 \; \) \) \
-print`
@echo purged
wipe: # use: make wipe file=<file> # prepares files for purge
mv -f $(file) $(file)~
echo deleted >$(file)
e.dir:
set -e; [ -d $(DIRECTORY) ] || \
$(MKDIR) $(MKDIROPT) $(DIRECTORY)
e.dd+pwd:
set -e; [ ! -d $(DD)/`basename \`pwd\`` ] && \
$(MKDIR) $(MKDIROPT) $(DD)/`basename \`pwd\``
help: # Help on make targets
-@egrep "^[A-Za-z\._]+::?.*#" [Mm]akefile
# Local Variables:
# outline-regexp: ".+:[ \t]+#"
# End:
|