source: trunk/third/cns/src/Makefile.in @ 8794

Revision 8794, 7.3 KB checked in by ghudson, 28 years ago (diff)
From Athena 8.0: Don't try to create the database directory.
Line 
1### Makefile for kerberos tree -- maximal passed arguments
2srcdir = $(C)
3
4prefix = $(R)usr$(S)kerberos
5
6program_transform_name =
7
8##
9
10SHELL = /bin/sh
11
12SUBDIRS = "this is set via configure, don't edit this"
13OTHERS =
14
15INSTALL_TARGET = install
16
17RUNTEST = runtest
18RUNTESTFLAGS =
19
20##DOS!include config\common
21##DOS!include config\mt-win
22#### host and target specific makefile fragments come in here.
23###
24
25
26# The first rule in the file had better be this one.  Don't put any above it.
27all: all-$(WHAT)
28
29all-unix:
30        @for i in $(SUBDIRS); do \
31          if (cd $$i; $(MAKE) $(MFLAGS) "CC=$(CC)" "DBG=$(DBG)" \
32                RESOLV=$(RESOLV) all) ; then \
33            true; \
34          else \
35            exit 1; \
36          fi; \
37        done
38
39# Windows nmake is too stupid to be able to iterate over a list, use
40# semicolons, or keep track of anything but the current directory.
41# unix configure will make all-unix the default in config/common
42all-: all-windows
43all-windows: makefile-windows
44        cd include
45        $(MAKE)
46        cd ..\lib\des
47        $(MAKE)
48        cd ..\kadm
49        $(MAKE)
50        cd ..\kstream
51        $(MAKE)
52        cd ..\krb
53        $(MAKE)
54        cd ..\..\kwin
55        $(MAKE)
56        cd ..\wintel
57        $(MAKE)
58        cd ..
59
60#
61# cygin
62#
63# The all-in-one program that logs you in to a remote Kerberos site
64# in one operation.
65#
66# These rules are sufficient to build this from a working tree, but don't have
67# enough dependencies, so don't use for development!
68cygin: appl/bsd/cygin
69         rm -f cygin
70         ln appl/bsd/cygin .
71
72install-cygin:
73        $(INSTALLPROG) appl/bsd/cygin $(DESTDIR)$(PROGDIR)/cygin
74
75appl/bsd/cygin: include/krb.h lib/kstream/libkstream.a lib/krb/libkrb.a lib/des/libdes.a
76        (cd appl/bsd; $(MAKE) $(MFLAGS) "CC=$(CC)" "DBG=$(DBG)" RESOLV=$(RESOLV) cygin)
77
78include/krb.h:
79        (cd include; $(MAKE) $(MFLAGS) "CC=$(CC)" "DBG=$(DBG)" RESOLV=$(RESOLV) all)
80
81lib/kstream/libkstream.a:
82        (cd lib/kstream; $(MAKE) $(MFLAGS) "CC=$(CC)" "DBG=$(DBG)" RESOLV=$(RESOLV) all)
83
84lib/krb/libkrb.a:
85        (cd lib/krb; $(MAKE) $(MFLAGS) "CC=$(CC)" "DBG=$(DBG)" RESOLV=$(RESOLV) all)
86
87lib/des/libdes.a:
88        (cd lib/des; $(MAKE) $(MFLAGS) "CC=$(CC)" "DBG=$(DBG)" RESOLV=$(RESOLV) all)
89
90roll:
91        for i in $(SUBDIRS); do \
92        (cd $$i; $(MAKE) $(MFLAGS) "CC=$(CC)" "DBG=$(DBG)" RESOLV=$(RESOLV) all);\
93        (cd $$i; $(RM) *.o);\
94        done
95
96depend:
97        for i in $(SUBDIRS); do \
98        (cd $$i; $(MAKE) $(MFLAGS) "CC=$(CC)" "DBG=$(DBG)" depend)\
99        done
100
101install:: install-$(WHAT)
102
103install-unix:
104        @for i in $(SUBDIRS); do \
105          if (cd $$i; $(MAKE) $(MFLAGS) "CC=$(CC)" "DBG=$(DBG)" \
106                DESTDIR=$(DESTDIR) install); \
107            then true; \
108          else \
109            exit 1; \
110          fi; \
111        done
112
113install-windows:
114        copy doc\*.txt floppy
115        copy doc\*.htm floppy
116        cd include
117        $(MAKE) install
118        cd ..\lib\des
119        $(MAKE) install
120        cd ..\kadm
121        $(MAKE) install
122        cd ..\kstream
123        $(MAKE) install
124        cd ..\krb
125        $(MAKE) install
126        cd ..\..\kwin
127        $(MAKE) install
128        cd ..\wintel
129        $(MAKE) install
130        cd ..
131
132install-mac:
133        cp ../doc/*.txt $(DESTDIR)
134        cp ../doc/*.html $(DESTDIR)
135        (cd include; $(MAKE) -f Makefile.in DESTDIR=$(DESTDIR) install-mac)
136        cp lib/krb/mac_stubs.c $(DESTDIR)
137        cp driver/'%CNS Kerberos' $(DESTDIR)
138        cp driver/'%Kerberos Client Preferences' $(DESTDIR)
139        cp kconfig/kconfig/'%CNS Config' $(DESTDIR)
140        cp mactelnet/'%CNS Telnet' $(DESTDIR)
141        rm -f $(DESTDIR)/README
142        echo "Cygnus Network Security release for Macintosh." > $(DESTDIR)/README
143        echo "Full instructions are in mac.txt or mac.html." >> $(DESTDIR)/README
144
145dist:: dist-$(WHAT)
146
147dist-unix::
148
149dist-windows::
150        cd floppy
151        pkzip ..\cns95q1.zip *.*
152
153dist-mac:
154        echo "Run StuffIt on the Mac, with the whole DESTDIR"
155
156
157clean: clean-$(WHAT)
158
159clean-:: clean-unix
160clean-unix:
161        rm -rf tmpdir
162        for i in $(SUBDIRS); do \
163        (cd $$i; $(MAKE) $(MFLAGS) clean)\
164        done
165
166clean-windows:
167        cd lib\des
168        $(MAKE) clean
169        cd ..\kadm
170        $(MAKE) clean
171        cd ..\kstream
172        $(MAKE) clean
173        cd ..\krb
174        $(MAKE) clean
175        cd ..\..\kwin
176        $(MAKE) clean
177        cd ..\wintel
178        $(MAKE) clean
179        cd ..
180        -del include\makefile
181        -del lib\des\makefile
182        -del lib\kadm\makefile
183        -del lib\kstream\makefile
184        -del lib\krb\makefile
185        -del floppy\*.exe
186        -del floppy\*.dll
187        -del floppy\*.lib
188        -del floppy\*.h
189        -del floppy\*.txt
190        -del floppy\*.htm
191        -del makefile
192        -del cns95q1.zip
193
194uninstall:
195        @echo "the uninstall target is not supported in this tree"
196
197# Testsuite targets.
198site.exp: config.status Makefile
199        if [ -f site.exp ]; then \
200          mv site.exp site.bak; \
201        else \
202          touch site.bak; \
203        fi
204        rm -f site.tmp
205        echo "## variables are automatically generated by make ##" > site.tmp
206        echo "# Do not edit here. If you wish to override these" >> site.tmp
207        echo "# values, add them to the last section" >> site.tmp
208        echo "set objdir `pwd`" >> site.tmp
209        echo "## Variables generated by configure. Do Not Edit ##" >> site.tmp
210        cat site.bak | \
211          sed -e '1,/^## Variables generated by.*##/ d' >> site.tmp
212        mv site.tmp site.exp
213
214check: site.exp
215        $(RUNTEST) --tool krb --srcdir $(srcdir)/testsuite $(RUNTESTFLAGS)
216
217#
218# Part of building the Mac release has to be done on Unix at the moment.
219# That's done by `make unixmac'.
220#
221unixmac:
222        (cd include; $(MAKE) -f Makefile.uni unixmac S=/)
223        (cd ../doc; $(MAKE) -f Makefile.in macdoc)
224
225#
226# Rename 8.3 truncated file names back to thier proper unix names
227#
228ren2long:
229        -(cd config; sh ../lib/krb/ren2long.sh)
230        -(cd include; sh ../lib/krb/ren2long.sh)
231        -(cd kwin; sh ../lib/krb/ren2long.sh)
232        -(cd lib/des; sh ../krb/ren2long.sh)
233        -(cd lib/kadm; sh ../krb/ren2long.sh)
234        -(cd lib/kstream; sh ../krb/ren2long.sh)
235        -(cd lib/krb; sh ren2long.sh)
236        -(sh lib/krb/ren2long.sh)
237
238#
239# Build the zip file that distributes Kerberos sources for DOS sites.
240#
241ZIPFILES=config include lib/des lib/krb lib/kadm lib/kstream kwin wintel \
242        Makefile.in configure.in floppy \
243        wconfig.c ren.msg util/et/et_h.awk util/et/et_c.awk ChangeLog
244ZIPBINARYFILES=kwin/*.ico wintel/*.ico
245ZIPEXCLUDE=INCLUDE/.CVS LIB/DES/.CVS LIB/DES/%DESLIB- LIB/KRB/%KRBLIB- \
246        CONFIG/CVS/* INCLUDE/CVS/* LIB/KRB/CVS/* LIB/DES/CVS/* \
247        LIB/DES/DOC/CVS/* LIB/KADM/CVS/* LIB/KSTREAM/CVS/* KWIN/CVS/* \
248        KWIN/*.ICO WINTEL/CVS/* WINTEL/*.ICO
249kerbsrc.zip: force
250        -rm -f kerbsrc.zip
251        awk -f util/et/et_h.awk outfile=lib/krb/krb_err.h lib/krb/krb_err.et
252        awk -f util/et/et_h.awk outfile=lib/kadm/kadm_err.h lib/kadm/kadm_err.et
253        -mkdir floppy
254        cp prototypes/etc.krb.realms floppy/krb.rea
255        cp prototypes/etc.krb.conf floppy/krb.con
256        (cd ../doc; $(MAKE) -f Makefile.in windoc)
257        zip -lrk kerbsrc.zip $(ZIPFILES) -x $(ZIPEXCLUDE)
258        zip -rk kerbsrc.zip $(ZIPBINARYFILES)
259        (cd ..; zip -lrk src/kerbsrc.zip doc -x DOC/CVS/*)
260        rm lib/krb/krb_err.h lib/kadm/kadm_err.h
261        rm -r floppy
262
263force:
264
265# with the gnu make, this is done automatically.
266
267Makefile: $(srcdir)$(S)Makefile.in $(host_makefile_frag) $(target_makefile_frag) $(package_makefile_frag)
268        $(SHELL) ./config.status
269
270makefile-windows: wconfig.c makefile.in config\common config\mt-win \
271        config\host config\postfix lib\des\makefile.in lib\kadm\makefile.in \
272        lib\kstream\makefile.in lib\krb\makefile.in include\makefile.in
273        SET CL=
274        $(CC) /AL /Iinclude wconfig.c
275        .\wconfig <makefile.in >makefile
276        .\wconfig <include\makefile.in >include\makefile
277        .\wconfig <lib\des\makefile.in >lib\des\makefile
278        .\wconfig <lib\kadm\makefile.in >lib\kadm\makefile
279        .\wconfig <lib\kstream\makefile.in >lib\kstream\makefile
280        .\wconfig <lib\krb\makefile.in >lib\krb\makefile
281        del wconfig.obj
282        del wconfig.exe
283
284distclean: distclean-$(WHAT)
285
286distclean-:: distclean-unix
287distclean-unix:: clean-unix
288        for i in $(SUBDIRS); do \
289        (cd $$i; $(MAKE) $(MFLAGS) distclean)\
290        done
291        -rm -f *~ core
292        -rm -f Makefile config.status
293
294# end of Makefile.in
295# NOPOSTFIX
Note: See TracBrowser for help on using the repository browser.