root/releases/1.6/0p3/Makefile.SH

Revision 44, 6.1 KB (checked in by pennmush, 3 years ago)

PennMUSH 1.6.0p0 Archival

  • Property svn:executable set to *
Line 
1: $Name: 1_6_0 $
2case $CONFIG in
3'')
4    if test -f config.sh; then TOP=.;
5    elif test -f ../config.sh; then TOP=..;
6    elif test -f ../../config.sh; then TOP=../..;
7    elif test -f ../../../config.sh; then TOP=../../..;
8    elif test -f ../../../../config.sh; then TOP=../../../..;
9    else
10        echo "Can't find config.sh."; exit 1
11    fi
12    . $TOP/config.sh
13    ;;
14esac
15: This forces SH files to create target in same directory as SH file.
16: This is so that make depend always knows where to find SH derivatives.
17case "$0" in
18*/*) cd `expr X$0 : 'X\(.*\)/'` ;;
19esac
20
21echo "Extracting Makefile (with variable substitutions)"
22
23: This section of the file will have variable substitutions done on it.
24: Move anything that needs config subs from !NO!SUBS! section to !GROK!THIS!.
25: Protect any dollar signs and backticks that you do not want interpreted
26: by putting a backslash in front.  You may delete these comments.
27$spitshell >Makefile <<!GROK!THIS!
28# Makefile for PennMUSH 1.50 Dune
29
30# - System configuration - #
31
32#
33# This section of the file should be automatically configured by
34# the Configure script. If it doesn't work, you might try starting
35# from the Makefile.old that's included instead, and reporting
36# your problem (including this Makefile) to Paul/Javelin,
37# dunemush@mellers1.psych.berkeley.edu
38#
39
40CC=$cc
41CCFLAGS=$optimize $ccflags -I.. -I../hdrs
42LDFLAGS=$ldflags
43CLIBS=$libs $cryptlib
44LNS=$lns
45!GROK!THIS!
46
47: In the following dollars and backticks do not need the extra backslash.
48$spitshell >>Makefile <<'!NO!SUBS!'
49
50
51# stupid SYS V shell
52SHELL=/bin/sh
53BUILDDATE=\"\`date\`\"
54
55
56all: dune.h options.h game/mush.cnf
57    @echo "Making all in src."
58    (cd src; make all "CC=$(CC)" "CCFLAGS=$(CCFLAGS)" \
59    "BUILDDATE=$(BUILDDATE)" \
60    "LDFLAGS=$(LDFLAGS)" "CLIBS=$(CLIBS)" )
61    @echo "If the make was successful, use 'make install' to install links"
62
63dune.h: dune.h.dist
64    @echo "Please use 'make update' to update your dune.h file from dune.h.dist"
65    @echo "Or you may cp dune.h.dist to dune.h and edit it."
66    exit 1
67
68options.h: options.h.dist
69    @echo "Please use 'make update' to update your options.h file from options.h.dist"
70    @echo "You must cp options.h.dist to options.h and edit it."
71    exit 1
72
73install: game/mush.cnf netmud mkindx
74    -rm -f game/netmush
75    -rm -f game/mkindx
76    (cd game; \
77    $(LNS) ../src/netmud netmush; \
78    $(LNS) ../src/mkindx mkindx)
79    @echo "If you plan to run multiple MUSHes, consider running 'make customize'"
80
81netmud:
82    (cd src; make netmud "CC=$(CC)" "CCFLAGS=$(CCFLAGS)" \
83    "LDFLAGS=$(LDFLAGS)" "CLIBS=$(CLIBS)" )
84
85mkindx:
86    (cd src; make mkindx "CC=$(CC)" "CCFLAGS=$(CCFLAGS)" \
87    "LDFLAGS=$(LDFLAGS)" "CLIBS=$(CLIBS)" )
88
89portmsg:
90    (cd src; make portmsg "CC=$(CC)" "CCFLAGS=$(CCFLAGS)" \
91    "LDFLAGS=$(LDFLAGS)" "CLIBS=$(CLIBS)" )
92
93concentrate:
94    (cd src; make concentrate "CC=$(CC)" "CCFLAGS=$(CCFLAGS)" \
95    "LDFLAGS=$(LDFLAGS)" "CLIBS=$(CLIBS)" )
96
97install_conc: concentrate
98    -rm -f game/concentrate
99    (cd game; $(LNS) ../src/concentrate concentrate)
100
101announce:
102    (cd src; make announce "CC=$(CC)" "CCFLAGS=$(CCFLAGS)" \
103    "LDFLAGS=$(LDFLAGS)" "CLIBS=$(CLIBS)" )
104
105rwho_made:
106    (cd src/RWHO; make CC="$(CC)" CCFLAGS="$(CCFLAGS)")
107    (cd src; touch rwho_made)
108
109ident_made:
110    (cd src/IDENT; make CC="$(CC)" CCFLAGS="$(CCFLAGS)")
111    (cd src; touch ident_made)
112
113dump:
114    (cd src; make dump "CC=$(CC)" "CCFLAGS=$(CCFLAGS)" \
115    "LDFLAGS=$(LDFLAGS)" "CLIBS=$(CLIBS)" )
116 
117extract:
118    (cd src; make extract "CC=$(CC)" "CCFLAGS=$(CCFLAGS)" \
119    "LDFLAGS=$(LDFLAGS)" "CLIBS=$(CLIBS)" )
120
121decompress:
122    (cd src; make decompress "CC=$(CC)" "CCFLAGS=$(CCFLAGS)" \
123    "LDFLAGS=$(LDFLAGS)" "CLIBS=$(CLIBS)" )
124
125safety:
126    cp src/*.c /var/pennmush-bak/src
127    cp hdrs/*.h /var/pennmush-bak/hdrs
128    cp * /var/pennmush-bak
129
130distdepend:
131    (cd src; make depend "CC=$(CC)" "CCFLAGS=$(CCFLAGS)" \
132    "LDFLAGS=$(LDFLAGS)" "CLIBS=$(CLIBS)" )
133
134# REQUIRES GNU INDENT! DON'T INDENT WITH ANYTHING ELSE!
135indent:
136    (cd src; make indent)
137
138protoize:
139    (cd src; make protoize "CCFLAGS=$(CCFLAGS)")
140
141!NO!SUBS!
142
143: This section of the file will have variable substitutions done on it.
144: Move anything that needs config subs from !NO!SUBS! section to !GROK!THIS!.
145: Protect any dollar signs and backticks that you do not want interpreted
146: by putting a backslash in front.  You may delete these comments.
147$spitshell >>Makefile <<!GROK!THIS!
148
149customize: update-conf
150    -@$perl customize.pl
151
152update-conf: game/mushcnf.dst
153    -@$perl update-cnf.pl game/mush.cnf game/mushcnf.dst
154
155game/mush.cnf: game/mushcnf.dst
156    -@$perl update-cnf.pl game/mush.cnf game/mushcnf.dst
157
158update: update-hdr update-conf
159
160update-hdr:
161    -@$perl update.pl options.h options.h.dist
162    -@$perl update.pl dune.h dune.h.dist
163
164!GROK!THIS!
165
166: In the following dollars and backticks do not need the extra backslash.
167$spitshell >>Makefile <<'!NO!SUBS!'
168
169clean:
170    (cd src; make clean)
171    (cd game; rm -f netmush mkindx)
172
173distclean:
174    (cd src; make distclean)
175    (cd hdrs; rm -f *.orig *~ \#* *.rej *.bak)
176    (cd game; rm -rf *.log netmush mkindx *.orig *~ *.bak mush.cnf)
177    (cd game/txt; make clean)
178
179totallyclean: distclean
180    (cd hdrs; rm -rf *.rej)
181    (cd src; rm -rf *.rej)
182    -rm -f Makefile
183
184distci: distclean ci-src ci-game
185
186ci-src:
187    -(yes . | ci -l -f -N$(NAME) FAQ* BUGS CHANGE* READ* Configure \
188      configure update.pl customize.pl Makefile.SH Patchlevel \
189      *.dist src/Makefile src/IDENT/* src/RWHO/* src/*.c hdrs/* hints/* )
190
191ci-game:
192    -(yes . | ci -l -f -N$(NAME) game/restart game/mushcnf.dst \
193      game/txt/* game/txt/nws/* game/txt/evt/* game/txt/hlp/* )
194
195diffs:
196    -(rcsdiff -c -r$(OLD) Patchlevel FAQ* BUGS CHANGE* READ* Configure \
197      configure update.pl customize.pl Makefile.SH \
198      *.dist src/Makefile src/IDENT/* src/RWHO/* src/*.c hdrs/*.h hints/* >> /tmp/diffs)
199
200etags:
201    (cd src; make etags)
202
203ctags:
204    (cd src; make ctags)
205
206dist.tar.Z: distclean dist.tar
207    compress /tmp/dist.tar
208
209dist.tar.gz: distclean dist.tar
210    gzip /tmp/dist.tar
211
212dist.tar: distclean
213    (tar -cvFFfX /tmp/dist.tar exclude.tar \
214        Patchlevel FAQ* BUGS CHANGE* READ* Configure configure \
215        update*.pl customize.pl Makefile.SH config_h.SH confmagic.h \
216        options.h.dist dune.h.dist src hdrs game hints win32)
217    (pgp -sb /tmp/dist.tar)
218
219CSRImalloc.tar.Z:
220    (cd src/CSRI; make clean)
221    (tar -cvFFf /tmp/CSRImalloc.tar `cat exclude.tar`)
222    compress /tmp/CSRImalloc.tar
223
224!NO!SUBS!
225chmod 755 Makefile
Note: See TracBrowser for help on using the browser.