Mercurial > hg > early-roguelike
comparison urogue/Makefile.in @ 275:aa0eefcd7df6
UltraRogue: build and install documentation in the Makefile.
author | John "Elwin" Edwards |
---|---|
date | Sat, 09 Sep 2017 07:25:23 -0400 |
parents | 603e8a99c859 |
children | fe6b7a1a6dfc |
comparison
equal
deleted
inserted
replaced
274:603e8a99c859 | 275:aa0eefcd7df6 |
---|---|
7 # | 7 # |
8 # Makefile for urogue | 8 # Makefile for urogue |
9 # | 9 # |
10 | 10 |
11 DISTNAME=urogue1.0.7 | 11 DISTNAME=urogue1.0.7 |
12 PACKAGE_TARNAME=@PACKAGE_TARNAME@ | |
12 | 13 |
13 HDRS = dict.h dictutil.h rogue.h | 14 HDRS = dict.h dictutil.h rogue.h |
14 OBJS = armor.o \ | 15 OBJS = armor.o \ |
15 artifact.o \ | 16 artifact.o \ |
16 bag.o \ | 17 bag.o \ |
108 weapons.c \ | 109 weapons.c \ |
109 wizard.c \ | 110 wizard.c \ |
110 xcrypt.c | 111 xcrypt.c |
111 | 112 |
112 MISC= Makefile README LICENSE.TXT history.txt TODO | 113 MISC= Makefile README LICENSE.TXT history.txt TODO |
114 DOCS = $(PROGRAM).cat | |
115 RAWDOCS = README LICENSE.TXT history.txt TODO | |
113 | 116 |
114 CC = @CC@ | 117 CC = @CC@ |
115 CPPFLAGS=@DEFS@ | 118 CPPFLAGS=@DEFS@ |
116 CFLAGS= | 119 CFLAGS= |
117 CRLIB = @LIBS@ | 120 CRLIB = @LIBS@ |
118 RM = rm -f | 121 RM = rm -f |
119 TAR = tar | 122 TAR = tar |
123 GROFF=@GROFF@ | |
124 NROFF=@NROFF@ | |
125 COLCRT=@COLCRT@ | |
120 INSTALL=@INSTALL@ | 126 INSTALL=@INSTALL@ |
121 | 127 |
122 SCOREFILE=@SCOREFILE@ | 128 SCOREFILE=@SCOREFILE@ |
123 LOGFILE=@LOGFILE@ | 129 LOGFILE=@LOGFILE@ |
124 SAVEDIR=@SAVEDIR@ | 130 SAVEDIR=@SAVEDIR@ |
126 GROUPOWNER=@GROUPOWNER@ | 132 GROUPOWNER=@GROUPOWNER@ |
127 | 133 |
128 DESTDIR= | 134 DESTDIR= |
129 prefix=@prefix@ | 135 prefix=@prefix@ |
130 exec_prefix=@exec_prefix@ | 136 exec_prefix=@exec_prefix@ |
137 datarootdir=@datarootdir@ | |
131 bindir=@bindir@ | 138 bindir=@bindir@ |
139 docdir=@docdir@ | |
140 mandir=@mandir@ | |
141 man6dir=$(mandir)/man6 | |
132 | 142 |
133 .c.o: | 143 .c.o: |
134 $(CC) $(CFLAGS) $(CPPFLAGS) -c -o $*.o $*.c | 144 $(CC) $(CFLAGS) $(CPPFLAGS) -c -o $*.o $*.c |
135 | 145 |
146 all: $(PROGRAM) docs | |
147 | |
136 $(PROGRAM): $(OBJS) $(MAKEFILE) | 148 $(PROGRAM): $(OBJS) $(MAKEFILE) |
137 $(CC) $(CFLAGS) $(LDFLAGS) $(OBJS) $(CRLIB) -o $@ | 149 $(CC) $(CFLAGS) $(LDFLAGS) $(OBJS) $(CRLIB) -o $@ |
138 | 150 |
139 clean: | 151 clean: |
140 rm -f $(OBJS) urogue a.out core *.map urogue.exe urogue.cat | 152 rm -f $(OBJS) urogue a.out core *.map urogue.exe $(PROGRAM).cat |
141 | 153 |
142 install: $(PROGRAM) | 154 docs: $(DOCS) |
155 | |
156 $(PROGRAM).cat: urogue.6 | |
157 if test "x$(GROFF)" != "x" ; then \ | |
158 $(GROFF) -P-c -P-b -P-u -Tascii -man urogue.6 > $(PROGRAM).cat ;\ | |
159 elif test "x$(NROFF)" != "x" && test "x$(COLCRT)" != "x" ; then \ | |
160 $(NROFF) -man urogue.6 | $(COLCRT) - > $(PROGRAM).cat ;\ | |
161 fi | |
162 | |
163 install: all | |
143 touch test | 164 touch test |
144 if test ! -f $(DESTDIR)$(SCOREFILE) ; then \ | 165 if test ! -f $(DESTDIR)$(SCOREFILE) ; then \ |
145 mkdir -p `dirname $(DESTDIR)$(SCOREFILE)` ; \ | 166 mkdir -p `dirname $(DESTDIR)$(SCOREFILE)` ; \ |
146 $(INSTALL) -m 0664 test $(DESTDIR)$(SCOREFILE) ; fi | 167 $(INSTALL) -m 0664 test $(DESTDIR)$(SCOREFILE) ; fi |
147 if test "x$(LOGFILE)" != "x" && test ! -f $(DESTDIR)$(LOGFILE) ; then \ | 168 if test "x$(LOGFILE)" != "x" && test ! -f $(DESTDIR)$(LOGFILE) ; then \ |
163 chmod 0464 $(DESTDIR)$(SCOREFILE) ; \ | 184 chmod 0464 $(DESTDIR)$(SCOREFILE) ; \ |
164 chmod 0464 $(DESTDIR)$(LOGFILE) ; \ | 185 chmod 0464 $(DESTDIR)$(LOGFILE) ; \ |
165 chmod 0775 $(DESTDIR)$(SAVEDIR) ; \ | 186 chmod 0775 $(DESTDIR)$(SAVEDIR) ; \ |
166 chmod 0775 $(DESTDIR)$(CHARDIR) ; \ | 187 chmod 0775 $(DESTDIR)$(CHARDIR) ; \ |
167 fi | 188 fi |
189 mkdir -p $(DESTDIR)$(man6dir) | |
190 $(INSTALL) -m 0644 urogue.6 $(DESTDIR)$(man6dir)/$(PROGRAM).6 | |
191 mkdir -p $(DESTDIR)$(docdir) | |
192 $(INSTALL) -m 0644 $(DOCS) $(RAWDOCS) $(DESTDIR)$(docdir) | |
168 $(RM) test | 193 $(RM) test |
169 | 194 |
170 uninstall: | 195 uninstall: |
171 $(RM) $(DESTDIR)$(bindir)/$(PROGRAM) | 196 $(RM) $(DESTDIR)$(bindir)/$(PROGRAM) |
172 | 197 $(RM) $(DESTDIR)$(man6dir)/$(PROGRAM).6 |
198 $(RM) -r $(DESTDIR)$(docdir) | |
199 | |
173 reinstall: uninstall install | 200 reinstall: uninstall install |
174 | 201 |
175 dist.src: | 202 dist.src: |
176 make clean | 203 make clean |
177 tar cf $(DISTNAME)-src.tar $(CFILES) $(HDRS) $(MISC) | 204 tar cf $(DISTNAME)-src.tar $(CFILES) $(HDRS) $(MISC) |