File: Makefile

package info (click to toggle)
bcron 0.09-11%2Bsqueeze1
  • links: PTS
  • area: main
  • in suites: squeeze
  • size: 496 kB
  • ctags: 313
  • sloc: ansic: 2,055; sh: 419; makefile: 113
file content (157 lines) | stat: -rw-r--r-- 3,822 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
# Don't edit Makefile!  Use conf-* for configuration.
#
# Generated by spac see http://untroubled.org/spac/

SHELL=/bin/sh

DEFAULT: all

all: libraries programs docs

bcron-exec: load bcron-exec.o bcron.a
	./load bcron-exec bcron.a -lbg 

bcron-exec.o: compile bcron-exec.c bcron.h
	./compile bcron-exec.c

bcron-sched: load bcron-sched.o bcron.a
	./load bcron-sched bcron.a -lbg 

bcron-sched.o: compile bcron-sched.c bcron.h
	./compile bcron-sched.c

bcron-spool: load bcron-spool.o bcron.a
	./load bcron-spool bcron.a -lbg 

bcron-spool.o: compile bcron-spool.c bcron.h
	./compile bcron-spool.c

bcron-start: load bcron-start.o bcron.a
	./load bcron-start bcron.a -lbg 

bcron-start.o: compile bcron-start.c bcron.h
	./compile bcron-start.c

bcron-update: load bcron-update.o bcron.a
	./load bcron-update bcron.a -lbg 

bcron-update.o: compile bcron-update.c bcron.h
	./compile bcron-update.c

bcron.a: makelib chdir.o connection.o crontab.o crontabs.o job.o ministat.o sendpacket.o tempfile.o time.o timespec-next.o timespec-parse.o
	./makelib bcron.a chdir.o connection.o crontab.o crontabs.o job.o ministat.o sendpacket.o tempfile.o time.o timespec-next.o timespec-parse.o

bcron.html: bcron.texi
	texi2html --toc-file=bcron.html --top-file=bcron.html bcron.texi

bcron.info: bcron.texi
	makeinfo bcron.texi

bcrontab: load bcrontab.o bcron.a
	./load bcrontab bcron.a -lbg-cli -lbg 

bcrontab.o: compile bcrontab.c bcron.h
	./compile bcrontab.c

chdir.o: compile chdir.c bcron.h
	./compile chdir.c

clean: TARGETS
	rm -f `cat TARGETS`

clean-spac: clean AUTOFILES
	rm -f `cat AUTOFILES`

compile: conf-cc conf-bgincs
	( bgincs=`head -n 1 conf-bgincs`; \
	  echo '#!/bin/sh'; \
	  echo 'source=$$1; shift'; \
	  echo 'base=`echo "$$source" | sed -e s:\\\\.c$$::`'; \
	  echo exec `head -n 1 conf-cc` -I. "-I'$${bgincs}'" '-o $${base}.o -c $$source $${1+"$$@"}'; \
	) >compile
	chmod 755 compile

conf_bin.c: conf-bin
	head -n 1 conf-bin | \
	  sed -e 's/"/\\"/g' \
	      -e 's/^/const char conf_bin[] = "/' \
	      -e 's/$$/";/' >conf_bin.c

connection.o: compile connection.c bcron.h
	./compile connection.c

crontab.o: compile crontab.c bcron.h
	./compile crontab.c

crontabs.o: compile crontabs.c bcron.h
	./compile crontabs.c

docs: bcron.info bcron.html

install: installer instcheck
	./installer
	./instcheck

installer: load insthier.o
	./load insthier -lbg-installer -lbg
	mv insthier installer

instcheck: load insthier.o
	./load insthier -lbg-instcheck -lbg
	mv insthier instcheck

insthier.o: compile insthier.c conf_bin.c
	./compile insthier.c

instshow: load insthier.o
	./load insthier -lbg-instshow -lbg
	mv insthier instshow

job.o: compile job.c bcron.h
	./compile job.c

libraries: bcron.a

load: conf-ld conf-bglibs
	( bglibs=`head -n 1 conf-bglibs`; \
	  echo '#!/bin/sh';\
	  echo 'main="$$1"; shift';\
	  echo exec `head -n 1 conf-ld` -L. "-L'$${bglibs}'" '-o "$$main" "$$main.o" $${1+"$$@"}' -lbg-sysdeps; \
	) >load
	chmod 755 load

makelib: 
	( echo '#!/bin/sh'; \
	  echo 'main="$$1"; shift';\
	  echo 'rm -f "$$main"';\
	  echo 'ar cr "$$main" $${1+"$$@"}';\
	  echo 'ranlib "$$main"';\
	) >makelib
	chmod 755 makelib

ministat.o: compile ministat.c bcron.h
	./compile ministat.c

programs: installer instcheck instshow bcron-sched bcrontab bcron-spool bcron-start bcron-update bcron-exec test-sched

sendpacket.o: compile sendpacket.c bcron.h
	./compile sendpacket.c

tempfile.o: compile tempfile.c bcron.h
	./compile tempfile.c

test-sched: load test-sched.o bcron.a
	./load test-sched bcron.a -lbg-cli -lbg 

test-sched.o: compile test-sched.c bcron.h
	./compile test-sched.c

time.o: compile time.c bcron.h
	./compile time.c

timespec-next.o: compile timespec-next.c bcron.h
	./compile timespec-next.c

timespec-parse.o: compile timespec-parse.c bcron.h
	./compile timespec-parse.c