]>
Commit | Line | Data |
---|---|---|
bac41a7b A |
1 | # makefile (top level) |
2 | # | |
3 | # Builds and installs the snacc ASN.1 compiler and libraries. | |
4 | # | |
5 | # MS 92 | |
6 | # | |
5a719ac8 | 7 | # $Header: /cvs/Darwin/src/live/Security/SecuritySNACCRuntime/makefile,v 1.1.1.1 2001/05/18 23:14:04 mb Exp $ |
bac41a7b A |
8 | # $Log: makefile,v $ |
9 | # Revision 1.1.1.1 2001/05/18 23:14:04 mb | |
10 | # Move from private repository to open source repository | |
11 | # | |
12 | # Revision 1.3 2000/12/22 00:00:40 dmitch | |
13 | # Add include makehead.static due to apparently broken autoconf, which now generates empty makehead file. | |
14 | # | |
15 | # Revision 1.2 2000/06/15 18:49:46 dmitch | |
16 | # Trimmed EXAMPLESDIR to comply with reality. | |
17 | # | |
18 | # Revision 1.1.1.1 1999/03/16 18:05:49 aram | |
19 | # Originals from SMIME Free Library. | |
20 | # | |
21 | # Revision 1.15 1997/08/27 15:53:11 wan | |
22 | # Added generic table decoding, debug routines, berdecode, and asnwish. | |
23 | # | |
24 | # Revision 1.14 1997/03/03 11:58:26 wan | |
25 | # Final pre-delivery stuff (I hope). | |
26 | # | |
27 | # Revision 1.13 1997/02/16 19:55:22 rj | |
28 | # remove tcl-p when making clobber | |
29 | # | |
30 | # Revision 1.12 1997/02/16 18:30:33 rj | |
31 | # correct path to configure script | |
32 | # | |
33 | # Revision 1.11 1997/02/16 16:52:05 rj | |
34 | # generate tcl-p before it is needed... | |
35 | # | |
36 | # Revision 1.10 1997/02/15 20:33:33 rj | |
37 | # trick to make making clean/clobber working with gmake: set MAKE_CLEAN_HACK (in makefile), and don't include the dependencies files (in maketail) if it is set. | |
38 | # | |
39 | # Revision 1.9 1995/07/26 21:16:56 rj | |
40 | # distribute tcl-p.c | |
41 | # | |
42 | # Revision 1.8 1995/07/24 14:54:22 rj | |
43 | # type table tools integrated. | |
44 | # | |
45 | # tiny .../tcl-p utility program that returns 0 if snacc's tcl interface is to be made. | |
46 | # | |
47 | # dummy action added to config.h.in and config.h rules to trick many makes' overoptimization. | |
48 | # | |
49 | # Revision 1.7 1995/02/22 09:49:07 rj | |
50 | # turned the phony target `pack-tar' into a true target: $(VDIR).tar.gz. | |
51 | # | |
52 | # Revision 1.6 1995/02/20 11:21:27 rj | |
53 | # use install-sh instead of install.sh. | |
54 | # phony target distclean: don't remove the distributed file configure and stamp-h.in (they cannot be remade everywhere). | |
55 | # | |
56 | # Revision 1.5 1995/02/17 14:26:39 rj | |
57 | # adjustments for autoconf 2.x | |
58 | # | |
59 | # Revision 1.4 1994/10/08 04:42:56 rj | |
60 | # config.h.bot removed. | |
61 | # snacc.h and policy.h added. | |
62 | # | |
63 | # Revision 1.3 1994/09/01 01:34:34 rj | |
64 | # gen-distfiles phony target to generate up-to-date versions of the distfiles. | |
65 | # | |
66 | # Revision 1.2 1994/08/31 23:19:22 rj | |
67 | # a lot of enhancements: | |
68 | # - examples integrated, with some phony targets. | |
69 | # - autoconf stuff gets automatically remade. | |
70 | # - dependency boot strapping (some makes need it). | |
71 | # - distributions via file list, therefore no need to clean the tree and to remove private files. | |
72 | # | |
73 | # Revision 1.1 1994/08/28 09:20:17 rj | |
74 | # first check-in. for a list of changes to 1.1 please refer to the ChangeLog. | |
75 | ||
76 | TOP = . | |
77 | ||
78 | include makehead | |
79 | include makehead.static | |
80 | ||
81 | SUBDIRS = compiler c-lib c++-lib tbl-tools asn1specs doc | |
82 | XDIRS = tcl-lib tcl-asn | |
83 | ||
84 | # Apple change: the tbl-example doesn't run properly; tcl-example doesn't build Skip them. | |
85 | EXAMPLESDIRS = c-examples c++-examples | |
86 | #EXAMPLESDIRS = c-examples c++-examples tbl-example tcl-example | |
87 | ||
88 | DISTFILES = \ | |
89 | COPYING \ | |
90 | README NEWS INSTALL \ | |
91 | ChangeLog version.h \ | |
92 | configure.in configure \ | |
93 | acconfig.h config.h.in stamp-h.in \ | |
94 | policy.h snacc.h \ | |
95 | tcl-p.c \ | |
96 | makefile makehead.in maketail \ | |
97 | mkinstalldirs install-sh | |
98 | ||
99 | #------------------------------------------------------------------------------- | |
100 | ||
101 | .PHONY: default all subdirs $(SUBDIRS) examples $(EXAMPLESDIRS) $(XDIRS) depend c c++ check c-check c++-check install c-install c++-install clean clobber tar | |
102 | ||
103 | default:: compiler c-lib c++-lib tbl-tools tcl-asn | |
104 | ||
105 | tcl-p: $(TCL-P) | |
106 | $(TCL-P): tcl-p.c snacc.h config.h policy.h | |
107 | $(REASON) | |
108 | $(CC) $(CPPFLAGS) $(CFLAGS) -o $@ $< | |
109 | ||
110 | depend $(SUBDIRS) $(EXAMPLESDIRS) $(XDIRS):: config.h version.h | |
111 | ||
112 | # the following hack is needed for older make versions | |
113 | # (gmake doesn't need it): | |
114 | depend:: | |
115 | @for dir in $(SUBDIRS) tbl-example; do\ | |
116 | test -f $$dir/dependencies || touch $$dir/dependencies;\ | |
117 | done | |
118 | @for dir in c-examples c++-examples; do\ | |
119 | (cd $$dir && $(MAKE) init-depend);\ | |
120 | done | |
121 | ||
122 | depend install gen-distfiles:: | |
123 | $(MAKE) subdirs examples xdirs subtarget=$@ | |
124 | ||
125 | clean clobber:: | |
126 | $(MAKE) subdirs examples xdirs subtarget=$@ MAKE_CLEAN_HACK=xyzzy | |
127 | ||
128 | subdirs:: $(SUBDIRS) | |
129 | examples:: $(EXAMPLESDIRS) | |
130 | xdirs:: $(XDIRS) | |
131 | $(SUBDIRS) \ | |
132 | $(EXAMPLESDIRS):: | |
133 | cd $@ && $(MAKE) $(subtarget) | |
134 | tcl-lib:: | |
135 | $(MAKE) $(TCL-P) | |
136 | if $(TCL-P); then cd $@ && $(MAKE) $(subtarget); fi | |
137 | ||
138 | tcl-asn:: | |
139 | $(MAKE) $(TCL-P) | |
140 | if $(TCL-P); then cd $@ && $(MAKE) $(subtarget); fi | |
141 | ||
142 | # compiler, C runtime libraries and type table tools: | |
143 | c:: compiler c-lib tbl-tools tcl-asn | |
144 | c-check:: c c-lib-check tbl-check | |
145 | c-lib-check:: | |
146 | $(MAKE) c-examples subtarget=check | |
147 | tbl-check:: | |
148 | $(MAKE) tbl-example subtarget=check | |
149 | c-install:: | |
150 | $(MAKE) c asn1specs subtarget=install | |
151 | ||
152 | # build compiler and C++ runtime library: | |
153 | c++:: compiler c++-lib tcl-lib | |
154 | c++-check:: c++ | |
155 | c++-check:: | |
156 | $(MAKE) c++-examples subtarget=check | |
157 | c++-install:: | |
158 | $(MAKE) c++ asn1specs subtarget=install | |
159 | ||
160 | # create compiler, build C and C++ runtime lib archive, type table tools, run a few checks: | |
161 | all:: compiler c-lib c++-lib tbl-tools tcl-asn check | |
162 | ||
163 | check:: c-check c++-check | |
164 | ||
165 | $(srcdir)/configure: configure.in | |
166 | $(REASON) | |
167 | cd $(srcdir) && autoconf | |
168 | ||
169 | # autoheader might not change config.h.in, so touch a stamp file | |
170 | $(srcdir)/config.h.in: stamp-h.in | |
171 | @true | |
172 | $(srcdir)/stamp-h.in: configure.in acconfig.h | |
173 | $(REASON) | |
174 | cd ${srcdir} && autoheader | |
175 | date > $@ | |
176 | ||
177 | # config.status might not change config.h | |
178 | config.h: stamp-h | |
179 | @true | |
180 | stamp-h: config.h.in config.status | |
181 | $(REASON) | |
182 | CONFIG_FILES= CONFIG_HEADERS=config.h ./config.status | |
183 | ||
184 | makehead: makehead.in config.status | |
185 | $(REASON) | |
186 | CONFIG_FILES=makehead CONFIG_HEADERS= ./config.status | |
187 | ||
188 | config.status: $(srcdir)/configure | |
189 | $(REASON) | |
190 | ./config.status --recheck | |
191 | ||
192 | clobber distclean:: | |
193 | $(RM) config.log config.cache config.status config.h stamp-h | |
194 | $(RM) $(TCL-P) | |
195 | ||
196 | gen-distfiles:: $(DISTFILES) | |
197 | ||
198 | distfiles:: | |
199 | echo "$(DISTFILES)";\ | |
200 | for dir in $(SUBDIRS) $(EXAMPLESDIRS) $(XDIRS); do\ | |
201 | subfiles=`cd $$dir && $(MAKE) -s $@`;\ | |
202 | for file in $$subfiles; do\ | |
203 | echo "$$dir/$$file";\ | |
204 | done;\ | |
205 | done | |
206 | ||
207 | tar:: gen-distfiles | |
208 | ||
209 | tar:: | |
210 | vdir=snacc-`sed -e '/VERSION/!d' -e 's/.*"\(.*\)".*/\1/' -e q version.h`;\ | |
211 | distfiles=`$(MAKE) -s distfiles ECHO=:`;\ | |
212 | for file in $$distfiles; do\ | |
213 | files="$$files $$vdir/$$file";\ | |
214 | done;\ | |
215 | [ -d $$vdir ] || ln -s . $$vdir;\ | |
216 | $(RM) $$vdir.tar.gz;\ | |
217 | gtar zcvvhf $$vdir.tar.gz $$files;\ | |
218 | $(RM) $$vdir;\ | |
219 | ls -l $$vdir.tar.gz | |
220 | ||
221 | # this one is for internal use only: | |
222 | $(VDIR).tar.gz: $(FILES) | |
223 | $(REASON) | |
224 | $(RM) $@ | |
225 | gtar zcvvhf $@ $(FILES) |