Line 0
Link Here
|
|
|
1 |
--- gnu/makefile.in.orig 2004-04-17 13:28:06 UTC |
2 |
+++ gnu/makefile.in |
3 |
@@ -159,13 +159,16 @@ $(SFXSTUB_DIR)/%.o: $(SRC_DIR)/%.c |
4 |
# Main dependency tree |
5 |
# |
6 |
|
7 |
-.PHONY: timestamp prepare cleanup package help |
8 |
+.PHONY: timestamp msg-headers depends prepare clean package help |
9 |
|
10 |
ifdef COMMERCIAL |
11 |
MAKE_KEY=$(TOOLS_DIR)/make_key$x |
12 |
endif |
13 |
|
14 |
-all: prepare timestamp |
15 |
+all: prepare |
16 |
+ $(MAKE) timestamp |
17 |
+ $(MAKE) msg-headers |
18 |
+ $(MAKE) depends |
19 |
$(MAKE) do-all |
20 |
|
21 |
do-all: \ |
22 |
@@ -175,9 +178,29 @@ do-all: \ |
23 |
$(REGISTER_DIR)/$(REGISTER)$x \ |
24 |
$(ARJDISP_DIR)/arjdisp$x \ |
25 |
$(TOOLS_DIR)/packager$x \ |
26 |
- $(MAKE_KEY) \ |
27 |
- dispose |
28 |
+ $(MAKE_KEY) |
29 |
|
30 |
+MSG_ID := \ |
31 |
+ msg_crp msg_stb msg_sfv msg_sfx msg_sfj msg_arj msg_rej msg_reg msg_adi |
32 |
+MSG_HEADERS := $(patsubst %,$(BASEDIR)/%.h,$(MSG_ID)) |
33 |
+ |
34 |
+msg-headers: $(MSG_HEADERS) |
35 |
+ |
36 |
+.deps: |
37 |
+ mkdir -p $@ |
38 |
+ |
39 |
+.deps/%.d: %.c .deps |
40 |
+ $(CC) $(CPPFLAGS) $(COPT) $< -MM > $@ |
41 |
+ |
42 |
+SOURCES = $(wildcard *.c) |
43 |
+DEPS = $(addprefix .deps/,$(SOURCES:.c=.d)) |
44 |
+ |
45 |
+ifeq ($(sort $(DEPS)),$(sort $(wildcard .deps/*.d))) |
46 |
+include $(DEPS) |
47 |
+endif |
48 |
+ |
49 |
+depends: $(DEPS) |
50 |
+ |
51 |
# |
52 |
# Update timestamp file |
53 |
# |
54 |
@@ -186,12 +209,6 @@ timestamp: $(TOOLS_DIR)/today$x |
55 |
$(TOOLS_DIR)/today$x $(LOCALE) $(BASEDIR) |
56 |
|
57 |
# |
58 |
-# Final cleanup |
59 |
-# |
60 |
- |
61 |
-dispose: |
62 |
- |
63 |
-# |
64 |
# The tools |
65 |
# |
66 |
|
67 |
@@ -255,7 +272,7 @@ $(ARJCRYPT_DIR)/arjcrypt$d: $(ARJCRYPT_OBJS) $(TOOLS_D |
68 |
$(CC) $(ALL_CFLAGS) $(DLL_FLAGS) -o $@ $(ARJCRYPT_OBJS) $(ARJCRYPT_DEF) $(LIBS) |
69 |
$(TOOLS_DIR)/postproc $@ |
70 |
|
71 |
-$(BASEDIR)/nmsg_crp.c: $(TOOLS_DIR)/msgbind$x $(RESFILE) |
72 |
+$(BASEDIR)/nmsg_crp.c $(BASEDIR)/msg_crp.h: $(TOOLS_DIR)/msgbind$x $(RESFILE) |
73 |
$(TOOLS_DIR)/msgbind $(RESFILE) msg_crp $(OS_ID) $(PACKAGE) $(LOCALE) $(BASEDIR) |
74 |
|
75 |
# |
76 |
@@ -269,7 +286,7 @@ $(SFXSTUB_DIR)/sfxstub$x: $(SFXSTUB_OBJS) $(TOOLS_DIR) |
77 |
$(CC) $(ALL_CFLAGS) $(LDFLAGS) -o $@ $(SFXSTUB_OBJS) $(LIBS) |
78 |
$(TOOLS_DIR)/postproc$x $@ -sfx |
79 |
|
80 |
-$(BASEDIR)/nmsg_stb.c: $(TOOLS_DIR)/msgbind$x $(RESFILE) |
81 |
+$(BASEDIR)/nmsg_stb.c $(BASEDIR)/msg_stb.h: $(TOOLS_DIR)/msgbind$x $(RESFILE) |
82 |
$(TOOLS_DIR)/msgbind $(RESFILE) msg_stb $(OS_ID) $(PACKAGE) $(LOCALE) $(BASEDIR) |
83 |
|
84 |
# |
85 |
@@ -287,7 +304,8 @@ $(ARJSFXV_DIR)/arjsfxv$x: $(ARJSFXV_OBJS) $(TOOLS_DIR) |
86 |
$(CC) $(ALL_CFLAGS) $(LDFLAGS) -o $@ $(ARJSFXV_OBJS) $(LIBS) $(DYN_LIBS) |
87 |
$(TOOLS_DIR)/postproc$x $@ -sfx |
88 |
|
89 |
-$(BASEDIR)/fmsg_sfv.c $(BASEDIR)/imsg_sfv.c $(BASEDIR)/nmsg_sfv.c: $(TOOLS_DIR)/msgbind$x $(RESFILE) |
90 |
+$(BASEDIR)/fmsg_sfv.c $(BASEDIR)/imsg_sfv.c $(BASEDIR)/nmsg_sfv.c \ |
91 |
+$(BASEDIR)/msg_sfv.h: $(TOOLS_DIR)/msgbind$x $(RESFILE) |
92 |
$(TOOLS_DIR)/msgbind $(RESFILE) msg_sfv $(OS_ID) $(PACKAGE) $(LOCALE) $(BASEDIR) |
93 |
|
94 |
# |
95 |
@@ -304,7 +322,8 @@ $(ARJSFX_DIR)/arjsfx$x: $(ARJSFX_OBJS) $(TOOLS_DIR)/po |
96 |
$(CC) $(ALL_CFLAGS) $(LDFLAGS) -o $@ $(ARJSFX_OBJS) $(LIBS) |
97 |
$(TOOLS_DIR)/postproc$x $@ -sfx |
98 |
|
99 |
-$(BASEDIR)/fmsg_sfx.c $(BASEDIR)/imsg_sfx.c $(BASEDIR)/nmsg_sfx.c: $(TOOLS_DIR)/msgbind$x $(RESFILE) |
100 |
+$(BASEDIR)/fmsg_sfx.c $(BASEDIR)/imsg_sfx.c $(BASEDIR)/nmsg_sfx.c \ |
101 |
+$(BASEDIR)/msg_sfx.h: $(TOOLS_DIR)/msgbind$x $(RESFILE) |
102 |
$(TOOLS_DIR)/msgbind $(RESFILE) msg_sfx $(OS_ID) $(PACKAGE) $(LOCALE) $(BASEDIR) |
103 |
|
104 |
# |
105 |
@@ -319,7 +338,8 @@ $(ARJSFXJR_DIR)/arjsfxjr$x: $(ARJSFXJR_OBJS) $(TOOLS_D |
106 |
$(CC) $(ALL_CFLAGS) $(LDFLAGS) -o $@ $(ARJSFXJR_OBJS) $(LIBS) |
107 |
$(TOOLS_DIR)/postproc$x $@ -sfx |
108 |
|
109 |
-$(BASEDIR)/fmsg_sfj.c $(BASEDIR)/imsg_sfj.c $(BASEDIR)/nmsg_sfj.c: $(TOOLS_DIR)/msgbind$x $(RESFILE) |
110 |
+$(BASEDIR)/fmsg_sfj.c $(BASEDIR)/imsg_sfj.c $(BASEDIR)/nmsg_sfj.c \ |
111 |
+$(BASEDIR)/msg_sfj.h: $(TOOLS_DIR)/msgbind$x $(RESFILE) |
112 |
$(TOOLS_DIR)/msgbind $(RESFILE) msg_sfj $(OS_ID) $(PACKAGE) $(LOCALE) $(BASEDIR) |
113 |
|
114 |
# |
115 |
@@ -354,7 +374,8 @@ $(ARJ_DIR)/arj$x: $(ARJ_OBJS) \ |
116 |
$(TOOLS_DIR)/join $(ARJ_DIR)/arj$x $(BASEDIR)/help.arj |
117 |
$(TOOLS_DIR)/postproc $@ |
118 |
|
119 |
-$(BASEDIR)/fmsg_arj.c $(BASEDIR)/imsg_arj.c $(BASEDIR)/nmsg_arj.c: $(TOOLS_DIR)/msgbind$x $(RESFILE) |
120 |
+$(BASEDIR)/fmsg_arj.c $(BASEDIR)/imsg_arj.c $(BASEDIR)/nmsg_arj.c \ |
121 |
+$(BASEDIR)/msg_arj.h: $(TOOLS_DIR)/msgbind$x $(RESFILE) |
122 |
$(TOOLS_DIR)/msgbind $(RESFILE) msg_arj $(OS_ID) $(PACKAGE) $(LOCALE) $(BASEDIR) |
123 |
|
124 |
# |
125 |
@@ -372,7 +393,8 @@ $(REARJ_DIR)/rearj$x: $(REARJ_OBJS) \ |
126 |
$(CC) $(ALL_CFLAGS) $(LDFLAGS) -o $@ $(REARJ_OBJS) $(LIBS) |
127 |
$(TOOLS_DIR)/postproc $@ |
128 |
|
129 |
-$(BASEDIR)/fmsg_rej.c $(BASEDIR)/imsg_rej.c $(BASEDIR)/nmsg_rej.c: $(TOOLS_DIR)/msgbind$x $(RESFILE) |
130 |
+$(BASEDIR)/fmsg_rej.c $(BASEDIR)/imsg_rej.c $(BASEDIR)/nmsg_rej.c \ |
131 |
+$(BASEDIR)/msg_rej.h: $(TOOLS_DIR)/msgbind$x $(RESFILE) |
132 |
$(TOOLS_DIR)/msgbind $(RESFILE) msg_rej $(OS_ID) $(PACKAGE) $(LOCALE) $(BASEDIR) |
133 |
|
134 |
# |
135 |
@@ -388,7 +410,8 @@ $(REGISTER_DIR)/$(REGISTER)$x: $(REGISTER_OBJS) \ |
136 |
$(CC) $(ALL_CFLAGS) $(LDFLAGS) -o $@ $(REGISTER_OBJS) $(LIBS) |
137 |
$(TOOLS_DIR)/postproc $@ -sfx |
138 |
|
139 |
-$(BASEDIR)/fmsg_reg.c $(BASEDIR)/imsg_reg.c $(BASEDIR)/nmsg_reg.c: $(TOOLS_DIR)/msgbind$x $(RESFILE) |
140 |
+$(BASEDIR)/fmsg_reg.c $(BASEDIR)/imsg_reg.c $(BASEDIR)/nmsg_reg.c \ |
141 |
+$(BASEDIR)/msg_reg.h: $(TOOLS_DIR)/msgbind$x $(RESFILE) |
142 |
$(TOOLS_DIR)/msgbind $(RESFILE) msg_reg $(OS_ID) $(PACKAGE) $(LOCALE) $(BASEDIR) |
143 |
|
144 |
# |
145 |
@@ -402,7 +425,8 @@ ARJDISP_OBJS = $(patsubst %,$(ARJDISP_DIR)/%, \ |
146 |
$(ARJDISP_DIR)/arjdisp$x: $(ARJDISP_OBJS) |
147 |
$(CC) $(ALL_CFLAGS) $(LDFLAGS) -o $@ $(ARJDISP_OBJS) $(LIBS) |
148 |
|
149 |
-$(BASEDIR)/fmsg_adi.c $(BASEDIR)/imsg_adi.c $(BASEDIR)/nmsg_adi.c: $(TOOLS_DIR)/msgbind$x $(RESFILE) |
150 |
+$(BASEDIR)/fmsg_adi.c $(BASEDIR)/imsg_adi.c $(BASEDIR)/nmsg_adi.c \ |
151 |
+$(BASEDIR)/msg_adi.h: $(TOOLS_DIR)/msgbind$x $(RESFILE) |
152 |
$(TOOLS_DIR)/msgbind $(RESFILE) msg_adi $(OS_ID) $(PACKAGE) $(LOCALE) $(BASEDIR) |
153 |
|
154 |
# |
155 |
@@ -427,18 +451,9 @@ prepare: |
156 |
# |
157 |
|
158 |
clean: |
159 |
- -rm -f $(BASEDIR)/* |
160 |
- -rm -f $(TOOLS_DIR)/* |
161 |
- -rm -f $(ARJCRYPT_DIR)/* |
162 |
- -rm -f $(SFXSTUB_DIR)/* |
163 |
- -rm -f $(ARJSFXV_DIR)/* |
164 |
- -rm -f $(ARJSFX_DIR)/* |
165 |
- -rm -f $(ARJSFXJR_DIR)/* |
166 |
- -rm -f $(ARJ_DIR)/* |
167 |
- -rm -f $(REARJ_DIR)/* |
168 |
- -rm -f $(REGISTER_DIR)/* |
169 |
- -rm -f $(ARJDISP_DIR)/* |
170 |
- -rm -f arj.core |
171 |
+ rm -rf .deps |
172 |
+ rm -rf $(BASEDIR) |
173 |
+ rm -f arj.core |
174 |
|
175 |
# |
176 |
# Local installation |