Mercurial > hg > early-roguelike
comparison srogue/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 | a666e4a034ed |
children | 4d0f53998e8a |
comparison
equal
deleted
inserted
replaced
222:a666e4a034ed | 223:0e99eade579c |
---|---|
37 fight.c global.c init.c io.c list.c main.c mdport.c misc.c monsters.c \ | 37 fight.c global.c init.c io.c list.c main.c mdport.c misc.c monsters.c \ |
38 move.c new_leve.c options.c pack.c passages.c potions.c pstats.c \ | 38 move.c new_leve.c options.c pack.c passages.c potions.c pstats.c \ |
39 rings.c rip.c rooms.c save.c scrolls.c state.c sticks.c things.c \ | 39 rings.c rip.c rooms.c save.c scrolls.c state.c sticks.c things.c \ |
40 trader.c weapons.c wizard.c xcrypt.c | 40 trader.c weapons.c wizard.c xcrypt.c |
41 | 41 |
42 DOCS= $(PROGRAM).doc | |
42 MISC= Makefile LICENSE.TXT rogue.nr | 43 MISC= Makefile LICENSE.TXT rogue.nr |
43 | 44 |
44 CC = gcc | 45 CC = gcc |
45 CFLAGS= | 46 CFLAGS= |
46 CPPFLAGS=@DEFS@ | 47 CPPFLAGS=@DEFS@ |
47 CRLIB = @LIBS@ | 48 CRLIB = @LIBS@ |
48 RM = rm -f | 49 RM = rm -f |
49 TAR = tar | 50 TAR = tar |
50 INSTALL=@INSTALL@ | 51 INSTALL=@INSTALL@ |
52 GROFF=@GROFF@ | |
53 NROFF=@NROFF@ | |
54 COLCRT=@COLCRT@ | |
55 TBL=@TBL@ | |
56 | |
57 all: $(PROGRAM) docs | |
51 | 58 |
52 $(PROGRAM): $(HDRS) $(OBJS) | 59 $(PROGRAM): $(HDRS) $(OBJS) |
53 $(CC) $(CFLAGS) $(LDFLAGS) $(OBJS) $(CRLIB) -o $@ | 60 $(CC) $(CFLAGS) $(LDFLAGS) $(OBJS) $(CRLIB) -o $@ |
54 | 61 |
55 tags: $(HDRS) $(CFILES) | 62 tags: $(HDRS) $(CFILES) |
60 lint: | 67 lint: |
61 lint -hxbc $(CFILES) $(CRLIB) > linterrs | 68 lint -hxbc $(CFILES) $(CRLIB) > linterrs |
62 | 69 |
63 clean: | 70 clean: |
64 rm -f $(OBJS) core | 71 rm -f $(OBJS) core |
65 rm -f $(PROGRAM) $(PROGRAM).exe $(PROGRAM) $(PROGRAM).exe $(PROGRAM).tar $(PROGRAM).tar.gz $(PROGRAM).doc | 72 rm -f $(PROGRAM) $(PROGRAM).exe $(PROGRAM) $(PROGRAM).exe $(PROGRAM).tar $(PROGRAM).tar.gz $(DOCS) |
73 | |
74 docs: $(DOCS) | |
75 | |
76 $(PROGRAM).doc: rogue.nr | |
77 if test "x$(GROFF)" != "x" ; then \ | |
78 $(GROFF) -P-c -P-b -P-u -t -mm -Tascii rogue.nr >$(PROGRAM).doc ;\ | |
79 elif test "x$(NROFF)" != "x" -a "x$(TBL)" != "x" -a "x$(COLCRT)" != "x" ; then \ | |
80 $(TBL) rogue.nr | $(NROFF) -mm | $(COLCRT) - > $(PROGRAM).doc ;\ | |
81 fi | |
66 | 82 |
67 install: $(PROGRAM) | 83 install: $(PROGRAM) |
68 -touch test | 84 -touch test |
69 -if test ! -f $(DESTDIR)$(SCOREFILE) ; \ | 85 -if test ! -f $(DESTDIR)$(SCOREFILE) ; \ |
70 then $(INSTALL) -m 0664 test $(DESTDIR)$(SCOREFILE) ; fi | 86 then $(INSTALL) -m 0664 test $(DESTDIR)$(SCOREFILE) ; fi |
85 fi | 101 fi |
86 -if test ! -d $(DESTDIR)$(docdir) ; \ | 102 -if test ! -d $(DESTDIR)$(docdir) ; \ |
87 then mkdir -p $(DESTDIR)$(docdir) ; fi | 103 then mkdir -p $(DESTDIR)$(docdir) ; fi |
88 -$(INSTALL) -m 0644 LICENSE.TXT $(DESTDIR)$(docdir)/LICENSE.TXT | 104 -$(INSTALL) -m 0644 LICENSE.TXT $(DESTDIR)$(docdir)/LICENSE.TXT |
89 -$(INSTALL) -m 0644 rogue.nr $(DESTDIR)$(docdir)/$(PROGRAM).nr | 105 -$(INSTALL) -m 0644 rogue.nr $(DESTDIR)$(docdir)/$(PROGRAM).nr |
106 -$(INSTALL) -m 0644 $(PROGRAM).doc $(DESTDIR)$(docdir)/$(PROGRAM).doc | |
90 -$(RM) test | 107 -$(RM) test |
91 | 108 |
92 uninstall: | 109 uninstall: |
93 -$(RM) $(DESTDIR)$(bindir)/$(PROGRAM) | 110 -$(RM) $(DESTDIR)$(bindir)/$(PROGRAM) |
94 -$(RM) $(DESTDIR)$(docdir)/LICENSE.TXT | 111 -$(RM) $(DESTDIR)$(docdir)/LICENSE.TXT |
95 -$(RM) $(DESTDIR)$(docdir)/$(PROGRAM).nr | 112 -$(RM) $(DESTDIR)$(docdir)/$(PROGRAM).nr |
113 -$(RM) $(DESTDIR)$(docdir)/$(PROGRAM).doc | |
96 -rmdir $(DESTDIR)$(docdir) | 114 -rmdir $(DESTDIR)$(docdir) |
97 | 115 |
98 reinstall: uninstall install | 116 reinstall: uninstall install |
99 | 117 |
100 count: | 118 count: |