1VERSION=0.7.1
2PACKAGE=uschedule
3CLASS=admin
4
5
6CC=gcc
7L=./auto-link.sh
8C=./auto-compile.sh
9W=./auto-compilew.sh
10MYMAKE=make
11PACKAGE_VERSION=$(PACKAGE)-$(VERSION)
12PREMAKE_DEFS=-DPACKAGE_VERSION=\"$(PACKAGE)-$(VERSION)\" \
13 -DPACKAGE=\"$(PACKAGE)\" -DVERSION=\"$(VERSION)\" -DPACKAGE_CLASS=\"$(CLASS)\"
14
15TARGETS=$(EXTRA_TARGETS) $(PREMAKE_TARGETS)
16CLEANFILES=$(EXTRA_CLEANFILES) $(PREMAKE_CLEANFILES)
17MAINTAINER_CLEANFILES=$(EXTRA_MAINTAINER_CLEANFILES) $(PREMAKE_MAINTAINER_CLEANFILES)
18PREMAKE_DIST=$(PACKAGE_VERSION).tar.gz
19#
20#
21# the dependency of socket_ux on ipv6 is here because premake2 can't
22# handle it otherwise.
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37PREMAKE_TARGETS = uscheduled uschedulerm uschedulelist uschedulecmd \
38uschedulecp uscheduleedit uschedule uscheduleruntimelimit \
39uscheduleconf uschedule.1 uschedule_intro.7 uschedulecmd.1 \
40uscheduleconf.1 uschedulecp.1 uscheduled.8 uscheduleedit.1 \
41uschedulelist.1 uschedulerm.1 uscheduleruntimelimit.1
42
43PREMAKE_CLEANFILES = check.out t.* conftest* auto-version.tmac \
44install.html.t uschedule.html.t intro.html.t uschedulecmd.html.t \
45uscheduleconf.html.t uschedulecp.html.t uscheduled.html.t \
46uscheduleedit.html.t uschedulelist.html.t uschedulerm.html.t \
47uscheduleruntimelimit.html.t INSTALL.t uschedule.1 uschedule.1.t \
48uschedule_intro.7 uschedule_intro.7.t uschedulecmd.1 uschedulecmd.1.t \
49uscheduleconf.1 uscheduleconf.1.t uschedulecp.1 uschedulecp.1.t \
50uscheduled.8 uscheduled.8.t uscheduleedit.1 uscheduleedit.1.t \
51uschedulelist.1 uschedulelist.1.t uschedulerm.1 uschedulerm.1.t \
52uscheduleruntimelimit.1 uscheduleruntimelimit.1.t auto-typesize.h \
53auto-typesize.stamp *.stamp
54
55PREMAKE_MAINTAINER_CLEANFILES = install.html uschedule.html intro.html \
56uschedulecmd.html uscheduleconf.html uschedulecp.html uscheduled.html \
57uscheduleedit.html uschedulelist.html uschedulerm.html \
58uscheduleruntimelimit.html INSTALL
59
60
61libbyte_a_OBJECTS=byte_chr.o byte_copy.o byte_cr.o byte_diff.o \
62case_lwrtab.o case_starts.o fmt_ulong.o fmt_xlong.o scan_long.o \
63scan_sign.o scan_ulong.o scan_xint64.o str_chr.o str_diff.o str_len.o \
64str_rchr.o str_start.o
65
66libtai_a_OBJECTS=tai_add.o tai_now.o tai_sub.o tai_uint.o taia_add.o \
67taia_approx.o taia_frac.o taia_less.o taia_now.o taia_sub.o taia_tai.o \
68taia_uint.o
69
70libunix_a_OBJECTS=alloc.o alloc_re.o buffer.o buffer_0.o buffer_1.o \
71buffer_2.o buffer_copy.o buffer_get.o buffer_put.o coe.o env_get.o \
72error.o error_str.o gen_alloc_ady.o gen_alloc_end.o gen_alloc_lus.o \
73get_cwd.o getln.o iopause.o ndelay_on.o open_excl.o open_read.o \
74open_readwri.o open_trunc.o open_write.o pathexec_env.o pathexec_run.o \
75sig.o sig_catch.o stralloc_cat.o stralloc_catb.o stralloc_cats.o \
76stralloc_copy.o stralloc_eady.o stralloc_free.o stralloc_num.o \
77stralloc_opyb.o stralloc_opys.o stralloc_pend.o stralloc_plus.o \
78wait_nohang.o wait_pid.o
79
80libuomisc_a_OBJECTS=api_dir.o api_dir_sort.o bailout.o bailout_name.o \
81mssort.o svscan_conf.o uogetopt.o uolock.o wrap_stat.o
82
83libuotime_a_OBJECTS=uo_now.o uo_sec702dt.o
84
85PREMAKE_EXTRA_SYSTYPE =  auto-typesize.h auto-iopause.h
86
87all:  auto-systype $(TARGETS) $(EXTRA_TARGETS)
88
89uscheduled:  uscheduled.o load_jobs.o parse_job.o make_name.o find_next.o change_dir.o parse_sched.o libuomisc.a libunix.a libtai.a libbyte.a auto-link.sh
90	$L uscheduled  uscheduled.o load_jobs.o parse_job.o make_name.o find_next.o change_dir.o parse_sched.o libuomisc.a libunix.a libtai.a libbyte.a
91uschedulerm:  uschedulerm.o load_jobs.o parse_job.o notice.o find_next.o print_job.o change_dir.o parse_sched.o fmt_tai.o libuomisc.a libunix.a libtai.a libbyte.a auto-link.sh
92	$L uschedulerm  uschedulerm.o load_jobs.o parse_job.o notice.o find_next.o print_job.o change_dir.o parse_sched.o fmt_tai.o libuomisc.a libunix.a libtai.a libbyte.a
93uschedulelist:  uschedulelist.o load_jobs.o parse_job.o find_next.o print_job.o change_dir.o parse_sched.o fmt_tai.o make_name.o libuomisc.a libunix.a libtai.a libbyte.a auto-link.sh
94	$L uschedulelist  uschedulelist.o load_jobs.o parse_job.o find_next.o print_job.o change_dir.o parse_sched.o fmt_tai.o make_name.o libuomisc.a libunix.a libtai.a libbyte.a
95uschedulecmd:  uschedulecmd.o change_dir.o make_id.o check_id.o libuomisc.a libunix.a libtai.a libbyte.a auto-link.sh
96	$L uschedulecmd  uschedulecmd.o change_dir.o make_id.o check_id.o libuomisc.a libunix.a libtai.a libbyte.a
97uschedulecp:  uschedulecp.o change_dir.o make_id.o check_id.o libuomisc.a libunix.a libtai.a libbyte.a auto-link.sh
98	$L uschedulecp  uschedulecp.o change_dir.o make_id.o check_id.o libuomisc.a libunix.a libtai.a libbyte.a
99uscheduleedit:  uscheduleedit.o load_jobs.o parse_job.o make_name.o change_dir.o check_id.o libuomisc.a libunix.a libtai.a libbyte.a auto-link.sh
100	$L uscheduleedit  uscheduleedit.o load_jobs.o parse_job.o make_name.o change_dir.o check_id.o libuomisc.a libunix.a libtai.a libbyte.a
101uschedule:  uschedule.o load_jobs.o parse_job.o notice.o make_name.o parse_timespec.o find_next.o change_dir.o parse_sched.o check_id.o libuomisc.a libuotime.a libunix.a libtai.a libbyte.a auto-link.sh
102	$L uschedule  uschedule.o load_jobs.o parse_job.o notice.o make_name.o parse_timespec.o find_next.o change_dir.o parse_sched.o check_id.o libuomisc.a libuotime.a libunix.a libtai.a libbyte.a
103uscheduleruntimelimit:  uscheduleruntimelimit.o libunix.a libtai.a libbyte.a auto-link.sh
104	$L uscheduleruntimelimit  uscheduleruntimelimit.o libunix.a libtai.a libbyte.a
105uscheduleconf:  uscheduleconf.o  libuomisc.a libunix.a libtai.a libbyte.a auto-link.sh
106	$L uscheduleconf  uscheduleconf.o  libuomisc.a libunix.a libtai.a libbyte.a
107auto-typesize.h: auto-typesize.stamp
108auto-typesize.stamp: typesize.sh auto-compile.sh auto-link.sh
109	sh typesize.sh >typesize.t
110	@if cmp typesize.t auto-typesize.h 2>/dev/null >/dev/null ; then : ; else mv typesize.t auto-typesize.h ; fi
111	rm -f typesize.t
112	touch $@
113auto-iopause.h: iopause.sh auto-compile.sh auto-link.sh
114	sh iopause.sh >iopause.t && mv iopause.t $@
115libbyte.a: $(libbyte_a_OBJECTS) auto-makelib.sh
116	./auto-makelib.sh $@ $(libbyte_a_OBJECTS)
117libtai.a: $(libtai_a_OBJECTS) auto-makelib.sh
118	./auto-makelib.sh $@ $(libtai_a_OBJECTS)
119libunix.a: $(libunix_a_OBJECTS) auto-makelib.sh
120	./auto-makelib.sh $@ $(libunix_a_OBJECTS)
121libuomisc.a: $(libuomisc_a_OBJECTS) auto-makelib.sh
122	./auto-makelib.sh $@ $(libuomisc_a_OBJECTS)
123libuotime.a: $(libuotime_a_OBJECTS) auto-makelib.sh
124	./auto-makelib.sh $@ $(libuotime_a_OBJECTS)
125install.html: install.0.in groff.tmac auto-version.tmac
126	groff -mwww -Thtml -P-l groff.tmac auto-version.tmac install.0.in \
127>install.html.t && mv install.html.t install.html
128uschedule.html: uschedule.1.in groff.tmac auto-version.tmac
129	groff -mwww -Thtml -P-l groff.tmac auto-version.tmac uschedule.1.in \
130>uschedule.html.t && mv uschedule.html.t uschedule.html
131intro.html: uschedule_intro.7.in groff.tmac auto-version.tmac
132	groff -mwww -Thtml -P-l groff.tmac auto-version.tmac \
133uschedule_intro.7.in >intro.html.t && mv intro.html.t \
134intro.html
135uschedulecmd.html: uschedulecmd.1.in groff.tmac \
136auto-version.tmac
137	groff -mwww -Thtml -P-l groff.tmac auto-version.tmac uschedulecmd.1.in \
138>uschedulecmd.html.t && mv uschedulecmd.html.t \
139uschedulecmd.html
140uscheduleconf.html: uscheduleconf.1.in groff.tmac \
141auto-version.tmac
142	groff -mwww -Thtml -P-l groff.tmac auto-version.tmac \
143uscheduleconf.1.in >uscheduleconf.html.t && mv uscheduleconf.html.t \
144uscheduleconf.html
145uschedulecp.html: uschedulecp.1.in groff.tmac auto-version.tmac
146	groff -mwww -Thtml -P-l groff.tmac auto-version.tmac uschedulecp.1.in \
147>uschedulecp.html.t && mv uschedulecp.html.t \
148uschedulecp.html
149uscheduled.html: uscheduled.8.in groff.tmac auto-version.tmac
150	groff -mwww -Thtml -P-l groff.tmac auto-version.tmac uscheduled.8.in \
151>uscheduled.html.t && mv uscheduled.html.t \
152uscheduled.html
153uscheduleedit.html: uscheduleedit.1.in groff.tmac \
154auto-version.tmac
155	groff -mwww -Thtml -P-l groff.tmac auto-version.tmac \
156uscheduleedit.1.in >uscheduleedit.html.t && mv uscheduleedit.html.t \
157uscheduleedit.html
158uschedulelist.html: uschedulelist.1.in groff.tmac \
159auto-version.tmac
160	groff -mwww -Thtml -P-l groff.tmac auto-version.tmac \
161uschedulelist.1.in >uschedulelist.html.t && mv uschedulelist.html.t \
162uschedulelist.html
163uschedulerm.html: uschedulerm.1.in groff.tmac auto-version.tmac
164	groff -mwww -Thtml -P-l groff.tmac auto-version.tmac uschedulerm.1.in \
165>uschedulerm.html.t && mv uschedulerm.html.t \
166uschedulerm.html
167uscheduleruntimelimit.html: uscheduleruntimelimit.1.in groff.tmac \
168auto-version.tmac
169	groff -mwww -Thtml -P-l groff.tmac auto-version.tmac \
170uscheduleruntimelimit.1.in >uscheduleruntimelimit.html.t && mv \
171uscheduleruntimelimit.html.t uscheduleruntimelimit.html
172INSTALL: install.0.in groff.tmac auto-version.tmac
173	groff -man -Tascii groff.tmac auto-version.tmac install.0.in |sed \
174's/\o33\[[0-9]*m//g ' |col -b >INSTALL.t && mv INSTALL.t \
175INSTALL
176uschedule.1: uschedule.1.in groff.tmac auto-version.tmac
177	cat groff.tmac auto-version.tmac uschedule.1.in \
178 | sed 's/^.section/.SH/' >uschedule.1.t \
179 && mv uschedule.1.t uschedule.1
180uschedule_intro.7: uschedule_intro.7.in groff.tmac \
181auto-version.tmac
182	cat groff.tmac auto-version.tmac uschedule_intro.7.in \
183 | sed 's/^.section/.SH/' >uschedule_intro.7.t \
184 && mv uschedule_intro.7.t uschedule_intro.7
185uschedulecmd.1: uschedulecmd.1.in groff.tmac auto-version.tmac
186	cat groff.tmac auto-version.tmac uschedulecmd.1.in \
187 | sed 's/^.section/.SH/' >uschedulecmd.1.t \
188 && mv uschedulecmd.1.t uschedulecmd.1
189uscheduleconf.1: uscheduleconf.1.in groff.tmac auto-version.tmac
190	cat groff.tmac auto-version.tmac uscheduleconf.1.in \
191 | sed 's/^.section/.SH/' >uscheduleconf.1.t \
192 && mv uscheduleconf.1.t uscheduleconf.1
193uschedulecp.1: uschedulecp.1.in groff.tmac auto-version.tmac
194	cat groff.tmac auto-version.tmac uschedulecp.1.in \
195 | sed 's/^.section/.SH/' >uschedulecp.1.t \
196 && mv uschedulecp.1.t uschedulecp.1
197uscheduled.8: uscheduled.8.in groff.tmac auto-version.tmac
198	cat groff.tmac auto-version.tmac uscheduled.8.in \
199 | sed 's/^.section/.SH/' >uscheduled.8.t \
200 && mv uscheduled.8.t uscheduled.8
201uscheduleedit.1: uscheduleedit.1.in groff.tmac auto-version.tmac
202	cat groff.tmac auto-version.tmac uscheduleedit.1.in \
203 | sed 's/^.section/.SH/' >uscheduleedit.1.t \
204 && mv uscheduleedit.1.t uscheduleedit.1
205uschedulelist.1: uschedulelist.1.in groff.tmac auto-version.tmac
206	cat groff.tmac auto-version.tmac uschedulelist.1.in \
207 | sed 's/^.section/.SH/' >uschedulelist.1.t \
208 && mv uschedulelist.1.t uschedulelist.1
209uschedulerm.1: uschedulerm.1.in groff.tmac auto-version.tmac
210	cat groff.tmac auto-version.tmac uschedulerm.1.in \
211 | sed 's/^.section/.SH/' >uschedulerm.1.t \
212 && mv uschedulerm.1.t uschedulerm.1
213uscheduleruntimelimit.1: uscheduleruntimelimit.1.in groff.tmac \
214auto-version.tmac
215	cat groff.tmac auto-version.tmac uscheduleruntimelimit.1.in \
216 | sed 's/^.section/.SH/' >uscheduleruntimelimit.1.t \
217 && mv uscheduleruntimelimit.1.t \
218uscheduleruntimelimit.1
219auto-version.tmac: version.tmac.stamp
220version.tmac.stamp: Makefile
221	(echo .ds PA $(PACKAGE) ;\
222	 echo .ds VE $(VERSION) ;\
223	 echo .ds CL $(CLASS) ;\
224	) >auto-version.tmac.t
225	cmp auto-version.tmac auto-version.tmac.t \
226	 || cp auto-version.tmac.t auto-version.tmac
227	touch $@ && rm auto-version.tmac.t
228html: install.html uschedule.html intro.html uschedulecmd.html \
229uscheduleconf.html uschedulecp.html uscheduled.html uscheduleedit.html \
230uschedulelist.html uschedulerm.html uscheduleruntimelimit.html \
231INSTALL
232
233
234alloc.o: alloc.c alloc.h error.h auto-compilew.sh
235	$W  -c alloc.c
236alloc_re.o: alloc_re.c alloc.h byte.h auto-compilew.sh
237	$W  -c alloc_re.c
238api_dir.o: api_dir.c stralloc.h gen_alloc.h str.h api_dir.h auto-compilew.sh
239	$W  -c api_dir.c
240api_dir_sort.o: api_dir_sort.c stralloc.h gen_alloc.h alloc.h str.h \
241 api_dir.h mssort.h uint32.h typesize.h auto-typesize.h auto-compilew.sh
242	$W  -c api_dir_sort.c
243bailout.o: bailout.c error.h buffer.h bailout.h fmt.h auto-compilew.sh
244	$W  -c bailout.c
245bailout_name.o: bailout_name.c bailout.h buffer.h auto-compilew.sh
246	$W  -c bailout_name.c
247buffer.o: buffer.c buffer.h auto-compile.sh
248	$C  -c buffer.c
249buffer_0.o: buffer_0.c readwrite.h buffer.h auto-compile.sh
250	$C  -c buffer_0.c
251buffer_1.o: buffer_1.c readwrite.h buffer.h auto-compile.sh
252	$C  -c buffer_1.c
253buffer_2.o: buffer_2.c readwrite.h buffer.h auto-compile.sh
254	$C  -c buffer_2.c
255buffer_copy.o: buffer_copy.c buffer.h auto-compile.sh
256	$C  -c buffer_copy.c
257buffer_get.o: buffer_get.c buffer.h byte.h error.h auto-compile.sh
258	$C  -c buffer_get.c
259buffer_put.o: buffer_put.c buffer.h str.h byte.h error.h auto-compile.sh
260	$C  -c buffer_put.c
261byte_chr.o: byte_chr.c byte.h auto-compilew.sh
262	$W  -c byte_chr.c
263byte_copy.o: byte_copy.c byte.h auto-compilew.sh
264	$W  -c byte_copy.c
265byte_cr.o: byte_cr.c byte.h auto-compilew.sh
266	$W  -c byte_cr.c
267byte_diff.o: byte_diff.c byte.h auto-compilew.sh
268	$W  -c byte_diff.c
269case_lwrtab.o: case_lwrtab.c case.h auto-compilew.sh
270	$W  -c case_lwrtab.c
271case_starts.o: case_starts.c case.h auto-compilew.sh
272	$W  -c case_starts.c
273change_dir.o: change_dir.c scheduled.h typesize.h auto-typesize.h \
274 taia.h tai.h uint64.h stralloc.h gen_alloc.h attributes.h bailout.h \
275 buffer.h error.h env.h get_cwd.h auto-compilew.sh
276	$W  -c change_dir.c
277check_id.o: check_id.c scheduled.h typesize.h auto-typesize.h taia.h \
278 tai.h uint64.h stralloc.h gen_alloc.h attributes.h bailout.h buffer.h \
279 str.h auto-compilew.sh
280	$W  -c check_id.c
281coe.o: coe.c coe.h auto-compilew.sh
282	$W  -c coe.c
283env_get.o: env_get.c env.h auto-compilew.sh
284	$W  -c env_get.c
285error.o: error.c error.h auto-compilew.sh
286	$W  -c error.c
287error_str.o: error_str.c error.h auto-compilew.sh
288	$W  -c error_str.c
289find_next.o: find_next.c scheduled.h typesize.h auto-typesize.h taia.h \
290 tai.h uint64.h stralloc.h gen_alloc.h attributes.h bailout.h buffer.h \
291 scan.h fmt.h auto-compilew.sh
292	$W  -c find_next.c
293fmt_tai.o: fmt_tai.c fmt_tai.h tai.h uint64.h typesize.h \
294 auto-typesize.h scheduled.h taia.h stralloc.h gen_alloc.h \
295 attributes.h auto-compilew.sh
296	$W  -c fmt_tai.c
297fmt_ulong.o: fmt_ulong.c gen_fmt.h fmt.h auto-compilew.sh
298	$W  -c fmt_ulong.c
299fmt_xlong.o: fmt_xlong.c gen_fmt.h fmt.h auto-compilew.sh
300	$W  -c fmt_xlong.c
301gen_alloc_ady.o: gen_alloc_ady.c alloc.h gen_alloci.h auto-compilew.sh
302	$W  -c gen_alloc_ady.c
303gen_alloc_end.o: gen_alloc_end.c gen_alloci.h byte.h auto-compilew.sh
304	$W  -c gen_alloc_end.c
305gen_alloc_lus.o: gen_alloc_lus.c gen_alloci.h auto-compilew.sh
306	$W  -c gen_alloc_lus.c
307get_cwd.o: get_cwd.c alloc.h error.h stralloc.h gen_alloc.h byte.h \
308 str.h get_cwd.h auto-compilew.sh
309	$W  -c get_cwd.c
310getln.o: getln.c byte.h getln.h buffer.h stralloc.h gen_alloc.h auto-compilew.sh
311	$W  -c getln.c
312iopause.o: iopause.c taia.h tai.h uint64.h typesize.h auto-typesize.h \
313 iopause.h auto-iopause.h auto-compilew.sh
314	$W  -c iopause.c
315load_jobs.o: load_jobs.c scheduled.h typesize.h auto-typesize.h taia.h \
316 tai.h uint64.h stralloc.h gen_alloc.h attributes.h bailout.h buffer.h \
317 error.h str.h byte.h api_dir.h auto-compilew.sh
318	$W  -c load_jobs.c
319make_id.o: make_id.c scheduled.h typesize.h auto-typesize.h taia.h \
320 tai.h uint64.h stralloc.h gen_alloc.h attributes.h open.h bailout.h \
321 buffer.h scan.h error.h api_dir.h auto-compilew.sh
322	$W  -c make_id.c
323make_name.o: make_name.c stralloc.h gen_alloc.h scheduled.h typesize.h \
324 auto-typesize.h taia.h tai.h uint64.h attributes.h bailout.h buffer.h \
325 fmt.h auto-compilew.sh
326	$W  -c make_name.c
327mssort.o: mssort.c mssort.h uint32.h typesize.h auto-typesize.h \
328 alloc.h byte.h auto-compilew.sh
329	$W  -c mssort.c
330ndelay_on.o: ndelay_on.c ndelay.h auto-compilew.sh
331	$W  -c ndelay_on.c
332notice.o: notice.c scheduled.h typesize.h auto-typesize.h taia.h tai.h \
333 uint64.h stralloc.h gen_alloc.h attributes.h bailout.h buffer.h \
334 error.h open.h ndelay.h auto-compilew.sh
335	$W  -c notice.c
336open_excl.o: open_excl.c open.h auto-compilew.sh
337	$W  -c open_excl.c
338open_read.o: open_read.c open.h auto-compilew.sh
339	$W  -c open_read.c
340open_readwri.o: open_readwri.c open.h auto-compilew.sh
341	$W  -c open_readwri.c
342open_trunc.o: open_trunc.c open.h auto-compilew.sh
343	$W  -c open_trunc.c
344open_write.o: open_write.c open.h auto-compilew.sh
345	$W  -c open_write.c
346parse_job.o: parse_job.c scheduled.h typesize.h auto-typesize.h taia.h \
347 tai.h uint64.h stralloc.h gen_alloc.h attributes.h bailout.h buffer.h \
348 scan.h error.h str.h byte.h auto-compilew.sh
349	$W  -c parse_job.c
350parse_sched.o: parse_sched.c scheduled.h typesize.h auto-typesize.h \
351 taia.h tai.h uint64.h stralloc.h gen_alloc.h attributes.h byte.h \
352 scan.h auto-compilew.sh
353	$W  -c parse_sched.c
354parse_timespec.o: parse_timespec.c scheduled.h typesize.h \
355 auto-typesize.h taia.h tai.h uint64.h stralloc.h gen_alloc.h \
356 attributes.h uogetopt.h bailout.h buffer.h str.h scan.h case.h \
357 uotime.h auto-compilew.sh
358	$W  -c parse_timespec.c
359pathexec_env.o: pathexec_env.c stralloc.h gen_alloc.h alloc.h str.h \
360 byte.h env.h pathexec.h auto-compilew.sh
361	$W  -c pathexec_env.c
362pathexec_run.o: pathexec_run.c error.h stralloc.h gen_alloc.h str.h \
363 env.h pathexec.h auto-compilew.sh
364	$W  -c pathexec_run.c
365print_job.o: print_job.c scheduled.h typesize.h auto-typesize.h taia.h \
366 tai.h uint64.h stralloc.h gen_alloc.h attributes.h bailout.h buffer.h \
367 fmt.h str.h error.h fmt_tai.h auto-compilew.sh
368	$W  -c print_job.c
369scan_long.o: scan_long.c gen_scan.h scan.h case.h auto-compilew.sh
370	$W  -c scan_long.c
371scan_sign.o: scan_sign.c scan.h auto-compilew.sh
372	$W  -c scan_sign.c
373scan_ulong.o: scan_ulong.c gen_scan.h scan.h case.h auto-compilew.sh
374	$W  -c scan_ulong.c
375scan_xint64.o: scan_xint64.c gen_scan.h scan.h case.h uint64.h \
376 typesize.h auto-typesize.h auto-compilew.sh
377	$W  -c scan_xint64.c
378sig.o: sig.c sig.h auto-compile.sh
379	$C  -c sig.c
380sig_catch.o: sig_catch.c sig.h auto-compile.sh
381	$C  -c sig_catch.c
382str_chr.o: str_chr.c str.h auto-compilew.sh
383	$W  -c str_chr.c
384str_diff.o: str_diff.c str.h auto-compilew.sh
385	$W  -c str_diff.c
386str_len.o: str_len.c str.h auto-compilew.sh
387	$W  -c str_len.c
388str_rchr.o: str_rchr.c str.h auto-compilew.sh
389	$W  -c str_rchr.c
390str_start.o: str_start.c str.h auto-compilew.sh
391	$W  -c str_start.c
392stralloc_cat.o: stralloc_cat.c stralloc.h gen_alloc.h auto-compilew.sh
393	$W  -c stralloc_cat.c
394stralloc_catb.o: stralloc_catb.c stralloc.h gen_alloc.h byte.h auto-compilew.sh
395	$W  -c stralloc_catb.c
396stralloc_cats.o: stralloc_cats.c str.h stralloc.h gen_alloc.h auto-compilew.sh
397	$W  -c stralloc_cats.c
398stralloc_copy.o: stralloc_copy.c stralloc.h gen_alloc.h auto-compilew.sh
399	$W  -c stralloc_copy.c
400stralloc_eady.o: stralloc_eady.c stralloc.h gen_alloc.h gen_alloci.h auto-compilew.sh
401	$W  -c stralloc_eady.c
402stralloc_free.o: stralloc_free.c stralloc.h gen_alloc.h alloc.h auto-compilew.sh
403	$W  -c stralloc_free.c
404stralloc_num.o: stralloc_num.c stralloc.h gen_alloc.h fmt.h auto-compilew.sh
405	$W  -c stralloc_num.c
406stralloc_opyb.o: stralloc_opyb.c stralloc.h gen_alloc.h byte.h auto-compilew.sh
407	$W  -c stralloc_opyb.c
408stralloc_opys.o: stralloc_opys.c str.h stralloc.h gen_alloc.h auto-compilew.sh
409	$W  -c stralloc_opys.c
410stralloc_pend.o: stralloc_pend.c stralloc.h gen_alloc.h gen_alloci.h auto-compilew.sh
411	$W  -c stralloc_pend.c
412stralloc_plus.o: stralloc_plus.c stralloc.h gen_alloc.h gen_alloci.h auto-compilew.sh
413	$W  -c stralloc_plus.c
414svscan_conf.o: svscan_conf.c buffer.h svscan_conf.h bailout.h str.h \
415 open.h fifo.h error.h attributes.h auto-compilew.sh
416	$W  -c svscan_conf.c
417tai_add.o: tai_add.c tai.h uint64.h typesize.h auto-typesize.h auto-compilew.sh
418	$W  -c tai_add.c
419tai_now.o: tai_now.c tai.h uint64.h typesize.h auto-typesize.h auto-compile.sh
420	$C  -c tai_now.c
421tai_sub.o: tai_sub.c tai.h uint64.h typesize.h auto-typesize.h auto-compilew.sh
422	$W  -c tai_sub.c
423tai_uint.o: tai_uint.c tai.h uint64.h typesize.h auto-typesize.h auto-compilew.sh
424	$W  -c tai_uint.c
425taia_add.o: taia_add.c taia.h tai.h uint64.h typesize.h \
426 auto-typesize.h auto-compilew.sh
427	$W  -c taia_add.c
428taia_approx.o: taia_approx.c taia.h tai.h uint64.h typesize.h \
429 auto-typesize.h auto-compilew.sh
430	$W  -c taia_approx.c
431taia_frac.o: taia_frac.c taia.h tai.h uint64.h typesize.h \
432 auto-typesize.h auto-compilew.sh
433	$W  -c taia_frac.c
434taia_less.o: taia_less.c taia.h tai.h uint64.h typesize.h \
435 auto-typesize.h auto-compilew.sh
436	$W  -c taia_less.c
437taia_now.o: taia_now.c taia.h tai.h uint64.h typesize.h \
438 auto-typesize.h auto-compilew.sh
439	$W  -c taia_now.c
440taia_sub.o: taia_sub.c taia.h tai.h uint64.h typesize.h \
441 auto-typesize.h auto-compilew.sh
442	$W  -c taia_sub.c
443taia_tai.o: taia_tai.c taia.h tai.h uint64.h typesize.h \
444 auto-typesize.h auto-compilew.sh
445	$W  -c taia_tai.c
446taia_uint.o: taia_uint.c taia.h tai.h uint64.h typesize.h \
447 auto-typesize.h auto-compilew.sh
448	$W  -c taia_uint.c
449uo_now.o: uo_now.c uotime.h auto-compilew.sh
450	$W  -c uo_now.c
451uo_sec702dt.o: uo_sec702dt.c uotime.h auto-compilew.sh
452	$W  -c uo_sec702dt.c
453uogetopt.o: uogetopt.c readwrite.h str.h env.h scan.h uogetopt.h \
454 attributes.h auto-compilew.sh
455	$W  -c uogetopt.c
456uolock.o: uolock.c uolock.h auto-compilew.sh
457	$W  -c uolock.c
458uschedule.o: uschedule.c uogetopt.h scheduled.h typesize.h \
459 auto-typesize.h taia.h tai.h uint64.h stralloc.h gen_alloc.h \
460 attributes.h bailout.h buffer.h str.h error.h scan.h fmt.h auto-compilew.sh
461	$W  -c uschedule.c
462uschedulecmd.o: uschedulecmd.c uogetopt.h scheduled.h typesize.h \
463 auto-typesize.h taia.h tai.h uint64.h stralloc.h gen_alloc.h \
464 attributes.h open.h bailout.h buffer.h env.h str.h scan.h error.h auto-compilew.sh
465	$W  -c uschedulecmd.c
466uscheduleconf.o: uscheduleconf.c svscan_conf.h buffer.h bailout.h \
467 str.h env.h scheduled.h typesize.h auto-typesize.h taia.h tai.h \
468 uint64.h stralloc.h gen_alloc.h attributes.h uogetopt.h auto-compilew.sh
469	$W  -c uscheduleconf.c
470uschedulecp.o: uschedulecp.c uogetopt.h scheduled.h typesize.h \
471 auto-typesize.h taia.h tai.h uint64.h stralloc.h gen_alloc.h \
472 attributes.h open.h bailout.h buffer.h error.h auto-compilew.sh
473	$W  -c uschedulecp.c
474uscheduled.o: uscheduled.c scheduled.h typesize.h auto-typesize.h \
475 taia.h tai.h uint64.h stralloc.h gen_alloc.h attributes.h sig.h \
476 iopause.h auto-iopause.h byte.h str.h uogetopt.h open.h pathexec.h \
477 bailout.h buffer.h error.h wait.h fmt.h coe.h env.h uolock.h ndelay.h \
478 wrap_stat.h auto-compilew.sh
479	$W  -c uscheduled.c
480uscheduleedit.o: uscheduleedit.c uogetopt.h scheduled.h typesize.h \
481 auto-typesize.h taia.h tai.h uint64.h stralloc.h gen_alloc.h \
482 attributes.h open.h wait.h bailout.h buffer.h pathexec.h env.h \
483 error.h uolock.h fmt.h wrap_stat.h auto-compilew.sh
484	$W  -c uscheduleedit.c
485uschedulelist.o: uschedulelist.c scheduled.h typesize.h \
486 auto-typesize.h taia.h tai.h uint64.h stralloc.h gen_alloc.h \
487 attributes.h uogetopt.h byte.h bailout.h buffer.h env.h str.h alloc.h \
488 error.h api_dir.h mssort.h uint32.h wrap_stat.h fmt_tai.h scan.h \
489 open.h getln.h auto-compilew.sh
490	$W  -c uschedulelist.c
491uschedulerm.o: uschedulerm.c attributes.h scheduled.h typesize.h \
492 auto-typesize.h taia.h tai.h uint64.h stralloc.h gen_alloc.h \
493 uogetopt.h byte.h bailout.h buffer.h iopause.h auto-iopause.h str.h \
494 fmt.h error.h open.h wrap_stat.h fmt_tai.h auto-compilew.sh
495	$W  -c uschedulerm.c
496uscheduleruntimelimit.o: uscheduleruntimelimit.c scheduled.h \
497 typesize.h auto-typesize.h taia.h tai.h uint64.h stralloc.h \
498 gen_alloc.h attributes.h scan.h fmt.h sig.h auto-compilew.sh
499	$W  -c uscheduleruntimelimit.c
500wait_nohang.o: wait_nohang.c wait.h auto-compilew.sh
501	$W  -c wait_nohang.c
502wait_pid.o: wait_pid.c error.h wait.h auto-compilew.sh
503	$W  -c wait_pid.c
504wrap_stat.o: wrap_stat.c wrap_stat.h typesize.h auto-typesize.h taia.h \
505 tai.h uint64.h auto-compilew.sh
506	$W  -c wrap_stat.c
507rts check: rts-clean  rts-resolve
508rts-clean:
509	rm -f rts-failures
510rts-resolve:
511	@if test -f rts-failures ; then echo The following tests failed: ; \
512cat rts-failures ; exit 1; fi
513.PRECIOUS: Makefile
514remake: clean
515	rm -f auto-compile.sh auto-link.sh auto-compilew.sh auto-makelib.sh
516packageinfo:
517	@echo version="$(VERSION)"
518	@echo package="$(PACKAGE)"
519	@echo class="$(CLASS)"
520
521auto-compile.sh auto-compilew.sh auto-makelib.sh auto-link.sh \
522auto-systype.lfs: guess-compiler.sh auto-compiler-config
523auto-compiler-config: auto-compiler-config.stamp
524auto-config: force
525	@( for i in conf-cc conf-ld conf-ldflags conf-cflags conf-cflagsw \
526	  conf-ar conf-ranlib conf-libs auto-compile.sh auto-compilew.sh \
527	  auto-link.sh auto-makelib.sh ; do \
528	  echo $$i ; if test -f $$i ; then cat $$i ; fi ;  \
529	done ) >$@.t
530	@mv $@.t $@
531auto-compiler-config.stamp: auto-config
532	@if cmp auto-config $@ ; then : ; else \
533	  echo configuration has changed ; \
534	  DEFS='$(DEFS)' INCLUDES='$(INCLUDES)' \
535	  PREMAKE_DEFS='$(PREMAKE_DEFS)' \
536	  sh guess-compiler.sh ; \
537	  rm auto-config ; \
538	  $(MYMAKE) auto-config && mv auto-config $@ ; \
539	fi
540
541maintainer-clean: distclean
542	rm -f Makefile $(MAINTAINER_CLEANFILES)
543distclean: clean
544	rm -f $(DISTCLEANFILES) auto-dummy # to avoid "no arguments" error
545clean spotless: mostlyclean
546	rm -f $(TARGETS) auto-*
547	rm -rf deps
548mostlyclean:
549	rm -f *.o *.a $(CLEANFILES)
550
551NEWS-check:
552	@if sed 1q NEWS | grep -e "$(VERSION)" > /dev/null; then :; else \
553		echo "NEWS not updated; not releasing" 1>&2; \
554		exit 1;                                   \
555	fi
556	@if grep -e "$(VERSION)" ChangeLog > /dev/null; then :; else \
557		echo "ChangeLog not updated; not releasing" 1>&2; \
558		exit 1;                                   \
559	fi
560dist:
561	rm -f $(PREMAKE_DIST)
562	package
563bk-dist: NEWS-check
564	bk tag `echo "Release-$(VERSION)" | sed 's/\./-/g'`
565	$(MYMAKE) dist
566gpg-dist: dist
567	gpg -b --armor $(PREMAKE_DIST)
568force:
569
570auto-systype: auto-typesize.h $(EXTRA_SYSTYPE) $(PREMAKE_EXTRA_SYSTYPE)
571	rm -f $@.t
572	@echo  >>$@.t
573	@echo "PACKAGE: $(PACKAGE) $(VERSION)" >>$@.t
574	@echo "REALNAME: $(REALNAME)" >>$@.t
575	@echo "uname-a:" `uname -a` >>$@.t
576	@echo "uname-s:" `uname -s` >>$@.t
577	@echo "uname-r:" `uname -r` >>$@.t
578	@echo "uname-v:" `uname -v` >>$@.t
579	@echo "uname-m:" `uname -m` >>$@.t
580	@echo "linux-ld.so:" `ls /lib/ld-*.so` >>$@.t
581	@echo "linux-libc.so:" `ls /lib/libc-*.so` >>$@.t
582	cat auto-typesize.h >>$@.t
583	if test "x$(PREMAKE_EXTRA_SYSTYPE)$(EXTRA_SYSTYPE)" = x ; then true ; else \
584	  grep -h systype-info $(PREMAKE_EXTRA_SYSTYPE) $(EXTRA_SYSTYPE) >>$@.t \
585	      || exit 1 ; \
586	fi
587	mv $@.t $@
588
589check: all docheck check.exp
590	sh ./docheck 2>&1 | cat -v | tee check.out | diff -u check.exp -
591