Mercurial > hg > early-roguelike
comparison rogue5/Makefile.in @ 223:0e99eade579c
Generate text documentation from the troff source files.
This is done by make, in the 'docs' target, which is now part of the
normal build process.
Unfortunately, not all the games include troff sources. Getting decent
HTML output from groff is still a difficult process which will not be
attempted at this time. There are a few bugs in the 'install' and
'uninstall' rules.
Not to mention that the documentation is sometimes inaccurate.
author | John "Elwin" Edwards |
---|---|
date | Sun, 21 Feb 2016 20:47:12 -0500 |
parents | 71cb5b647f2b |
children | 4d0f53998e8a |
comparison
equal
deleted
inserted
replaced
222:a666e4a034ed | 223:0e99eade579c |
---|---|
43 #TBL=tbl | 43 #TBL=tbl |
44 TBL = @TBL@ | 44 TBL = @TBL@ |
45 | 45 |
46 #COLCRT=colcrt | 46 #COLCRT=colcrt |
47 COLCRT = @COLCRT@ | 47 COLCRT = @COLCRT@ |
48 | |
49 #SED=sed | |
50 SED = @SED@ | |
51 | 48 |
52 #SCOREFILE=rogue54.scr | 49 #SCOREFILE=rogue54.scr |
53 SCOREFILE = @SCOREFILE@ | 50 SCOREFILE = @SCOREFILE@ |
54 | 51 |
55 #LOGFILE=rogue54.log | 52 #LOGFILE=rogue54.log |
117 main.c mdport.c misc.c monsters.c move.c new_level.c \ | 114 main.c mdport.c misc.c monsters.c move.c new_level.c \ |
118 options.c pack.c passages.c potions.c rings.c rip.c \ | 115 options.c pack.c passages.c potions.c rings.c rip.c \ |
119 rooms.c save.c scrolls.c state.c sticks.c things.c \ | 116 rooms.c save.c scrolls.c state.c sticks.c things.c \ |
120 weapons.c wizard.c xcrypt.c | 117 weapons.c wizard.c xcrypt.c |
121 MISC_C = findpw.c scedit.c scmisc.c | 118 MISC_C = findpw.c scedit.c scmisc.c |
122 DOCSRC = rogue.me.in rogue.6.in rogue.doc.in rogue.html.in rogue.cat.in | 119 DOCSRC = rogue.me.in rogue.6.in rogue.html.in |
123 DOCS = $(PROGRAM).doc $(PROGRAM).html $(PROGRAM).cat $(PROGRAM).me \ | 120 DOCS = $(PROGRAM).doc $(PROGRAM).cat |
124 $(PROGRAM).6 | |
125 AFILES = configure Makefile.in configure.ac config.h.in config.sub config.guess \ | 121 AFILES = configure Makefile.in configure.ac config.h.in config.sub config.guess \ |
126 install-sh rogue.6.in rogue.me.in rogue.html.in rogue.doc.in rogue.cat.in | 122 install-sh rogue.6.in rogue.me.in rogue.html.in |
127 MISC = Makefile.std LICENSE.TXT rogue54.sln rogue54.vcproj rogue.spec \ | 123 MISC = Makefile.std LICENSE.TXT rogue54.sln rogue54.vcproj rogue.spec \ |
128 rogue.png rogue.desktop | 124 rogue.png rogue.desktop |
129 | 125 |
130 .SUFFIXES: .obj | 126 .SUFFIXES: .obj |
131 | 127 |
132 .c.obj: | 128 .c.obj: |
133 $(CC) $(CFLAGS) $(CPPFLAGS) /c $*.c | 129 $(CC) $(CFLAGS) $(CPPFLAGS) /c $*.c |
134 | 130 |
135 .c.o: | 131 .c.o: |
136 $(CC) $(CFLAGS) $(CPPFLAGS) -c $*.c | 132 $(CC) $(CFLAGS) $(CPPFLAGS) -c $*.c |
133 | |
134 all: $(PROGRAM) docs | |
137 | 135 |
138 $(PROGRAM): $(HDRS) $(OBJS) | 136 $(PROGRAM): $(HDRS) $(OBJS) |
139 $(CC) $(CFLAGS) $(LDFLAGS) $(OBJS) $(LIBS) -o $@ | 137 $(CC) $(CFLAGS) $(LDFLAGS) $(OBJS) $(LIBS) -o $@ |
140 | 138 |
141 clean: | 139 clean: |
142 $(RM) $(OBJS1) | 140 $(RM) $(OBJS1) |
143 $(RM) $(OBJS2) | 141 $(RM) $(OBJS2) |
144 $(RM) core a.exe a.out a.exe.stackdump $(PROGRAM) $(PROGRAM).exe | 142 $(RM) core a.exe a.out a.exe.stackdump $(PROGRAM) $(PROGRAM).exe |
145 $(RM) $(PROGRAM).tar $(PROGRAM).tar.gz $(PROGRAM).zip | 143 $(RM) $(PROGRAM).tar $(PROGRAM).tar.gz $(PROGRAM).zip |
144 $(RM) $(DOCS) | |
146 $(RM) $(DISTNAME)/* | 145 $(RM) $(DISTNAME)/* |
147 -rmdir $(DISTNAME) | 146 -rmdir $(DISTNAME) |
148 | 147 |
149 maintainer-clean: | 148 maintainer-clean: |
150 $(RM) config.h | 149 $(RM) config.h |
152 $(RM) config.status | 151 $(RM) config.status |
153 $(RM) -r autom4te.cache | 152 $(RM) -r autom4te.cache |
154 $(RM) config.log | 153 $(RM) config.log |
155 $(RM) $(PROGRAM).scr $(PROGRAM).lck | 154 $(RM) $(PROGRAM).scr $(PROGRAM).lck |
156 | 155 |
156 docs: $(DOCS) | |
157 | |
157 stddocs: | 158 stddocs: |
158 sed -e 's/@PROGRAM@/rogue/' -e 's/@SCOREFILE@/rogue.scr/' rogue.6.in > rogue.6 | 159 sed -e 's/@PROGRAM@/rogue/' -e 's/@SCOREFILE@/rogue.scr/' rogue.6.in > rogue.6 |
159 sed -e 's/@PROGRAM@/rogue/' -e 's/@SCOREFILE@/rogue.scr/' rogue.me.in > rogue.me | 160 sed -e 's/@PROGRAM@/rogue/' -e 's/@SCOREFILE@/rogue.scr/' rogue.me.in > rogue.me |
160 sed -e 's/@PROGRAM@/rogue/' -e 's/@SCOREFILE@/rogue.scr/' rogue.html.in > rogue,html | 161 sed -e 's/@PROGRAM@/rogue/' -e 's/@SCOREFILE@/rogue.scr/' rogue.html.in > rogue,html |
161 sed -e 's/@PROGRAM@/rogue/' -e 's/@SCOREFILE@/rogue.scr/' rogue.doc.in > rogue.doc | 162 sed -e 's/@PROGRAM@/rogue/' -e 's/@SCOREFILE@/rogue.scr/' rogue.doc.in > rogue.doc |
177 | 178 |
178 scmisc.o scedit.o: | 179 scmisc.o scedit.o: |
179 $(CC) -O -c $(SF) $*.c | 180 $(CC) -O -c $(SF) $*.c |
180 | 181 |
181 $(PROGRAM).doc: rogue.me | 182 $(PROGRAM).doc: rogue.me |
182 if test "x$(GROFF)" != "x" -a "x$(SED)" != "x" ; then \ | 183 if test "x$(GROFF)" != "x" ; then \ |
183 $(GROFF) -P-c -t -me -Tascii rogue.me | $(SED) -e 's/.\x08//g' > $(PROGRAM).doc ;\ | 184 $(GROFF) -P-c -P-b -P-u -t -me -Tutf8 rogue.me > $(PROGRAM).doc ;\ |
184 elif test "x$(NROFF)" != "x" -a "x$(TBL)" != "x" -a "x$(COLCRT)" != "x" ; then \ | 185 elif test "x$(NROFF)" != "x" -a "x$(TBL)" != "x" -a "x$(COLCRT)" != "x" ; then \ |
185 tbl rogue.me | $(NROFF) -me | colcrt - > $(PROGRAM).doc ;\ | 186 tbl rogue.me | $(NROFF) -me | colcrt - > $(PROGRAM).doc ;\ |
186 fi | 187 fi |
187 | 188 |
189 #$(PROGRAM).html: rogue.me | |
190 # if test "x$(GROFF)" != "x" ; then \ | |
191 # $(GROFF) -t -me -Thtml -P-l rogue.me > $(PROGRAM).html ;\ | |
192 # fi | |
193 | |
188 $(PROGRAM).cat: rogue.6 | 194 $(PROGRAM).cat: rogue.6 |
189 if test "x$(GROFF)" != "x" -a "x$(SED)" != "x" ; then \ | 195 if test "x$(GROFF)" != "x" ; then \ |
190 $(GROFF) -Tascii -man rogue.6 | $(SED) -e 's/.\x08//g' > $(PROGRAM).cat ;\ | 196 $(GROFF) -P-c -P-b -P-u -Tascii -man rogue.6 > $(PROGRAM).cat ;\ |
191 elif test "x$(NROFF)" != "x" -a "x$(TBL)" != "x" -a "x$(COLCRT)" != "x" ; then \ | 197 elif test "x$(NROFF)" != "x" -a "x$(COLCRT)" != "x" ; then \ |
192 $(NROFF) -man rogue.6 | $(COLCRT) - > $(PROGRAM).cat ;\ | 198 $(NROFF) -man rogue.6 | $(COLCRT) - > $(PROGRAM).cat ;\ |
193 fi | 199 fi |
194 | 200 |
195 dist: clean $(PROGRAM) | 201 dist: clean $(PROGRAM) |
196 tar cf $(DISTFILE).tar $(PROGRAM) LICENSE.TXT $(DOCS) | 202 tar cf $(DISTFILE).tar $(PROGRAM) LICENSE.TXT $(DOCS) |
197 gzip -f $(DISTFILE).tar | 203 gzip -f $(DISTFILE).tar |
198 | 204 |
199 install: $(PROGRAM) | 205 install: all |
200 -$(TOUCH) test | 206 -$(TOUCH) test |
201 -if test ! -f $(DESTDIR)$(SCOREFILE) ; then $(INSTALL) -m 0664 test $(DESTDIR)$(SCOREFILE) ; fi | 207 -if test ! -f $(DESTDIR)$(SCOREFILE) ; then $(INSTALL) -m 0664 test $(DESTDIR)$(SCOREFILE) ; fi |
202 -if test "x$(LOGFILE)" != "x" && test ! -f $(DESTDIR)$(LOGFILE) ; then \ | 208 -if test "x$(LOGFILE)" != "x" && test ! -f $(DESTDIR)$(LOGFILE) ; then \ |
203 $(INSTALL) -m 0664 test $(DESTDIR)$(LOGFILE) ; fi | 209 $(INSTALL) -m 0664 test $(DESTDIR)$(LOGFILE) ; fi |
204 -if test "x$(SAVEDIR)" != "x" && test ! -d $(DESTDIR)$(SAVEDIR) ; then \ | 210 -if test "x$(SAVEDIR)" != "x" && test ! -d $(DESTDIR)$(SAVEDIR) ; then \ |
214 $(CHMOD) 0464 $(DESTDIR)$(LOGFILE) ; \ | 220 $(CHMOD) 0464 $(DESTDIR)$(LOGFILE) ; \ |
215 $(CHMOD) 0775 $(DESTDIR)$(SAVEDIR) ; \ | 221 $(CHMOD) 0775 $(DESTDIR)$(SAVEDIR) ; \ |
216 fi | 222 fi |
217 -if test -d $(DESTDIR)$(man6dir) ; then $(INSTALL) -m 0644 rogue.6 $(DESTDIR)$(man6dir)/$(PROGRAM).6 ; fi | 223 -if test -d $(DESTDIR)$(man6dir) ; then $(INSTALL) -m 0644 rogue.6 $(DESTDIR)$(man6dir)/$(PROGRAM).6 ; fi |
218 -if test ! -d $(DESTDIR)$(man6dir) ; then $(INSTALL) -m 0644 rogue.6 $(DESTDIR)$(mandir)/$(PROGRAM).6 ; fi | 224 -if test ! -d $(DESTDIR)$(man6dir) ; then $(INSTALL) -m 0644 rogue.6 $(DESTDIR)$(mandir)/$(PROGRAM).6 ; fi |
219 -$(INSTALL) -m 0644 rogue.doc $(DESTDIR)$(docdir)/$(PROGRAM).doc | 225 -$(INSTALL) -m 0644 $(PROGRAM).doc $(DESTDIR)$(docdir)/$(PROGRAM).doc |
220 -$(INSTALL) -m 0644 rogue.html $(DESTDIR)$(docdir)/$(PROGRAM).html | 226 -$(INSTALL) -m 0644 rogue.html $(DESTDIR)$(docdir)/$(PROGRAM).html |
221 -$(INSTALL) -m 0644 rogue.cat $(DESTDIR)$(docdir)/$(PROGRAM).cat | 227 -$(INSTALL) -m 0644 $(PROGRAM).cat $(DESTDIR)$(docdir)/$(PROGRAM).cat |
222 -$(INSTALL) -m 0644 LICENSE.TXT $(DESTDIR)$(docdir)/LICENSE.TXT | 228 -$(INSTALL) -m 0644 LICENSE.TXT $(DESTDIR)$(docdir)/LICENSE.TXT |
223 -$(INSTALL) -m 0644 rogue.me $(DESTDIR)$(docdir)/$(PROGRAM).me | 229 -$(INSTALL) -m 0644 rogue.me $(DESTDIR)$(docdir)/$(PROGRAM).me |
224 -if test "x$(LOCKFILE)" != "x" && test ! -f $(DESTDIR)$(LOCKFILE) ; then \ | 230 -if test "x$(LOCKFILE)" != "x" && test ! -f $(DESTDIR)$(LOCKFILE) ; then \ |
225 $(INSTALL) -m 0666 test $(DESTDIR)$(LOCKFILE) ; \ | 231 $(INSTALL) -m 0666 test $(DESTDIR)$(LOCKFILE) ; \ |
226 $(RM) $(DESTDIR)$(LOCKFILE) ; \ | 232 $(RM) $(DESTDIR)$(LOCKFILE) ; \ |
228 -$(RM) test | 234 -$(RM) test |
229 | 235 |
230 uninstall: | 236 uninstall: |
231 -$(RM) $(DESTDIR)$(bindir)/$(PROGRAM) | 237 -$(RM) $(DESTDIR)$(bindir)/$(PROGRAM) |
232 -$(RM) $(DESTDIR)$(man6dir)/$(PROGRAM).6 | 238 -$(RM) $(DESTDIR)$(man6dir)/$(PROGRAM).6 |
233 -$(RM) $(DESTDIR)$(docdir)$(PROGRAM)/$(PROGRAM).doc | 239 -$(RM) $(DESTDIR)$(docdir)/$(PROGRAM).doc |
240 -$(RM) $(DESTDIR)$(docdir)/$(PROGRAM).cat | |
241 -$(RM) $(DESTDIR)$(docdir)/$(PROGRAM).me | |
242 -$(RM) $(DESTDIR)$(docdir)/$(PROGRAM).html | |
234 -$(RM) $(DESTDIR)$(LOCKFILE) | 243 -$(RM) $(DESTDIR)$(LOCKFILE) |
235 -$(RMDIR) $(DESTDIR)$(docdir)$(PROGRAM) | 244 -$(RMDIR) $(DESTDIR)$(docdir)$(PROGRAM) |
236 | 245 |
237 reinstall: uninstall install | 246 reinstall: uninstall install |