xref: /aoo42x/main/solenv/inc/_tg_zip.mk (revision 534c536d)
1# unroll begin
2
3.IF "$(GUI)"=="WNT"
4command_seperator=&&
5#command_seperator=^
6avoid_cvs_dir=-x "*CVS*" -x "*.svn*"
7.ELIF "$(GUI)"=="OS2"
8command_seperator=&&
9.ELSE
10command_seperator=;
11avoid_cvs_dir=-x "*CVS*" -x "*.svn*"
12
13.ENDIF
14
15.IF "$(ZIP1TARGET)"!=""
16
17ZIP1EXT*=.zip
18.IF "$(common_build_zip)"!=""
19.IF "$(ZIP1LIST:s/LANGDIR//)" == "$(ZIP1LIST)"
20ZIP1TARGETN=$(COMMONBIN)/$(ZIP1TARGET)$(ZIP1EXT)
21.ELSE
22ZIP1TARGETN=$(foreach,i,$(zip1alllangiso) $(COMMONBIN)/$(ZIP1TARGET)_$i$(ZIP1EXT) )
23.ENDIF
24.ELSE			# "$(common_build_zip)"!=""
25.IF "$(ZIP1LIST:s/LANGDIR//)" == "$(ZIP1LIST)"
26ZIP1TARGETN=$(BIN)/$(ZIP1TARGET)$(ZIP1EXT)
27.ELSE
28ZIP1TARGETN=$(foreach,i,$(zip1alllangiso) $(BIN)/$(ZIP1TARGET)_$i$(ZIP1EXT) )
29.ENDIF
30.ENDIF			# "$(common_build_zip)"!=""
31ZIP1DEPFILE=$(subst,$(COMMON_OUTDIR),$(OUTPATH) $(subst,/bin/,/misc/ $(ZIP1TARGETN:s/$(ZIP1EXT)/.dpzz/)))
32ZIPDEPFILES+=$(ZIP1DEPFILE)
33
34ZIP1DIR*=$(ZIPDIR)
35ZIP1FLAGS*=$(ZIPFLAGS)
36.IF "$(zip1generatedlangs)"!=""
37zip1langdirs*=$(alllangiso)
38.ELSE           # "$(zip1generatedlangs)"!=""
39zip1langdirs:=$(shell @-test -d {$(subst,/$(LANGDIR), $(null,$(ZIP1DIR) . $(ZIP1DIR)))}/ && find {$(subst,/$(LANGDIR), $(null,$(ZIP1DIR) . $(ZIP1DIR)))}/ -type d ! -name CVS ! -name ".svn" ! -name "." | sed "s/\.\/\///" | sed "s/\.\///" )
40.ENDIF          # "$(zip1generatedlangs)"!=""
41.IF "$(ZIP1FORCEALLLANG)"!=""
42zip1alllangiso:=$(foreach,i,$(completelangiso) $(foreach,j,$(zip1langdirs) $(eq,$i,$j  $i $(NULL))))
43.ELSE          # "$(ZIP1ALLLANG)" != ""
44zip1alllangiso*:=$(foreach,i,$(alllangiso) $(foreach,j,$(zip1langdirs) $(eq,$i,$j  $i $(NULL))))
45.ENDIF          # "$(ZIP1ALLLANG)" != ""
46.ENDIF			# "$(ZIP1TARGET)"!=""
47
48.IF "$(ZIP1TARGETN)"!=""
49
50ZIP1TMP:=$(mktmp iii)
51
52$(MISC)/$(TARGET).$(PWD:f).$(ZIP1TARGET).dpzz : $(ZIP1TARGETN)
53
54.IF "$(common_build_zip)"!=""
55ZIP1HELPVAR=$(COMMONBIN)/$(ZIP1TARGET)
56.ELSE			# "$(common_build_zip)"!=""
57ZIP1HELPVAR=$(BIN)/$(ZIP1TARGET)
58.ENDIF			# "$(common_build_zip)"!=""
59
60$(ZIP1DEPFILE) :
61	@echo # > $(MISC)/$(@:f)
62.IF "$(common_build_zip)"!=""
63.IF "$(ZIP1DIR)" != ""
64	$(COMMAND_ECHO)-$(MKDIRHIER) $(ZIP1DIR)
65	$(COMMAND_ECHO)$(CDD) $(subst,LANGDIR,. $(subst,/LANGDIR, $(ZIP1DIR))) $(command_seperator) $(ZIPDEP) $(ZIP1FLAGS) -prefix $(subst,LANGDIR,. $(subst,/LANGDIR, $(ZIP1DIR)))/ $(subst,$(OUTPATH),$(COMMON_OUTDIR) $(subst,/misc/,/bin/ $(@:s/.dpzz/$(ZIP1EXT)/))) $(foreach,j,$(ZIP1LIST) "{$(subst,LANGDIR,{$(subst,$(ZIP1TARGET)_, $(@:f:b))} $j )}") $(avoid_cvs_dir) >> $(PWD)/$(PRJ)/$(ROUT)/misc/$(@:f)
66.ELSE			# "$(ZIP1DIR)" != ""
67	$(COMMAND_ECHO)-$(ZIPDEP) $(ZIP1FLAGS) $(subst,$(OUTPATH),$(COMMON_OUTDIR) $(subst,/misc/,/bin/ $(@:s/.dpzz/$(ZIP1EXT)/))) $(foreach,j,$(ZIP1LIST) "{$(subst,LANGDIR,{$(subst,$(ZIP1TARGET)_, $(@:f:b))} $j )}") $(avoid_cvs_dir) >> $(MISC)/$(@:f)
68.ENDIF			# "$(ZIP1DIR)" != ""
69.ELSE			# "$(common_build_zip)"!=""
70.IF "$(ZIP1DIR)" != ""
71	$(COMMAND_ECHO)-$(MKDIRHIER) $(ZIP1DIR)
72	$(COMMAND_ECHO)$(CDD) $(subst,LANGDIR,. $(subst,/LANGDIR, $(ZIP1DIR))) $(command_seperator) $(ZIPDEP) $(ZIP1FLAGS) -prefix $(subst,LANGDIR,. $(subst,/LANGDIR, $(ZIP1DIR)))/ $(subst,/misc/,/bin/ $(@:s/.dpzz/$(ZIP1EXT)/)) $(foreach,j,$(ZIP1LIST) "{$(subst,LANGDIR,{$(subst,$(BIN)/$(ZIP1TARGET)_, $(subst,/misc/,/bin/ $(@:db)))} $j )}") $(avoid_cvs_dir) >> $(PWD)/$(PRJ)/$(ROUT)/misc/$(@:f)
73.ELSE			# "$(ZIP1DIR)" != ""
74	$(COMMAND_ECHO)-$(ZIPDEP) $(ZIP1FLAGS) $(subst,/misc/,/bin/ $(@:s/.dpzz/$(ZIP1EXT)/)) $(foreach,j,$(ZIP1LIST) "{$(subst,LANGDIR,{$(subst,$(BIN)/$(ZIP1TARGET)_, $(subst,/misc/,/bin/ $(@:db)))} $j )}") $(avoid_cvs_dir) >> $(MISC)/$(@:f)
75.ENDIF			# "$(ZIP1DIR)" != ""
76.ENDIF			# "$(common_build_zip)"!=""
77	@echo $(@:n:s#\#/#) : makefile.mk >> $(MISC)/$(@:f)
78
79
80$(ZIP1TARGETN) : delzip $(ZIP1DEPS)
81	@echo "Making:   " $(@:f)
82    @@$(!eq,$?,$(?:s/delzip/zzz/) -$(RM) echo) $(uniq $@ $(subst,$(COMMON_OUTDIR),$(OUTPATH) $@))
83	@$(eq,$?,$(?:s/delzip/zzz/) noop echo ) rebuilding zipfiles
84.IF "$(GUI)" != "OS2"
85	@echo ------------------------------ $(eq,$?,$(?:s/delzip/zzz/) >&$(NULLDEV) )
86.ENDIF
87.IF "$(common_build_zip)"!=""
88.IF "$(ZIP1DIR)" != ""
89	@@-$(GNUCOPY) -p $@ $(ZIP1TMP).$(ZIP1TARGET){$(subst,$(ZIP1HELPVAR),_ $(@:db))}$(ZIP1EXT)
90	$(COMMAND_ECHO)-$(CDD) $(subst,LANGDIR,{$(subst,$(ZIP1HELPVAR)_, $(@:db))} $(ZIP1DIR)) $(command_seperator) zip $(ZIP_VERBOSITY) $(ZIP1FLAGS) $(ZIP1TMP).$(ZIP1TARGET){$(subst,$(ZIP1HELPVAR),_ $(@:db))}$(ZIP1EXT) $(subst,LANGDIR_away/, $(ZIP1LIST:s/LANGDIR/LANGDIR_away/)) -x delzip $(avoid_cvs_dir) $(CHECKZIPRESULT)
91	$(COMMAND_ECHO)$(IFEXIST) $(ZIP1TMP).$(ZIP1TARGET){$(subst,$(ZIP1HELPVAR),_ $(@:db))}$(ZIP1EXT) $(THEN) \
92	    $(PERL) -w $(SOLARENV)/bin/cleanzip.pl $(ZIP1TMP).$(ZIP1TARGET){$(subst,$(ZIP1HELPVAR),_ $(@:db))}$(ZIP1EXT) \
93	    $(FI)
94    $(COMMAND_ECHO)$(COPY) $(ZIP1TMP).$(ZIP1TARGET){$(subst,$(ZIP1HELPVAR),_ $(@:db))}$(ZIP1EXT) $@.$(INPATH)
95    $(COMMAND_ECHO)$(RM) $(ZIP1TMP).$(ZIP1TARGET){$(subst,$(ZIP1HELPVAR),_ $(@:db))}$(ZIP1EXT)
96.ELSE			# "$(ZIP1DIR)" != ""
97	@@-$(GNUCOPY) -p $@ $(subst,$(COMMON_OUTDIR),$(OUTPATH) $@)
98	$(COMMAND_ECHO)zip $(ZIP_VERBOSITY) $(ZIP1FLAGS) $(subst,$(COMMON_OUTDIR),$(OUTPATH) $@) $(foreach,j,$(ZIP1LIST) $(subst,LANGDIR,{$(subst,$(ZIP1HELPVAR)_, $(@:db))} $j )) -x delzip $(avoid_cvs_dir) $(CHECKZIPRESULT)
99	$(COMMAND_ECHO)$(IFEXIST) $(subst,$(COMMON_OUTDIR),$(OUTPATH) $@) $(THEN) \
100	    $(PERL) -w $(SOLARENV)/bin/cleanzip.pl $(subst,$(COMMON_OUTDIR),$(OUTPATH) $@) \
101	    $(FI)
102	@@-$(GNUCOPY) -p $(subst,$(COMMON_OUTDIR),$(OUTPATH) $@) $@.$(INPATH)
103	@-$(RM) $(subst,$(COMMON_OUTDIR),$(OUTPATH) $@)
104.ENDIF			# "$(ZIP1DIR)" != ""
105	@@-$(RM) $@
106	@$(IFEXIST) $@.$(INPATH) $(THEN) $(RENAME:s/+//) $@.$(INPATH) $@ $(FI)
107#	@$(IFEXIST) $@ $(THEN) $(TOUCH) $@ $(FI)  # even if it's not used...
108.ELSE			# "$(common_build_zip)"!=""
109.IF "$(ZIP1DIR)" != ""
110	@@-$(GNUCOPY) -p $@ $(ZIP1TMP).$(ZIP1TARGET){$(subst,$(ZIP1HELPVAR),_ $(@:db))}$(ZIP1EXT)
111	$(COMMAND_ECHO)-$(CDD) $(subst,LANGDIR,{$(subst,$(ZIP1HELPVAR)_, $(@:db))} $(ZIP1DIR)) $(command_seperator) zip $(ZIP_VERBOSITY) $(ZIP1FLAGS) $(ZIP1TMP).$(ZIP1TARGET){$(subst,$(ZIP1HELPVAR),_ $(@:db))}$(ZIP1EXT) $(subst,LANGDIR_away/, $(ZIP1LIST:s/LANGDIR/LANGDIR_away/)) -x delzip  $(avoid_cvs_dir) $(CHECKZIPRESULT)
112	$(COMMAND_ECHO)$(IFEXIST) $(ZIP1TMP).$(ZIP1TARGET){$(subst,$(ZIP1HELPVAR),_ $(@:db))}$(ZIP1EXT) $(THEN) \
113	    $(PERL) -w $(SOLARENV)/bin/cleanzip.pl $(ZIP1TMP).$(ZIP1TARGET){$(subst,$(ZIP1HELPVAR),_ $(@:db))}$(ZIP1EXT) \
114	    $(FI)
115    $(COMMAND_ECHO)$(COPY) $(ZIP1TMP).$(ZIP1TARGET){$(subst,$(ZIP1HELPVAR),_ $(@:db))}$(ZIP1EXT)  $@
116    $(COMMAND_ECHO)$(RM) $(ZIP1TMP).$(ZIP1TARGET){$(subst,$(ZIP1HELPVAR),_ $(@:db))}$(ZIP1EXT)
117.ELSE			# "$(ZIP1DIR)" != ""
118	$(COMMAND_ECHO)zip $(ZIP_VERBOSITY) $(ZIP1FLAGS) $@ $(foreach,j,$(ZIP1LIST) $(subst,LANGDIR,{$(subst,$(BIN)/$(ZIP1TARGET)_, $(@:db))} $j )) -x delzip $(avoid_cvs_dir) $(CHECKZIPRESULT)
119	$(COMMAND_ECHO)$(IFEXIST) $@ $(THEN) \
120	    $(PERL) -w $(SOLARENV)/bin/cleanzip.pl $@ \
121	    $(FI)
122.ENDIF			# "$(ZIP1DIR)" != ""
123.ENDIF			# "$(common_build_zip)"!=""
124.ENDIF
125
126# unroll begin
127
128.IF "$(GUI)"=="WNT"
129command_seperator=&&
130#command_seperator=^
131avoid_cvs_dir=-x "*CVS*" -x "*.svn*"
132.ELIF "$(GUI)"=="OS2"
133command_seperator=&&
134.ELSE
135command_seperator=;
136avoid_cvs_dir=-x "*CVS*" -x "*.svn*"
137
138.ENDIF
139
140.IF "$(ZIP2TARGET)"!=""
141
142ZIP2EXT*=.zip
143.IF "$(common_build_zip)"!=""
144.IF "$(ZIP2LIST:s/LANGDIR//)" == "$(ZIP2LIST)"
145ZIP2TARGETN=$(COMMONBIN)/$(ZIP2TARGET)$(ZIP2EXT)
146.ELSE
147ZIP2TARGETN=$(foreach,i,$(zip2alllangiso) $(COMMONBIN)/$(ZIP2TARGET)_$i$(ZIP2EXT) )
148.ENDIF
149.ELSE			# "$(common_build_zip)"!=""
150.IF "$(ZIP2LIST:s/LANGDIR//)" == "$(ZIP2LIST)"
151ZIP2TARGETN=$(BIN)/$(ZIP2TARGET)$(ZIP2EXT)
152.ELSE
153ZIP2TARGETN=$(foreach,i,$(zip2alllangiso) $(BIN)/$(ZIP2TARGET)_$i$(ZIP2EXT) )
154.ENDIF
155.ENDIF			# "$(common_build_zip)"!=""
156ZIP2DEPFILE=$(subst,$(COMMON_OUTDIR),$(OUTPATH) $(subst,/bin/,/misc/ $(ZIP2TARGETN:s/$(ZIP2EXT)/.dpzz/)))
157ZIPDEPFILES+=$(ZIP2DEPFILE)
158
159ZIP2DIR*=$(ZIPDIR)
160ZIP2FLAGS*=$(ZIPFLAGS)
161.IF "$(zip2generatedlangs)"!=""
162zip2langdirs*=$(alllangiso)
163.ELSE           # "$(zip2generatedlangs)"!=""
164zip2langdirs:=$(shell @-test -d {$(subst,/$(LANGDIR), $(null,$(ZIP2DIR) . $(ZIP2DIR)))}/ && find {$(subst,/$(LANGDIR), $(null,$(ZIP2DIR) . $(ZIP2DIR)))}/ -type d ! -name CVS ! -name ".svn" ! -name "." | sed "s/\.\/\///" | sed "s/\.\///" )
165.ENDIF          # "$(zip2generatedlangs)"!=""
166.IF "$(ZIP2FORCEALLLANG)"!=""
167zip2alllangiso:=$(foreach,i,$(completelangiso) $(foreach,j,$(zip2langdirs) $(eq,$i,$j  $i $(NULL))))
168.ELSE          # "$(ZIP2ALLLANG)" != ""
169zip2alllangiso*:=$(foreach,i,$(alllangiso) $(foreach,j,$(zip2langdirs) $(eq,$i,$j  $i $(NULL))))
170.ENDIF          # "$(ZIP2ALLLANG)" != ""
171.ENDIF			# "$(ZIP2TARGET)"!=""
172
173.IF "$(ZIP2TARGETN)"!=""
174
175ZIP2TMP:=$(mktmp iii)
176
177$(MISC)/$(TARGET).$(PWD:f).$(ZIP2TARGET).dpzz : $(ZIP2TARGETN)
178
179.IF "$(common_build_zip)"!=""
180ZIP2HELPVAR=$(COMMONBIN)/$(ZIP2TARGET)
181.ELSE			# "$(common_build_zip)"!=""
182ZIP2HELPVAR=$(BIN)/$(ZIP2TARGET)
183.ENDIF			# "$(common_build_zip)"!=""
184
185$(ZIP2DEPFILE) :
186	@echo # > $(MISC)/$(@:f)
187.IF "$(common_build_zip)"!=""
188.IF "$(ZIP2DIR)" != ""
189	$(COMMAND_ECHO)-$(MKDIRHIER) $(ZIP2DIR)
190	$(COMMAND_ECHO)$(CDD) $(subst,LANGDIR,. $(subst,/LANGDIR, $(ZIP2DIR))) $(command_seperator) $(ZIPDEP) $(ZIP2FLAGS) -prefix $(subst,LANGDIR,. $(subst,/LANGDIR, $(ZIP2DIR)))/ $(subst,$(OUTPATH),$(COMMON_OUTDIR) $(subst,/misc/,/bin/ $(@:s/.dpzz/$(ZIP2EXT)/))) $(foreach,j,$(ZIP2LIST) "{$(subst,LANGDIR,{$(subst,$(ZIP2TARGET)_, $(@:f:b))} $j )}") $(avoid_cvs_dir) >> $(PWD)/$(PRJ)/$(ROUT)/misc/$(@:f)
191.ELSE			# "$(ZIP2DIR)" != ""
192	$(COMMAND_ECHO)-$(ZIPDEP) $(ZIP2FLAGS) $(subst,$(OUTPATH),$(COMMON_OUTDIR) $(subst,/misc/,/bin/ $(@:s/.dpzz/$(ZIP2EXT)/))) $(foreach,j,$(ZIP2LIST) "{$(subst,LANGDIR,{$(subst,$(ZIP2TARGET)_, $(@:f:b))} $j )}") $(avoid_cvs_dir) >> $(MISC)/$(@:f)
193.ENDIF			# "$(ZIP2DIR)" != ""
194.ELSE			# "$(common_build_zip)"!=""
195.IF "$(ZIP2DIR)" != ""
196	$(COMMAND_ECHO)-$(MKDIRHIER) $(ZIP2DIR)
197	$(COMMAND_ECHO)$(CDD) $(subst,LANGDIR,. $(subst,/LANGDIR, $(ZIP2DIR))) $(command_seperator) $(ZIPDEP) $(ZIP2FLAGS) -prefix $(subst,LANGDIR,. $(subst,/LANGDIR, $(ZIP2DIR)))/ $(subst,/misc/,/bin/ $(@:s/.dpzz/$(ZIP2EXT)/)) $(foreach,j,$(ZIP2LIST) "{$(subst,LANGDIR,{$(subst,$(BIN)/$(ZIP2TARGET)_, $(subst,/misc/,/bin/ $(@:db)))} $j )}") $(avoid_cvs_dir) >> $(PWD)/$(PRJ)/$(ROUT)/misc/$(@:f)
198.ELSE			# "$(ZIP2DIR)" != ""
199	$(COMMAND_ECHO)-$(ZIPDEP) $(ZIP2FLAGS) $(subst,/misc/,/bin/ $(@:s/.dpzz/$(ZIP2EXT)/)) $(foreach,j,$(ZIP2LIST) "{$(subst,LANGDIR,{$(subst,$(BIN)/$(ZIP2TARGET)_, $(subst,/misc/,/bin/ $(@:db)))} $j )}") $(avoid_cvs_dir) >> $(MISC)/$(@:f)
200.ENDIF			# "$(ZIP2DIR)" != ""
201.ENDIF			# "$(common_build_zip)"!=""
202	@echo $(@:n:s#\#/#) : makefile.mk >> $(MISC)/$(@:f)
203
204
205$(ZIP2TARGETN) : delzip $(ZIP2DEPS)
206	@echo "Making:   " $(@:f)
207    @@$(!eq,$?,$(?:s/delzip/zzz/) -$(RM) echo) $(uniq $@ $(subst,$(COMMON_OUTDIR),$(OUTPATH) $@))
208	@$(eq,$?,$(?:s/delzip/zzz/) noop echo ) rebuilding zipfiles
209.IF "$(GUI)" != "OS2"
210	@echo ------------------------------ $(eq,$?,$(?:s/delzip/zzz/) >&$(NULLDEV) )
211.ENDIF
212.IF "$(common_build_zip)"!=""
213.IF "$(ZIP2DIR)" != ""
214	@@-$(GNUCOPY) -p $@ $(ZIP2TMP).$(ZIP2TARGET){$(subst,$(ZIP2HELPVAR),_ $(@:db))}$(ZIP2EXT)
215	$(COMMAND_ECHO)-$(CDD) $(subst,LANGDIR,{$(subst,$(ZIP2HELPVAR)_, $(@:db))} $(ZIP2DIR)) $(command_seperator) zip $(ZIP_VERBOSITY) $(ZIP2FLAGS) $(ZIP2TMP).$(ZIP2TARGET){$(subst,$(ZIP2HELPVAR),_ $(@:db))}$(ZIP2EXT) $(subst,LANGDIR_away/, $(ZIP2LIST:s/LANGDIR/LANGDIR_away/)) -x delzip $(avoid_cvs_dir) $(CHECKZIPRESULT)
216	$(COMMAND_ECHO)$(IFEXIST) $(ZIP2TMP).$(ZIP2TARGET){$(subst,$(ZIP2HELPVAR),_ $(@:db))}$(ZIP2EXT) $(THEN) \
217	    $(PERL) -w $(SOLARENV)/bin/cleanzip.pl $(ZIP2TMP).$(ZIP2TARGET){$(subst,$(ZIP2HELPVAR),_ $(@:db))}$(ZIP2EXT) \
218	    $(FI)
219    $(COMMAND_ECHO)$(COPY) $(ZIP2TMP).$(ZIP2TARGET){$(subst,$(ZIP2HELPVAR),_ $(@:db))}$(ZIP2EXT) $@.$(INPATH)
220    $(COMMAND_ECHO)$(RM) $(ZIP2TMP).$(ZIP2TARGET){$(subst,$(ZIP2HELPVAR),_ $(@:db))}$(ZIP2EXT)
221.ELSE			# "$(ZIP2DIR)" != ""
222	@@-$(GNUCOPY) -p $@ $(subst,$(COMMON_OUTDIR),$(OUTPATH) $@)
223	$(COMMAND_ECHO)zip $(ZIP_VERBOSITY) $(ZIP2FLAGS) $(subst,$(COMMON_OUTDIR),$(OUTPATH) $@) $(foreach,j,$(ZIP2LIST) $(subst,LANGDIR,{$(subst,$(ZIP2HELPVAR)_, $(@:db))} $j )) -x delzip $(avoid_cvs_dir) $(CHECKZIPRESULT)
224	$(COMMAND_ECHO)$(IFEXIST) $(subst,$(COMMON_OUTDIR),$(OUTPATH) $@) $(THEN) \
225	    $(PERL) -w $(SOLARENV)/bin/cleanzip.pl $(subst,$(COMMON_OUTDIR),$(OUTPATH) $@) \
226	    $(FI)
227	@@-$(GNUCOPY) -p $(subst,$(COMMON_OUTDIR),$(OUTPATH) $@) $@.$(INPATH)
228	@-$(RM) $(subst,$(COMMON_OUTDIR),$(OUTPATH) $@)
229.ENDIF			# "$(ZIP2DIR)" != ""
230	@@-$(RM) $@
231	@$(IFEXIST) $@.$(INPATH) $(THEN) $(RENAME:s/+//) $@.$(INPATH) $@ $(FI)
232#	@$(IFEXIST) $@ $(THEN) $(TOUCH) $@ $(FI)  # even if it's not used...
233.ELSE			# "$(common_build_zip)"!=""
234.IF "$(ZIP2DIR)" != ""
235	@@-$(GNUCOPY) -p $@ $(ZIP2TMP).$(ZIP2TARGET){$(subst,$(ZIP2HELPVAR),_ $(@:db))}$(ZIP2EXT)
236	$(COMMAND_ECHO)-$(CDD) $(subst,LANGDIR,{$(subst,$(ZIP2HELPVAR)_, $(@:db))} $(ZIP2DIR)) $(command_seperator) zip $(ZIP_VERBOSITY) $(ZIP2FLAGS) $(ZIP2TMP).$(ZIP2TARGET){$(subst,$(ZIP2HELPVAR),_ $(@:db))}$(ZIP2EXT) $(subst,LANGDIR_away/, $(ZIP2LIST:s/LANGDIR/LANGDIR_away/)) -x delzip  $(avoid_cvs_dir) $(CHECKZIPRESULT)
237	$(COMMAND_ECHO)$(IFEXIST) $(ZIP2TMP).$(ZIP2TARGET){$(subst,$(ZIP2HELPVAR),_ $(@:db))}$(ZIP2EXT) $(THEN) \
238	    $(PERL) -w $(SOLARENV)/bin/cleanzip.pl $(ZIP2TMP).$(ZIP2TARGET){$(subst,$(ZIP2HELPVAR),_ $(@:db))}$(ZIP2EXT) \
239	    $(FI)
240    $(COMMAND_ECHO)$(COPY) $(ZIP2TMP).$(ZIP2TARGET){$(subst,$(ZIP2HELPVAR),_ $(@:db))}$(ZIP2EXT)  $@
241    $(COMMAND_ECHO)$(RM) $(ZIP2TMP).$(ZIP2TARGET){$(subst,$(ZIP2HELPVAR),_ $(@:db))}$(ZIP2EXT)
242.ELSE			# "$(ZIP2DIR)" != ""
243	$(COMMAND_ECHO)zip $(ZIP_VERBOSITY) $(ZIP2FLAGS) $@ $(foreach,j,$(ZIP2LIST) $(subst,LANGDIR,{$(subst,$(BIN)/$(ZIP2TARGET)_, $(@:db))} $j )) -x delzip $(avoid_cvs_dir) $(CHECKZIPRESULT)
244	$(COMMAND_ECHO)$(IFEXIST) $@ $(THEN) \
245	    $(PERL) -w $(SOLARENV)/bin/cleanzip.pl $@ \
246	    $(FI)
247.ENDIF			# "$(ZIP2DIR)" != ""
248.ENDIF			# "$(common_build_zip)"!=""
249.ENDIF
250
251# unroll begin
252
253.IF "$(GUI)"=="WNT"
254command_seperator=&&
255#command_seperator=^
256avoid_cvs_dir=-x "*CVS*" -x "*.svn*"
257.ELIF "$(GUI)"=="OS2"
258command_seperator=&&
259.ELSE
260command_seperator=;
261avoid_cvs_dir=-x "*CVS*" -x "*.svn*"
262
263.ENDIF
264
265.IF "$(ZIP3TARGET)"!=""
266
267ZIP3EXT*=.zip
268.IF "$(common_build_zip)"!=""
269.IF "$(ZIP3LIST:s/LANGDIR//)" == "$(ZIP3LIST)"
270ZIP3TARGETN=$(COMMONBIN)/$(ZIP3TARGET)$(ZIP3EXT)
271.ELSE
272ZIP3TARGETN=$(foreach,i,$(zip3alllangiso) $(COMMONBIN)/$(ZIP3TARGET)_$i$(ZIP3EXT) )
273.ENDIF
274.ELSE			# "$(common_build_zip)"!=""
275.IF "$(ZIP3LIST:s/LANGDIR//)" == "$(ZIP3LIST)"
276ZIP3TARGETN=$(BIN)/$(ZIP3TARGET)$(ZIP3EXT)
277.ELSE
278ZIP3TARGETN=$(foreach,i,$(zip3alllangiso) $(BIN)/$(ZIP3TARGET)_$i$(ZIP3EXT) )
279.ENDIF
280.ENDIF			# "$(common_build_zip)"!=""
281ZIP3DEPFILE=$(subst,$(COMMON_OUTDIR),$(OUTPATH) $(subst,/bin/,/misc/ $(ZIP3TARGETN:s/$(ZIP3EXT)/.dpzz/)))
282ZIPDEPFILES+=$(ZIP3DEPFILE)
283
284ZIP3DIR*=$(ZIPDIR)
285ZIP3FLAGS*=$(ZIPFLAGS)
286.IF "$(zip3generatedlangs)"!=""
287zip3langdirs*=$(alllangiso)
288.ELSE           # "$(zip3generatedlangs)"!=""
289zip3langdirs:=$(shell @-test -d {$(subst,/$(LANGDIR), $(null,$(ZIP3DIR) . $(ZIP3DIR)))}/ && find {$(subst,/$(LANGDIR), $(null,$(ZIP3DIR) . $(ZIP3DIR)))}/ -type d ! -name CVS ! -name ".svn" ! -name "." | sed "s/\.\/\///" | sed "s/\.\///" )
290.ENDIF          # "$(zip3generatedlangs)"!=""
291.IF "$(ZIP3FORCEALLLANG)"!=""
292zip3alllangiso:=$(foreach,i,$(completelangiso) $(foreach,j,$(zip3langdirs) $(eq,$i,$j  $i $(NULL))))
293.ELSE          # "$(ZIP3ALLLANG)" != ""
294zip3alllangiso*:=$(foreach,i,$(alllangiso) $(foreach,j,$(zip3langdirs) $(eq,$i,$j  $i $(NULL))))
295.ENDIF          # "$(ZIP3ALLLANG)" != ""
296.ENDIF			# "$(ZIP3TARGET)"!=""
297
298.IF "$(ZIP3TARGETN)"!=""
299
300ZIP3TMP:=$(mktmp iii)
301
302$(MISC)/$(TARGET).$(PWD:f).$(ZIP3TARGET).dpzz : $(ZIP3TARGETN)
303
304.IF "$(common_build_zip)"!=""
305ZIP3HELPVAR=$(COMMONBIN)/$(ZIP3TARGET)
306.ELSE			# "$(common_build_zip)"!=""
307ZIP3HELPVAR=$(BIN)/$(ZIP3TARGET)
308.ENDIF			# "$(common_build_zip)"!=""
309
310$(ZIP3DEPFILE) :
311	@echo # > $(MISC)/$(@:f)
312.IF "$(common_build_zip)"!=""
313.IF "$(ZIP3DIR)" != ""
314	$(COMMAND_ECHO)-$(MKDIRHIER) $(ZIP3DIR)
315	$(COMMAND_ECHO)$(CDD) $(subst,LANGDIR,. $(subst,/LANGDIR, $(ZIP3DIR))) $(command_seperator) $(ZIPDEP) $(ZIP3FLAGS) -prefix $(subst,LANGDIR,. $(subst,/LANGDIR, $(ZIP3DIR)))/ $(subst,$(OUTPATH),$(COMMON_OUTDIR) $(subst,/misc/,/bin/ $(@:s/.dpzz/$(ZIP3EXT)/))) $(foreach,j,$(ZIP3LIST) "{$(subst,LANGDIR,{$(subst,$(ZIP3TARGET)_, $(@:f:b))} $j )}") $(avoid_cvs_dir) >> $(PWD)/$(PRJ)/$(ROUT)/misc/$(@:f)
316.ELSE			# "$(ZIP3DIR)" != ""
317	$(COMMAND_ECHO)-$(ZIPDEP) $(ZIP3FLAGS) $(subst,$(OUTPATH),$(COMMON_OUTDIR) $(subst,/misc/,/bin/ $(@:s/.dpzz/$(ZIP3EXT)/))) $(foreach,j,$(ZIP3LIST) "{$(subst,LANGDIR,{$(subst,$(ZIP3TARGET)_, $(@:f:b))} $j )}") $(avoid_cvs_dir) >> $(MISC)/$(@:f)
318.ENDIF			# "$(ZIP3DIR)" != ""
319.ELSE			# "$(common_build_zip)"!=""
320.IF "$(ZIP3DIR)" != ""
321	$(COMMAND_ECHO)-$(MKDIRHIER) $(ZIP3DIR)
322	$(COMMAND_ECHO)$(CDD) $(subst,LANGDIR,. $(subst,/LANGDIR, $(ZIP3DIR))) $(command_seperator) $(ZIPDEP) $(ZIP3FLAGS) -prefix $(subst,LANGDIR,. $(subst,/LANGDIR, $(ZIP3DIR)))/ $(subst,/misc/,/bin/ $(@:s/.dpzz/$(ZIP3EXT)/)) $(foreach,j,$(ZIP3LIST) "{$(subst,LANGDIR,{$(subst,$(BIN)/$(ZIP3TARGET)_, $(subst,/misc/,/bin/ $(@:db)))} $j )}") $(avoid_cvs_dir) >> $(PWD)/$(PRJ)/$(ROUT)/misc/$(@:f)
323.ELSE			# "$(ZIP3DIR)" != ""
324	$(COMMAND_ECHO)-$(ZIPDEP) $(ZIP3FLAGS) $(subst,/misc/,/bin/ $(@:s/.dpzz/$(ZIP3EXT)/)) $(foreach,j,$(ZIP3LIST) "{$(subst,LANGDIR,{$(subst,$(BIN)/$(ZIP3TARGET)_, $(subst,/misc/,/bin/ $(@:db)))} $j )}") $(avoid_cvs_dir) >> $(MISC)/$(@:f)
325.ENDIF			# "$(ZIP3DIR)" != ""
326.ENDIF			# "$(common_build_zip)"!=""
327	@echo $(@:n:s#\#/#) : makefile.mk >> $(MISC)/$(@:f)
328
329
330$(ZIP3TARGETN) : delzip $(ZIP3DEPS)
331	@echo "Making:   " $(@:f)
332    @@$(!eq,$?,$(?:s/delzip/zzz/) -$(RM) echo) $(uniq $@ $(subst,$(COMMON_OUTDIR),$(OUTPATH) $@))
333	@$(eq,$?,$(?:s/delzip/zzz/) noop echo ) rebuilding zipfiles
334.IF "$(GUI)" != "OS2"
335	@echo ------------------------------ $(eq,$?,$(?:s/delzip/zzz/) >&$(NULLDEV) )
336.ENDIF
337.IF "$(common_build_zip)"!=""
338.IF "$(ZIP3DIR)" != ""
339	@@-$(GNUCOPY) -p $@ $(ZIP3TMP).$(ZIP3TARGET){$(subst,$(ZIP3HELPVAR),_ $(@:db))}$(ZIP3EXT)
340	$(COMMAND_ECHO)-$(CDD) $(subst,LANGDIR,{$(subst,$(ZIP3HELPVAR)_, $(@:db))} $(ZIP3DIR)) $(command_seperator) zip $(ZIP_VERBOSITY) $(ZIP3FLAGS) $(ZIP3TMP).$(ZIP3TARGET){$(subst,$(ZIP3HELPVAR),_ $(@:db))}$(ZIP3EXT) $(subst,LANGDIR_away/, $(ZIP3LIST:s/LANGDIR/LANGDIR_away/)) -x delzip $(avoid_cvs_dir) $(CHECKZIPRESULT)
341	$(COMMAND_ECHO)$(IFEXIST) $(ZIP3TMP).$(ZIP3TARGET){$(subst,$(ZIP3HELPVAR),_ $(@:db))}$(ZIP3EXT) $(THEN) \
342	    $(PERL) -w $(SOLARENV)/bin/cleanzip.pl $(ZIP3TMP).$(ZIP3TARGET){$(subst,$(ZIP3HELPVAR),_ $(@:db))}$(ZIP3EXT) \
343	    $(FI)
344    $(COMMAND_ECHO)$(COPY) $(ZIP3TMP).$(ZIP3TARGET){$(subst,$(ZIP3HELPVAR),_ $(@:db))}$(ZIP3EXT) $@.$(INPATH)
345    $(COMMAND_ECHO)$(RM) $(ZIP3TMP).$(ZIP3TARGET){$(subst,$(ZIP3HELPVAR),_ $(@:db))}$(ZIP3EXT)
346.ELSE			# "$(ZIP3DIR)" != ""
347	@@-$(GNUCOPY) -p $@ $(subst,$(COMMON_OUTDIR),$(OUTPATH) $@)
348	$(COMMAND_ECHO)zip $(ZIP_VERBOSITY) $(ZIP3FLAGS) $(subst,$(COMMON_OUTDIR),$(OUTPATH) $@) $(foreach,j,$(ZIP3LIST) $(subst,LANGDIR,{$(subst,$(ZIP3HELPVAR)_, $(@:db))} $j )) -x delzip $(avoid_cvs_dir) $(CHECKZIPRESULT)
349	$(COMMAND_ECHO)$(IFEXIST) $(subst,$(COMMON_OUTDIR),$(OUTPATH) $@) $(THEN) \
350	    $(PERL) -w $(SOLARENV)/bin/cleanzip.pl $(subst,$(COMMON_OUTDIR),$(OUTPATH) $@) \
351	    $(FI)
352	@@-$(GNUCOPY) -p $(subst,$(COMMON_OUTDIR),$(OUTPATH) $@) $@.$(INPATH)
353	@-$(RM) $(subst,$(COMMON_OUTDIR),$(OUTPATH) $@)
354.ENDIF			# "$(ZIP3DIR)" != ""
355	@@-$(RM) $@
356	@$(IFEXIST) $@.$(INPATH) $(THEN) $(RENAME:s/+//) $@.$(INPATH) $@ $(FI)
357#	@$(IFEXIST) $@ $(THEN) $(TOUCH) $@ $(FI)  # even if it's not used...
358.ELSE			# "$(common_build_zip)"!=""
359.IF "$(ZIP3DIR)" != ""
360	@@-$(GNUCOPY) -p $@ $(ZIP3TMP).$(ZIP3TARGET){$(subst,$(ZIP3HELPVAR),_ $(@:db))}$(ZIP3EXT)
361	$(COMMAND_ECHO)-$(CDD) $(subst,LANGDIR,{$(subst,$(ZIP3HELPVAR)_, $(@:db))} $(ZIP3DIR)) $(command_seperator) zip $(ZIP_VERBOSITY) $(ZIP3FLAGS) $(ZIP3TMP).$(ZIP3TARGET){$(subst,$(ZIP3HELPVAR),_ $(@:db))}$(ZIP3EXT) $(subst,LANGDIR_away/, $(ZIP3LIST:s/LANGDIR/LANGDIR_away/)) -x delzip  $(avoid_cvs_dir) $(CHECKZIPRESULT)
362	$(COMMAND_ECHO)$(IFEXIST) $(ZIP3TMP).$(ZIP3TARGET){$(subst,$(ZIP3HELPVAR),_ $(@:db))}$(ZIP3EXT) $(THEN) \
363	    $(PERL) -w $(SOLARENV)/bin/cleanzip.pl $(ZIP3TMP).$(ZIP3TARGET){$(subst,$(ZIP3HELPVAR),_ $(@:db))}$(ZIP3EXT) \
364	    $(FI)
365    $(COMMAND_ECHO)$(COPY) $(ZIP3TMP).$(ZIP3TARGET){$(subst,$(ZIP3HELPVAR),_ $(@:db))}$(ZIP3EXT)  $@
366    $(COMMAND_ECHO)$(RM) $(ZIP3TMP).$(ZIP3TARGET){$(subst,$(ZIP3HELPVAR),_ $(@:db))}$(ZIP3EXT)
367.ELSE			# "$(ZIP3DIR)" != ""
368	$(COMMAND_ECHO)zip $(ZIP_VERBOSITY) $(ZIP3FLAGS) $@ $(foreach,j,$(ZIP3LIST) $(subst,LANGDIR,{$(subst,$(BIN)/$(ZIP3TARGET)_, $(@:db))} $j )) -x delzip $(avoid_cvs_dir) $(CHECKZIPRESULT)
369	$(COMMAND_ECHO)$(IFEXIST) $@ $(THEN) \
370	    $(PERL) -w $(SOLARENV)/bin/cleanzip.pl $@ \
371	    $(FI)
372.ENDIF			# "$(ZIP3DIR)" != ""
373.ENDIF			# "$(common_build_zip)"!=""
374.ENDIF
375
376# unroll begin
377
378.IF "$(GUI)"=="WNT"
379command_seperator=&&
380#command_seperator=^
381avoid_cvs_dir=-x "*CVS*" -x "*.svn*"
382.ELIF "$(GUI)"=="OS2"
383command_seperator=&&
384.ELSE
385command_seperator=;
386avoid_cvs_dir=-x "*CVS*" -x "*.svn*"
387
388.ENDIF
389
390.IF "$(ZIP4TARGET)"!=""
391
392ZIP4EXT*=.zip
393.IF "$(common_build_zip)"!=""
394.IF "$(ZIP4LIST:s/LANGDIR//)" == "$(ZIP4LIST)"
395ZIP4TARGETN=$(COMMONBIN)/$(ZIP4TARGET)$(ZIP4EXT)
396.ELSE
397ZIP4TARGETN=$(foreach,i,$(zip4alllangiso) $(COMMONBIN)/$(ZIP4TARGET)_$i$(ZIP4EXT) )
398.ENDIF
399.ELSE			# "$(common_build_zip)"!=""
400.IF "$(ZIP4LIST:s/LANGDIR//)" == "$(ZIP4LIST)"
401ZIP4TARGETN=$(BIN)/$(ZIP4TARGET)$(ZIP4EXT)
402.ELSE
403ZIP4TARGETN=$(foreach,i,$(zip4alllangiso) $(BIN)/$(ZIP4TARGET)_$i$(ZIP4EXT) )
404.ENDIF
405.ENDIF			# "$(common_build_zip)"!=""
406ZIP4DEPFILE=$(subst,$(COMMON_OUTDIR),$(OUTPATH) $(subst,/bin/,/misc/ $(ZIP4TARGETN:s/$(ZIP4EXT)/.dpzz/)))
407ZIPDEPFILES+=$(ZIP4DEPFILE)
408
409ZIP4DIR*=$(ZIPDIR)
410ZIP4FLAGS*=$(ZIPFLAGS)
411.IF "$(zip4generatedlangs)"!=""
412zip4langdirs*=$(alllangiso)
413.ELSE           # "$(zip4generatedlangs)"!=""
414zip4langdirs:=$(shell @-test -d {$(subst,/$(LANGDIR), $(null,$(ZIP4DIR) . $(ZIP4DIR)))}/ && find {$(subst,/$(LANGDIR), $(null,$(ZIP4DIR) . $(ZIP4DIR)))}/ -type d ! -name CVS ! -name ".svn" ! -name "." | sed "s/\.\/\///" | sed "s/\.\///" )
415.ENDIF          # "$(zip4generatedlangs)"!=""
416.IF "$(ZIP4FORCEALLLANG)"!=""
417zip4alllangiso:=$(foreach,i,$(completelangiso) $(foreach,j,$(zip4langdirs) $(eq,$i,$j  $i $(NULL))))
418.ELSE          # "$(ZIP4ALLLANG)" != ""
419zip4alllangiso*:=$(foreach,i,$(alllangiso) $(foreach,j,$(zip4langdirs) $(eq,$i,$j  $i $(NULL))))
420.ENDIF          # "$(ZIP4ALLLANG)" != ""
421.ENDIF			# "$(ZIP4TARGET)"!=""
422
423.IF "$(ZIP4TARGETN)"!=""
424
425ZIP4TMP:=$(mktmp iii)
426
427$(MISC)/$(TARGET).$(PWD:f).$(ZIP4TARGET).dpzz : $(ZIP4TARGETN)
428
429.IF "$(common_build_zip)"!=""
430ZIP4HELPVAR=$(COMMONBIN)/$(ZIP4TARGET)
431.ELSE			# "$(common_build_zip)"!=""
432ZIP4HELPVAR=$(BIN)/$(ZIP4TARGET)
433.ENDIF			# "$(common_build_zip)"!=""
434
435$(ZIP4DEPFILE) :
436	@echo # > $(MISC)/$(@:f)
437.IF "$(common_build_zip)"!=""
438.IF "$(ZIP4DIR)" != ""
439	$(COMMAND_ECHO)-$(MKDIRHIER) $(ZIP4DIR)
440	$(COMMAND_ECHO)$(CDD) $(subst,LANGDIR,. $(subst,/LANGDIR, $(ZIP4DIR))) $(command_seperator) $(ZIPDEP) $(ZIP4FLAGS) -prefix $(subst,LANGDIR,. $(subst,/LANGDIR, $(ZIP4DIR)))/ $(subst,$(OUTPATH),$(COMMON_OUTDIR) $(subst,/misc/,/bin/ $(@:s/.dpzz/$(ZIP4EXT)/))) $(foreach,j,$(ZIP4LIST) "{$(subst,LANGDIR,{$(subst,$(ZIP4TARGET)_, $(@:f:b))} $j )}") $(avoid_cvs_dir) >> $(PWD)/$(PRJ)/$(ROUT)/misc/$(@:f)
441.ELSE			# "$(ZIP4DIR)" != ""
442	$(COMMAND_ECHO)-$(ZIPDEP) $(ZIP4FLAGS) $(subst,$(OUTPATH),$(COMMON_OUTDIR) $(subst,/misc/,/bin/ $(@:s/.dpzz/$(ZIP4EXT)/))) $(foreach,j,$(ZIP4LIST) "{$(subst,LANGDIR,{$(subst,$(ZIP4TARGET)_, $(@:f:b))} $j )}") $(avoid_cvs_dir) >> $(MISC)/$(@:f)
443.ENDIF			# "$(ZIP4DIR)" != ""
444.ELSE			# "$(common_build_zip)"!=""
445.IF "$(ZIP4DIR)" != ""
446	$(COMMAND_ECHO)-$(MKDIRHIER) $(ZIP4DIR)
447	$(COMMAND_ECHO)$(CDD) $(subst,LANGDIR,. $(subst,/LANGDIR, $(ZIP4DIR))) $(command_seperator) $(ZIPDEP) $(ZIP4FLAGS) -prefix $(subst,LANGDIR,. $(subst,/LANGDIR, $(ZIP4DIR)))/ $(subst,/misc/,/bin/ $(@:s/.dpzz/$(ZIP4EXT)/)) $(foreach,j,$(ZIP4LIST) "{$(subst,LANGDIR,{$(subst,$(BIN)/$(ZIP4TARGET)_, $(subst,/misc/,/bin/ $(@:db)))} $j )}") $(avoid_cvs_dir) >> $(PWD)/$(PRJ)/$(ROUT)/misc/$(@:f)
448.ELSE			# "$(ZIP4DIR)" != ""
449	$(COMMAND_ECHO)-$(ZIPDEP) $(ZIP4FLAGS) $(subst,/misc/,/bin/ $(@:s/.dpzz/$(ZIP4EXT)/)) $(foreach,j,$(ZIP4LIST) "{$(subst,LANGDIR,{$(subst,$(BIN)/$(ZIP4TARGET)_, $(subst,/misc/,/bin/ $(@:db)))} $j )}") $(avoid_cvs_dir) >> $(MISC)/$(@:f)
450.ENDIF			# "$(ZIP4DIR)" != ""
451.ENDIF			# "$(common_build_zip)"!=""
452	@echo $(@:n:s#\#/#) : makefile.mk >> $(MISC)/$(@:f)
453
454
455$(ZIP4TARGETN) : delzip $(ZIP4DEPS)
456	@echo "Making:   " $(@:f)
457    @@$(!eq,$?,$(?:s/delzip/zzz/) -$(RM) echo) $(uniq $@ $(subst,$(COMMON_OUTDIR),$(OUTPATH) $@))
458	@$(eq,$?,$(?:s/delzip/zzz/) noop echo ) rebuilding zipfiles
459.IF "$(GUI)" != "OS2"
460	@echo ------------------------------ $(eq,$?,$(?:s/delzip/zzz/) >&$(NULLDEV) )
461.ENDIF
462.IF "$(common_build_zip)"!=""
463.IF "$(ZIP4DIR)" != ""
464	@@-$(GNUCOPY) -p $@ $(ZIP4TMP).$(ZIP4TARGET){$(subst,$(ZIP4HELPVAR),_ $(@:db))}$(ZIP4EXT)
465	$(COMMAND_ECHO)-$(CDD) $(subst,LANGDIR,{$(subst,$(ZIP4HELPVAR)_, $(@:db))} $(ZIP4DIR)) $(command_seperator) zip $(ZIP_VERBOSITY) $(ZIP4FLAGS) $(ZIP4TMP).$(ZIP4TARGET){$(subst,$(ZIP4HELPVAR),_ $(@:db))}$(ZIP4EXT) $(subst,LANGDIR_away/, $(ZIP4LIST:s/LANGDIR/LANGDIR_away/)) -x delzip $(avoid_cvs_dir) $(CHECKZIPRESULT)
466	$(COMMAND_ECHO)$(IFEXIST) $(ZIP4TMP).$(ZIP4TARGET){$(subst,$(ZIP4HELPVAR),_ $(@:db))}$(ZIP4EXT) $(THEN) \
467	    $(PERL) -w $(SOLARENV)/bin/cleanzip.pl $(ZIP4TMP).$(ZIP4TARGET){$(subst,$(ZIP4HELPVAR),_ $(@:db))}$(ZIP4EXT) \
468	    $(FI)
469    $(COMMAND_ECHO)$(COPY) $(ZIP4TMP).$(ZIP4TARGET){$(subst,$(ZIP4HELPVAR),_ $(@:db))}$(ZIP4EXT) $@.$(INPATH)
470    $(COMMAND_ECHO)$(RM) $(ZIP4TMP).$(ZIP4TARGET){$(subst,$(ZIP4HELPVAR),_ $(@:db))}$(ZIP4EXT)
471.ELSE			# "$(ZIP4DIR)" != ""
472	@@-$(GNUCOPY) -p $@ $(subst,$(COMMON_OUTDIR),$(OUTPATH) $@)
473	$(COMMAND_ECHO)zip $(ZIP_VERBOSITY) $(ZIP4FLAGS) $(subst,$(COMMON_OUTDIR),$(OUTPATH) $@) $(foreach,j,$(ZIP4LIST) $(subst,LANGDIR,{$(subst,$(ZIP4HELPVAR)_, $(@:db))} $j )) -x delzip $(avoid_cvs_dir) $(CHECKZIPRESULT)
474	$(COMMAND_ECHO)$(IFEXIST) $(subst,$(COMMON_OUTDIR),$(OUTPATH) $@) $(THEN) \
475	    $(PERL) -w $(SOLARENV)/bin/cleanzip.pl $(subst,$(COMMON_OUTDIR),$(OUTPATH) $@) \
476	    $(FI)
477	@@-$(GNUCOPY) -p $(subst,$(COMMON_OUTDIR),$(OUTPATH) $@) $@.$(INPATH)
478	@-$(RM) $(subst,$(COMMON_OUTDIR),$(OUTPATH) $@)
479.ENDIF			# "$(ZIP4DIR)" != ""
480	@@-$(RM) $@
481	@$(IFEXIST) $@.$(INPATH) $(THEN) $(RENAME:s/+//) $@.$(INPATH) $@ $(FI)
482#	@$(IFEXIST) $@ $(THEN) $(TOUCH) $@ $(FI)  # even if it's not used...
483.ELSE			# "$(common_build_zip)"!=""
484.IF "$(ZIP4DIR)" != ""
485	@@-$(GNUCOPY) -p $@ $(ZIP4TMP).$(ZIP4TARGET){$(subst,$(ZIP4HELPVAR),_ $(@:db))}$(ZIP4EXT)
486	$(COMMAND_ECHO)-$(CDD) $(subst,LANGDIR,{$(subst,$(ZIP4HELPVAR)_, $(@:db))} $(ZIP4DIR)) $(command_seperator) zip $(ZIP_VERBOSITY) $(ZIP4FLAGS) $(ZIP4TMP).$(ZIP4TARGET){$(subst,$(ZIP4HELPVAR),_ $(@:db))}$(ZIP4EXT) $(subst,LANGDIR_away/, $(ZIP4LIST:s/LANGDIR/LANGDIR_away/)) -x delzip  $(avoid_cvs_dir) $(CHECKZIPRESULT)
487	$(COMMAND_ECHO)$(IFEXIST) $(ZIP4TMP).$(ZIP4TARGET){$(subst,$(ZIP4HELPVAR),_ $(@:db))}$(ZIP4EXT) $(THEN) \
488	    $(PERL) -w $(SOLARENV)/bin/cleanzip.pl $(ZIP4TMP).$(ZIP4TARGET){$(subst,$(ZIP4HELPVAR),_ $(@:db))}$(ZIP4EXT) \
489	    $(FI)
490    $(COMMAND_ECHO)$(COPY) $(ZIP4TMP).$(ZIP4TARGET){$(subst,$(ZIP4HELPVAR),_ $(@:db))}$(ZIP4EXT)  $@
491    $(COMMAND_ECHO)$(RM) $(ZIP4TMP).$(ZIP4TARGET){$(subst,$(ZIP4HELPVAR),_ $(@:db))}$(ZIP4EXT)
492.ELSE			# "$(ZIP4DIR)" != ""
493	$(COMMAND_ECHO)zip $(ZIP_VERBOSITY) $(ZIP4FLAGS) $@ $(foreach,j,$(ZIP4LIST) $(subst,LANGDIR,{$(subst,$(BIN)/$(ZIP4TARGET)_, $(@:db))} $j )) -x delzip $(avoid_cvs_dir) $(CHECKZIPRESULT)
494	$(COMMAND_ECHO)$(IFEXIST) $@ $(THEN) \
495	    $(PERL) -w $(SOLARENV)/bin/cleanzip.pl $@ \
496	    $(FI)
497.ENDIF			# "$(ZIP4DIR)" != ""
498.ENDIF			# "$(common_build_zip)"!=""
499.ENDIF
500
501# unroll begin
502
503.IF "$(GUI)"=="WNT"
504command_seperator=&&
505#command_seperator=^
506avoid_cvs_dir=-x "*CVS*" -x "*.svn*"
507.ELIF "$(GUI)"=="OS2"
508command_seperator=&&
509.ELSE
510command_seperator=;
511avoid_cvs_dir=-x "*CVS*" -x "*.svn*"
512
513.ENDIF
514
515.IF "$(ZIP5TARGET)"!=""
516
517ZIP5EXT*=.zip
518.IF "$(common_build_zip)"!=""
519.IF "$(ZIP5LIST:s/LANGDIR//)" == "$(ZIP5LIST)"
520ZIP5TARGETN=$(COMMONBIN)/$(ZIP5TARGET)$(ZIP5EXT)
521.ELSE
522ZIP5TARGETN=$(foreach,i,$(zip5alllangiso) $(COMMONBIN)/$(ZIP5TARGET)_$i$(ZIP5EXT) )
523.ENDIF
524.ELSE			# "$(common_build_zip)"!=""
525.IF "$(ZIP5LIST:s/LANGDIR//)" == "$(ZIP5LIST)"
526ZIP5TARGETN=$(BIN)/$(ZIP5TARGET)$(ZIP5EXT)
527.ELSE
528ZIP5TARGETN=$(foreach,i,$(zip5alllangiso) $(BIN)/$(ZIP5TARGET)_$i$(ZIP5EXT) )
529.ENDIF
530.ENDIF			# "$(common_build_zip)"!=""
531ZIP5DEPFILE=$(subst,$(COMMON_OUTDIR),$(OUTPATH) $(subst,/bin/,/misc/ $(ZIP5TARGETN:s/$(ZIP5EXT)/.dpzz/)))
532ZIPDEPFILES+=$(ZIP5DEPFILE)
533
534ZIP5DIR*=$(ZIPDIR)
535ZIP5FLAGS*=$(ZIPFLAGS)
536.IF "$(zip5generatedlangs)"!=""
537zip5langdirs*=$(alllangiso)
538.ELSE           # "$(zip5generatedlangs)"!=""
539zip5langdirs:=$(shell @-test -d {$(subst,/$(LANGDIR), $(null,$(ZIP5DIR) . $(ZIP5DIR)))}/ && find {$(subst,/$(LANGDIR), $(null,$(ZIP5DIR) . $(ZIP5DIR)))}/ -type d ! -name CVS ! -name ".svn" ! -name "." | sed "s/\.\/\///" | sed "s/\.\///" )
540.ENDIF          # "$(zip5generatedlangs)"!=""
541.IF "$(ZIP5FORCEALLLANG)"!=""
542zip5alllangiso:=$(foreach,i,$(completelangiso) $(foreach,j,$(zip5langdirs) $(eq,$i,$j  $i $(NULL))))
543.ELSE          # "$(ZIP5ALLLANG)" != ""
544zip5alllangiso*:=$(foreach,i,$(alllangiso) $(foreach,j,$(zip5langdirs) $(eq,$i,$j  $i $(NULL))))
545.ENDIF          # "$(ZIP5ALLLANG)" != ""
546.ENDIF			# "$(ZIP5TARGET)"!=""
547
548.IF "$(ZIP5TARGETN)"!=""
549
550ZIP5TMP:=$(mktmp iii)
551
552$(MISC)/$(TARGET).$(PWD:f).$(ZIP5TARGET).dpzz : $(ZIP5TARGETN)
553
554.IF "$(common_build_zip)"!=""
555ZIP5HELPVAR=$(COMMONBIN)/$(ZIP5TARGET)
556.ELSE			# "$(common_build_zip)"!=""
557ZIP5HELPVAR=$(BIN)/$(ZIP5TARGET)
558.ENDIF			# "$(common_build_zip)"!=""
559
560$(ZIP5DEPFILE) :
561	@echo # > $(MISC)/$(@:f)
562.IF "$(common_build_zip)"!=""
563.IF "$(ZIP5DIR)" != ""
564	$(COMMAND_ECHO)-$(MKDIRHIER) $(ZIP5DIR)
565	$(COMMAND_ECHO)$(CDD) $(subst,LANGDIR,. $(subst,/LANGDIR, $(ZIP5DIR))) $(command_seperator) $(ZIPDEP) $(ZIP5FLAGS) -prefix $(subst,LANGDIR,. $(subst,/LANGDIR, $(ZIP5DIR)))/ $(subst,$(OUTPATH),$(COMMON_OUTDIR) $(subst,/misc/,/bin/ $(@:s/.dpzz/$(ZIP5EXT)/))) $(foreach,j,$(ZIP5LIST) "{$(subst,LANGDIR,{$(subst,$(ZIP5TARGET)_, $(@:f:b))} $j )}") $(avoid_cvs_dir) >> $(PWD)/$(PRJ)/$(ROUT)/misc/$(@:f)
566.ELSE			# "$(ZIP5DIR)" != ""
567	$(COMMAND_ECHO)-$(ZIPDEP) $(ZIP5FLAGS) $(subst,$(OUTPATH),$(COMMON_OUTDIR) $(subst,/misc/,/bin/ $(@:s/.dpzz/$(ZIP5EXT)/))) $(foreach,j,$(ZIP5LIST) "{$(subst,LANGDIR,{$(subst,$(ZIP5TARGET)_, $(@:f:b))} $j )}") $(avoid_cvs_dir) >> $(MISC)/$(@:f)
568.ENDIF			# "$(ZIP5DIR)" != ""
569.ELSE			# "$(common_build_zip)"!=""
570.IF "$(ZIP5DIR)" != ""
571	$(COMMAND_ECHO)-$(MKDIRHIER) $(ZIP5DIR)
572	$(COMMAND_ECHO)$(CDD) $(subst,LANGDIR,. $(subst,/LANGDIR, $(ZIP5DIR))) $(command_seperator) $(ZIPDEP) $(ZIP5FLAGS) -prefix $(subst,LANGDIR,. $(subst,/LANGDIR, $(ZIP5DIR)))/ $(subst,/misc/,/bin/ $(@:s/.dpzz/$(ZIP5EXT)/)) $(foreach,j,$(ZIP5LIST) "{$(subst,LANGDIR,{$(subst,$(BIN)/$(ZIP5TARGET)_, $(subst,/misc/,/bin/ $(@:db)))} $j )}") $(avoid_cvs_dir) >> $(PWD)/$(PRJ)/$(ROUT)/misc/$(@:f)
573.ELSE			# "$(ZIP5DIR)" != ""
574	$(COMMAND_ECHO)-$(ZIPDEP) $(ZIP5FLAGS) $(subst,/misc/,/bin/ $(@:s/.dpzz/$(ZIP5EXT)/)) $(foreach,j,$(ZIP5LIST) "{$(subst,LANGDIR,{$(subst,$(BIN)/$(ZIP5TARGET)_, $(subst,/misc/,/bin/ $(@:db)))} $j )}") $(avoid_cvs_dir) >> $(MISC)/$(@:f)
575.ENDIF			# "$(ZIP5DIR)" != ""
576.ENDIF			# "$(common_build_zip)"!=""
577	@echo $(@:n:s#\#/#) : makefile.mk >> $(MISC)/$(@:f)
578
579
580$(ZIP5TARGETN) : delzip $(ZIP5DEPS)
581	@echo "Making:   " $(@:f)
582    @@$(!eq,$?,$(?:s/delzip/zzz/) -$(RM) echo) $(uniq $@ $(subst,$(COMMON_OUTDIR),$(OUTPATH) $@))
583	@$(eq,$?,$(?:s/delzip/zzz/) noop echo ) rebuilding zipfiles
584.IF "$(GUI)" != "OS2"
585	@echo ------------------------------ $(eq,$?,$(?:s/delzip/zzz/) >&$(NULLDEV) )
586.ENDIF
587.IF "$(common_build_zip)"!=""
588.IF "$(ZIP5DIR)" != ""
589	@@-$(GNUCOPY) -p $@ $(ZIP5TMP).$(ZIP5TARGET){$(subst,$(ZIP5HELPVAR),_ $(@:db))}$(ZIP5EXT)
590	$(COMMAND_ECHO)-$(CDD) $(subst,LANGDIR,{$(subst,$(ZIP5HELPVAR)_, $(@:db))} $(ZIP5DIR)) $(command_seperator) zip $(ZIP_VERBOSITY) $(ZIP5FLAGS) $(ZIP5TMP).$(ZIP5TARGET){$(subst,$(ZIP5HELPVAR),_ $(@:db))}$(ZIP5EXT) $(subst,LANGDIR_away/, $(ZIP5LIST:s/LANGDIR/LANGDIR_away/)) -x delzip $(avoid_cvs_dir) $(CHECKZIPRESULT)
591	$(COMMAND_ECHO)$(IFEXIST) $(ZIP5TMP).$(ZIP5TARGET){$(subst,$(ZIP5HELPVAR),_ $(@:db))}$(ZIP5EXT) $(THEN) \
592	    $(PERL) -w $(SOLARENV)/bin/cleanzip.pl $(ZIP5TMP).$(ZIP5TARGET){$(subst,$(ZIP5HELPVAR),_ $(@:db))}$(ZIP5EXT) \
593	    $(FI)
594    $(COMMAND_ECHO)$(COPY) $(ZIP5TMP).$(ZIP5TARGET){$(subst,$(ZIP5HELPVAR),_ $(@:db))}$(ZIP5EXT) $@.$(INPATH)
595    $(COMMAND_ECHO)$(RM) $(ZIP5TMP).$(ZIP5TARGET){$(subst,$(ZIP5HELPVAR),_ $(@:db))}$(ZIP5EXT)
596.ELSE			# "$(ZIP5DIR)" != ""
597	@@-$(GNUCOPY) -p $@ $(subst,$(COMMON_OUTDIR),$(OUTPATH) $@)
598	$(COMMAND_ECHO)zip $(ZIP_VERBOSITY) $(ZIP5FLAGS) $(subst,$(COMMON_OUTDIR),$(OUTPATH) $@) $(foreach,j,$(ZIP5LIST) $(subst,LANGDIR,{$(subst,$(ZIP5HELPVAR)_, $(@:db))} $j )) -x delzip $(avoid_cvs_dir) $(CHECKZIPRESULT)
599	$(COMMAND_ECHO)$(IFEXIST) $(subst,$(COMMON_OUTDIR),$(OUTPATH) $@) $(THEN) \
600	    $(PERL) -w $(SOLARENV)/bin/cleanzip.pl $(subst,$(COMMON_OUTDIR),$(OUTPATH) $@) \
601	    $(FI)
602	@@-$(GNUCOPY) -p $(subst,$(COMMON_OUTDIR),$(OUTPATH) $@) $@.$(INPATH)
603	@-$(RM) $(subst,$(COMMON_OUTDIR),$(OUTPATH) $@)
604.ENDIF			# "$(ZIP5DIR)" != ""
605	@@-$(RM) $@
606	@$(IFEXIST) $@.$(INPATH) $(THEN) $(RENAME:s/+//) $@.$(INPATH) $@ $(FI)
607#	@$(IFEXIST) $@ $(THEN) $(TOUCH) $@ $(FI)  # even if it's not used...
608.ELSE			# "$(common_build_zip)"!=""
609.IF "$(ZIP5DIR)" != ""
610	@@-$(GNUCOPY) -p $@ $(ZIP5TMP).$(ZIP5TARGET){$(subst,$(ZIP5HELPVAR),_ $(@:db))}$(ZIP5EXT)
611	$(COMMAND_ECHO)-$(CDD) $(subst,LANGDIR,{$(subst,$(ZIP5HELPVAR)_, $(@:db))} $(ZIP5DIR)) $(command_seperator) zip $(ZIP_VERBOSITY) $(ZIP5FLAGS) $(ZIP5TMP).$(ZIP5TARGET){$(subst,$(ZIP5HELPVAR),_ $(@:db))}$(ZIP5EXT) $(subst,LANGDIR_away/, $(ZIP5LIST:s/LANGDIR/LANGDIR_away/)) -x delzip  $(avoid_cvs_dir) $(CHECKZIPRESULT)
612	$(COMMAND_ECHO)$(IFEXIST) $(ZIP5TMP).$(ZIP5TARGET){$(subst,$(ZIP5HELPVAR),_ $(@:db))}$(ZIP5EXT) $(THEN) \
613	    $(PERL) -w $(SOLARENV)/bin/cleanzip.pl $(ZIP5TMP).$(ZIP5TARGET){$(subst,$(ZIP5HELPVAR),_ $(@:db))}$(ZIP5EXT) \
614	    $(FI)
615    $(COMMAND_ECHO)$(COPY) $(ZIP5TMP).$(ZIP5TARGET){$(subst,$(ZIP5HELPVAR),_ $(@:db))}$(ZIP5EXT)  $@
616    $(COMMAND_ECHO)$(RM) $(ZIP5TMP).$(ZIP5TARGET){$(subst,$(ZIP5HELPVAR),_ $(@:db))}$(ZIP5EXT)
617.ELSE			# "$(ZIP5DIR)" != ""
618	$(COMMAND_ECHO)zip $(ZIP_VERBOSITY) $(ZIP5FLAGS) $@ $(foreach,j,$(ZIP5LIST) $(subst,LANGDIR,{$(subst,$(BIN)/$(ZIP5TARGET)_, $(@:db))} $j )) -x delzip $(avoid_cvs_dir) $(CHECKZIPRESULT)
619	$(COMMAND_ECHO)$(IFEXIST) $@ $(THEN) \
620	    $(PERL) -w $(SOLARENV)/bin/cleanzip.pl $@ \
621	    $(FI)
622.ENDIF			# "$(ZIP5DIR)" != ""
623.ENDIF			# "$(common_build_zip)"!=""
624.ENDIF
625
626# unroll begin
627
628.IF "$(GUI)"=="WNT"
629command_seperator=&&
630#command_seperator=^
631avoid_cvs_dir=-x "*CVS*" -x "*.svn*"
632.ELIF "$(GUI)"=="OS2"
633command_seperator=&&
634.ELSE
635command_seperator=;
636avoid_cvs_dir=-x "*CVS*" -x "*.svn*"
637
638.ENDIF
639
640.IF "$(ZIP6TARGET)"!=""
641
642ZIP6EXT*=.zip
643.IF "$(common_build_zip)"!=""
644.IF "$(ZIP6LIST:s/LANGDIR//)" == "$(ZIP6LIST)"
645ZIP6TARGETN=$(COMMONBIN)/$(ZIP6TARGET)$(ZIP6EXT)
646.ELSE
647ZIP6TARGETN=$(foreach,i,$(zip6alllangiso) $(COMMONBIN)/$(ZIP6TARGET)_$i$(ZIP6EXT) )
648.ENDIF
649.ELSE			# "$(common_build_zip)"!=""
650.IF "$(ZIP6LIST:s/LANGDIR//)" == "$(ZIP6LIST)"
651ZIP6TARGETN=$(BIN)/$(ZIP6TARGET)$(ZIP6EXT)
652.ELSE
653ZIP6TARGETN=$(foreach,i,$(zip6alllangiso) $(BIN)/$(ZIP6TARGET)_$i$(ZIP6EXT) )
654.ENDIF
655.ENDIF			# "$(common_build_zip)"!=""
656ZIP6DEPFILE=$(subst,$(COMMON_OUTDIR),$(OUTPATH) $(subst,/bin/,/misc/ $(ZIP6TARGETN:s/$(ZIP6EXT)/.dpzz/)))
657ZIPDEPFILES+=$(ZIP6DEPFILE)
658
659ZIP6DIR*=$(ZIPDIR)
660ZIP6FLAGS*=$(ZIPFLAGS)
661.IF "$(zip6generatedlangs)"!=""
662zip6langdirs*=$(alllangiso)
663.ELSE           # "$(zip6generatedlangs)"!=""
664zip6langdirs:=$(shell @-test -d {$(subst,/$(LANGDIR), $(null,$(ZIP6DIR) . $(ZIP6DIR)))}/ && find {$(subst,/$(LANGDIR), $(null,$(ZIP6DIR) . $(ZIP6DIR)))}/ -type d ! -name CVS ! -name ".svn" ! -name "." | sed "s/\.\/\///" | sed "s/\.\///" )
665.ENDIF          # "$(zip6generatedlangs)"!=""
666.IF "$(ZIP6FORCEALLLANG)"!=""
667zip6alllangiso:=$(foreach,i,$(completelangiso) $(foreach,j,$(zip6langdirs) $(eq,$i,$j  $i $(NULL))))
668.ELSE          # "$(ZIP6ALLLANG)" != ""
669zip6alllangiso*:=$(foreach,i,$(alllangiso) $(foreach,j,$(zip6langdirs) $(eq,$i,$j  $i $(NULL))))
670.ENDIF          # "$(ZIP6ALLLANG)" != ""
671.ENDIF			# "$(ZIP6TARGET)"!=""
672
673.IF "$(ZIP6TARGETN)"!=""
674
675ZIP6TMP:=$(mktmp iii)
676
677$(MISC)/$(TARGET).$(PWD:f).$(ZIP6TARGET).dpzz : $(ZIP6TARGETN)
678
679.IF "$(common_build_zip)"!=""
680ZIP6HELPVAR=$(COMMONBIN)/$(ZIP6TARGET)
681.ELSE			# "$(common_build_zip)"!=""
682ZIP6HELPVAR=$(BIN)/$(ZIP6TARGET)
683.ENDIF			# "$(common_build_zip)"!=""
684
685$(ZIP6DEPFILE) :
686	@echo # > $(MISC)/$(@:f)
687.IF "$(common_build_zip)"!=""
688.IF "$(ZIP6DIR)" != ""
689	$(COMMAND_ECHO)-$(MKDIRHIER) $(ZIP6DIR)
690	$(COMMAND_ECHO)$(CDD) $(subst,LANGDIR,. $(subst,/LANGDIR, $(ZIP6DIR))) $(command_seperator) $(ZIPDEP) $(ZIP6FLAGS) -prefix $(subst,LANGDIR,. $(subst,/LANGDIR, $(ZIP6DIR)))/ $(subst,$(OUTPATH),$(COMMON_OUTDIR) $(subst,/misc/,/bin/ $(@:s/.dpzz/$(ZIP6EXT)/))) $(foreach,j,$(ZIP6LIST) "{$(subst,LANGDIR,{$(subst,$(ZIP6TARGET)_, $(@:f:b))} $j )}") $(avoid_cvs_dir) >> $(PWD)/$(PRJ)/$(ROUT)/misc/$(@:f)
691.ELSE			# "$(ZIP6DIR)" != ""
692	$(COMMAND_ECHO)-$(ZIPDEP) $(ZIP6FLAGS) $(subst,$(OUTPATH),$(COMMON_OUTDIR) $(subst,/misc/,/bin/ $(@:s/.dpzz/$(ZIP6EXT)/))) $(foreach,j,$(ZIP6LIST) "{$(subst,LANGDIR,{$(subst,$(ZIP6TARGET)_, $(@:f:b))} $j )}") $(avoid_cvs_dir) >> $(MISC)/$(@:f)
693.ENDIF			# "$(ZIP6DIR)" != ""
694.ELSE			# "$(common_build_zip)"!=""
695.IF "$(ZIP6DIR)" != ""
696	$(COMMAND_ECHO)-$(MKDIRHIER) $(ZIP6DIR)
697	$(COMMAND_ECHO)$(CDD) $(subst,LANGDIR,. $(subst,/LANGDIR, $(ZIP6DIR))) $(command_seperator) $(ZIPDEP) $(ZIP6FLAGS) -prefix $(subst,LANGDIR,. $(subst,/LANGDIR, $(ZIP6DIR)))/ $(subst,/misc/,/bin/ $(@:s/.dpzz/$(ZIP6EXT)/)) $(foreach,j,$(ZIP6LIST) "{$(subst,LANGDIR,{$(subst,$(BIN)/$(ZIP6TARGET)_, $(subst,/misc/,/bin/ $(@:db)))} $j )}") $(avoid_cvs_dir) >> $(PWD)/$(PRJ)/$(ROUT)/misc/$(@:f)
698.ELSE			# "$(ZIP6DIR)" != ""
699	$(COMMAND_ECHO)-$(ZIPDEP) $(ZIP6FLAGS) $(subst,/misc/,/bin/ $(@:s/.dpzz/$(ZIP6EXT)/)) $(foreach,j,$(ZIP6LIST) "{$(subst,LANGDIR,{$(subst,$(BIN)/$(ZIP6TARGET)_, $(subst,/misc/,/bin/ $(@:db)))} $j )}") $(avoid_cvs_dir) >> $(MISC)/$(@:f)
700.ENDIF			# "$(ZIP6DIR)" != ""
701.ENDIF			# "$(common_build_zip)"!=""
702	@echo $(@:n:s#\#/#) : makefile.mk >> $(MISC)/$(@:f)
703
704
705$(ZIP6TARGETN) : delzip $(ZIP6DEPS)
706	@echo "Making:   " $(@:f)
707    @@$(!eq,$?,$(?:s/delzip/zzz/) -$(RM) echo) $(uniq $@ $(subst,$(COMMON_OUTDIR),$(OUTPATH) $@))
708	@$(eq,$?,$(?:s/delzip/zzz/) noop echo ) rebuilding zipfiles
709.IF "$(GUI)" != "OS2"
710	@echo ------------------------------ $(eq,$?,$(?:s/delzip/zzz/) >&$(NULLDEV) )
711.ENDIF
712.IF "$(common_build_zip)"!=""
713.IF "$(ZIP6DIR)" != ""
714	@@-$(GNUCOPY) -p $@ $(ZIP6TMP).$(ZIP6TARGET){$(subst,$(ZIP6HELPVAR),_ $(@:db))}$(ZIP6EXT)
715	$(COMMAND_ECHO)-$(CDD) $(subst,LANGDIR,{$(subst,$(ZIP6HELPVAR)_, $(@:db))} $(ZIP6DIR)) $(command_seperator) zip $(ZIP_VERBOSITY) $(ZIP6FLAGS) $(ZIP6TMP).$(ZIP6TARGET){$(subst,$(ZIP6HELPVAR),_ $(@:db))}$(ZIP6EXT) $(subst,LANGDIR_away/, $(ZIP6LIST:s/LANGDIR/LANGDIR_away/)) -x delzip $(avoid_cvs_dir) $(CHECKZIPRESULT)
716	$(COMMAND_ECHO)$(IFEXIST) $(ZIP6TMP).$(ZIP6TARGET){$(subst,$(ZIP6HELPVAR),_ $(@:db))}$(ZIP6EXT) $(THEN) \
717	    $(PERL) -w $(SOLARENV)/bin/cleanzip.pl $(ZIP6TMP).$(ZIP6TARGET){$(subst,$(ZIP6HELPVAR),_ $(@:db))}$(ZIP6EXT) \
718	    $(FI)
719    $(COMMAND_ECHO)$(COPY) $(ZIP6TMP).$(ZIP6TARGET){$(subst,$(ZIP6HELPVAR),_ $(@:db))}$(ZIP6EXT) $@.$(INPATH)
720    $(COMMAND_ECHO)$(RM) $(ZIP6TMP).$(ZIP6TARGET){$(subst,$(ZIP6HELPVAR),_ $(@:db))}$(ZIP6EXT)
721.ELSE			# "$(ZIP6DIR)" != ""
722	@@-$(GNUCOPY) -p $@ $(subst,$(COMMON_OUTDIR),$(OUTPATH) $@)
723	$(COMMAND_ECHO)zip $(ZIP_VERBOSITY) $(ZIP6FLAGS) $(subst,$(COMMON_OUTDIR),$(OUTPATH) $@) $(foreach,j,$(ZIP6LIST) $(subst,LANGDIR,{$(subst,$(ZIP6HELPVAR)_, $(@:db))} $j )) -x delzip $(avoid_cvs_dir) $(CHECKZIPRESULT)
724	$(COMMAND_ECHO)$(IFEXIST) $(subst,$(COMMON_OUTDIR),$(OUTPATH) $@) $(THEN) \
725	    $(PERL) -w $(SOLARENV)/bin/cleanzip.pl $(subst,$(COMMON_OUTDIR),$(OUTPATH) $@) \
726	    $(FI)
727	@@-$(GNUCOPY) -p $(subst,$(COMMON_OUTDIR),$(OUTPATH) $@) $@.$(INPATH)
728	@-$(RM) $(subst,$(COMMON_OUTDIR),$(OUTPATH) $@)
729.ENDIF			# "$(ZIP6DIR)" != ""
730	@@-$(RM) $@
731	@$(IFEXIST) $@.$(INPATH) $(THEN) $(RENAME:s/+//) $@.$(INPATH) $@ $(FI)
732#	@$(IFEXIST) $@ $(THEN) $(TOUCH) $@ $(FI)  # even if it's not used...
733.ELSE			# "$(common_build_zip)"!=""
734.IF "$(ZIP6DIR)" != ""
735	@@-$(GNUCOPY) -p $@ $(ZIP6TMP).$(ZIP6TARGET){$(subst,$(ZIP6HELPVAR),_ $(@:db))}$(ZIP6EXT)
736	$(COMMAND_ECHO)-$(CDD) $(subst,LANGDIR,{$(subst,$(ZIP6HELPVAR)_, $(@:db))} $(ZIP6DIR)) $(command_seperator) zip $(ZIP_VERBOSITY) $(ZIP6FLAGS) $(ZIP6TMP).$(ZIP6TARGET){$(subst,$(ZIP6HELPVAR),_ $(@:db))}$(ZIP6EXT) $(subst,LANGDIR_away/, $(ZIP6LIST:s/LANGDIR/LANGDIR_away/)) -x delzip  $(avoid_cvs_dir) $(CHECKZIPRESULT)
737	$(COMMAND_ECHO)$(IFEXIST) $(ZIP6TMP).$(ZIP6TARGET){$(subst,$(ZIP6HELPVAR),_ $(@:db))}$(ZIP6EXT) $(THEN) \
738	    $(PERL) -w $(SOLARENV)/bin/cleanzip.pl $(ZIP6TMP).$(ZIP6TARGET){$(subst,$(ZIP6HELPVAR),_ $(@:db))}$(ZIP6EXT) \
739	    $(FI)
740    $(COMMAND_ECHO)$(COPY) $(ZIP6TMP).$(ZIP6TARGET){$(subst,$(ZIP6HELPVAR),_ $(@:db))}$(ZIP6EXT)  $@
741    $(COMMAND_ECHO)$(RM) $(ZIP6TMP).$(ZIP6TARGET){$(subst,$(ZIP6HELPVAR),_ $(@:db))}$(ZIP6EXT)
742.ELSE			# "$(ZIP6DIR)" != ""
743	$(COMMAND_ECHO)zip $(ZIP_VERBOSITY) $(ZIP6FLAGS) $@ $(foreach,j,$(ZIP6LIST) $(subst,LANGDIR,{$(subst,$(BIN)/$(ZIP6TARGET)_, $(@:db))} $j )) -x delzip $(avoid_cvs_dir) $(CHECKZIPRESULT)
744	$(COMMAND_ECHO)$(IFEXIST) $@ $(THEN) \
745	    $(PERL) -w $(SOLARENV)/bin/cleanzip.pl $@ \
746	    $(FI)
747.ENDIF			# "$(ZIP6DIR)" != ""
748.ENDIF			# "$(common_build_zip)"!=""
749.ENDIF
750
751# unroll begin
752
753.IF "$(GUI)"=="WNT"
754command_seperator=&&
755#command_seperator=^
756avoid_cvs_dir=-x "*CVS*" -x "*.svn*"
757.ELIF "$(GUI)"=="OS2"
758command_seperator=&&
759.ELSE
760command_seperator=;
761avoid_cvs_dir=-x "*CVS*" -x "*.svn*"
762
763.ENDIF
764
765.IF "$(ZIP7TARGET)"!=""
766
767ZIP7EXT*=.zip
768.IF "$(common_build_zip)"!=""
769.IF "$(ZIP7LIST:s/LANGDIR//)" == "$(ZIP7LIST)"
770ZIP7TARGETN=$(COMMONBIN)/$(ZIP7TARGET)$(ZIP7EXT)
771.ELSE
772ZIP7TARGETN=$(foreach,i,$(zip7alllangiso) $(COMMONBIN)/$(ZIP7TARGET)_$i$(ZIP7EXT) )
773.ENDIF
774.ELSE			# "$(common_build_zip)"!=""
775.IF "$(ZIP7LIST:s/LANGDIR//)" == "$(ZIP7LIST)"
776ZIP7TARGETN=$(BIN)/$(ZIP7TARGET)$(ZIP7EXT)
777.ELSE
778ZIP7TARGETN=$(foreach,i,$(zip7alllangiso) $(BIN)/$(ZIP7TARGET)_$i$(ZIP7EXT) )
779.ENDIF
780.ENDIF			# "$(common_build_zip)"!=""
781ZIP7DEPFILE=$(subst,$(COMMON_OUTDIR),$(OUTPATH) $(subst,/bin/,/misc/ $(ZIP7TARGETN:s/$(ZIP7EXT)/.dpzz/)))
782ZIPDEPFILES+=$(ZIP7DEPFILE)
783
784ZIP7DIR*=$(ZIPDIR)
785ZIP7FLAGS*=$(ZIPFLAGS)
786.IF "$(zip7generatedlangs)"!=""
787zip7langdirs*=$(alllangiso)
788.ELSE           # "$(zip7generatedlangs)"!=""
789zip7langdirs:=$(shell @-test -d {$(subst,/$(LANGDIR), $(null,$(ZIP7DIR) . $(ZIP7DIR)))}/ && find {$(subst,/$(LANGDIR), $(null,$(ZIP7DIR) . $(ZIP7DIR)))}/ -type d ! -name CVS ! -name ".svn" ! -name "." | sed "s/\.\/\///" | sed "s/\.\///" )
790.ENDIF          # "$(zip7generatedlangs)"!=""
791.IF "$(ZIP7FORCEALLLANG)"!=""
792zip7alllangiso:=$(foreach,i,$(completelangiso) $(foreach,j,$(zip7langdirs) $(eq,$i,$j  $i $(NULL))))
793.ELSE          # "$(ZIP7ALLLANG)" != ""
794zip7alllangiso*:=$(foreach,i,$(alllangiso) $(foreach,j,$(zip7langdirs) $(eq,$i,$j  $i $(NULL))))
795.ENDIF          # "$(ZIP7ALLLANG)" != ""
796.ENDIF			# "$(ZIP7TARGET)"!=""
797
798.IF "$(ZIP7TARGETN)"!=""
799
800ZIP7TMP:=$(mktmp iii)
801
802$(MISC)/$(TARGET).$(PWD:f).$(ZIP7TARGET).dpzz : $(ZIP7TARGETN)
803
804.IF "$(common_build_zip)"!=""
805ZIP7HELPVAR=$(COMMONBIN)/$(ZIP7TARGET)
806.ELSE			# "$(common_build_zip)"!=""
807ZIP7HELPVAR=$(BIN)/$(ZIP7TARGET)
808.ENDIF			# "$(common_build_zip)"!=""
809
810$(ZIP7DEPFILE) :
811	@echo # > $(MISC)/$(@:f)
812.IF "$(common_build_zip)"!=""
813.IF "$(ZIP7DIR)" != ""
814	$(COMMAND_ECHO)-$(MKDIRHIER) $(ZIP7DIR)
815	$(COMMAND_ECHO)$(CDD) $(subst,LANGDIR,. $(subst,/LANGDIR, $(ZIP7DIR))) $(command_seperator) $(ZIPDEP) $(ZIP7FLAGS) -prefix $(subst,LANGDIR,. $(subst,/LANGDIR, $(ZIP7DIR)))/ $(subst,$(OUTPATH),$(COMMON_OUTDIR) $(subst,/misc/,/bin/ $(@:s/.dpzz/$(ZIP7EXT)/))) $(foreach,j,$(ZIP7LIST) "{$(subst,LANGDIR,{$(subst,$(ZIP7TARGET)_, $(@:f:b))} $j )}") $(avoid_cvs_dir) >> $(PWD)/$(PRJ)/$(ROUT)/misc/$(@:f)
816.ELSE			# "$(ZIP7DIR)" != ""
817	$(COMMAND_ECHO)-$(ZIPDEP) $(ZIP7FLAGS) $(subst,$(OUTPATH),$(COMMON_OUTDIR) $(subst,/misc/,/bin/ $(@:s/.dpzz/$(ZIP7EXT)/))) $(foreach,j,$(ZIP7LIST) "{$(subst,LANGDIR,{$(subst,$(ZIP7TARGET)_, $(@:f:b))} $j )}") $(avoid_cvs_dir) >> $(MISC)/$(@:f)
818.ENDIF			# "$(ZIP7DIR)" != ""
819.ELSE			# "$(common_build_zip)"!=""
820.IF "$(ZIP7DIR)" != ""
821	$(COMMAND_ECHO)-$(MKDIRHIER) $(ZIP7DIR)
822	$(COMMAND_ECHO)$(CDD) $(subst,LANGDIR,. $(subst,/LANGDIR, $(ZIP7DIR))) $(command_seperator) $(ZIPDEP) $(ZIP7FLAGS) -prefix $(subst,LANGDIR,. $(subst,/LANGDIR, $(ZIP7DIR)))/ $(subst,/misc/,/bin/ $(@:s/.dpzz/$(ZIP7EXT)/)) $(foreach,j,$(ZIP7LIST) "{$(subst,LANGDIR,{$(subst,$(BIN)/$(ZIP7TARGET)_, $(subst,/misc/,/bin/ $(@:db)))} $j )}") $(avoid_cvs_dir) >> $(PWD)/$(PRJ)/$(ROUT)/misc/$(@:f)
823.ELSE			# "$(ZIP7DIR)" != ""
824	$(COMMAND_ECHO)-$(ZIPDEP) $(ZIP7FLAGS) $(subst,/misc/,/bin/ $(@:s/.dpzz/$(ZIP7EXT)/)) $(foreach,j,$(ZIP7LIST) "{$(subst,LANGDIR,{$(subst,$(BIN)/$(ZIP7TARGET)_, $(subst,/misc/,/bin/ $(@:db)))} $j )}") $(avoid_cvs_dir) >> $(MISC)/$(@:f)
825.ENDIF			# "$(ZIP7DIR)" != ""
826.ENDIF			# "$(common_build_zip)"!=""
827	@echo $(@:n:s#\#/#) : makefile.mk >> $(MISC)/$(@:f)
828
829
830$(ZIP7TARGETN) : delzip $(ZIP7DEPS)
831	@echo "Making:   " $(@:f)
832    @@$(!eq,$?,$(?:s/delzip/zzz/) -$(RM) echo) $(uniq $@ $(subst,$(COMMON_OUTDIR),$(OUTPATH) $@))
833	@$(eq,$?,$(?:s/delzip/zzz/) noop echo ) rebuilding zipfiles
834.IF "$(GUI)" != "OS2"
835	@echo ------------------------------ $(eq,$?,$(?:s/delzip/zzz/) >&$(NULLDEV) )
836.ENDIF
837.IF "$(common_build_zip)"!=""
838.IF "$(ZIP7DIR)" != ""
839	@@-$(GNUCOPY) -p $@ $(ZIP7TMP).$(ZIP7TARGET){$(subst,$(ZIP7HELPVAR),_ $(@:db))}$(ZIP7EXT)
840	$(COMMAND_ECHO)-$(CDD) $(subst,LANGDIR,{$(subst,$(ZIP7HELPVAR)_, $(@:db))} $(ZIP7DIR)) $(command_seperator) zip $(ZIP_VERBOSITY) $(ZIP7FLAGS) $(ZIP7TMP).$(ZIP7TARGET){$(subst,$(ZIP7HELPVAR),_ $(@:db))}$(ZIP7EXT) $(subst,LANGDIR_away/, $(ZIP7LIST:s/LANGDIR/LANGDIR_away/)) -x delzip $(avoid_cvs_dir) $(CHECKZIPRESULT)
841	$(COMMAND_ECHO)$(IFEXIST) $(ZIP7TMP).$(ZIP7TARGET){$(subst,$(ZIP7HELPVAR),_ $(@:db))}$(ZIP7EXT) $(THEN) \
842	    $(PERL) -w $(SOLARENV)/bin/cleanzip.pl $(ZIP7TMP).$(ZIP7TARGET){$(subst,$(ZIP7HELPVAR),_ $(@:db))}$(ZIP7EXT) \
843	    $(FI)
844    $(COMMAND_ECHO)$(COPY) $(ZIP7TMP).$(ZIP7TARGET){$(subst,$(ZIP7HELPVAR),_ $(@:db))}$(ZIP7EXT) $@.$(INPATH)
845    $(COMMAND_ECHO)$(RM) $(ZIP7TMP).$(ZIP7TARGET){$(subst,$(ZIP7HELPVAR),_ $(@:db))}$(ZIP7EXT)
846.ELSE			# "$(ZIP7DIR)" != ""
847	@@-$(GNUCOPY) -p $@ $(subst,$(COMMON_OUTDIR),$(OUTPATH) $@)
848	$(COMMAND_ECHO)zip $(ZIP_VERBOSITY) $(ZIP7FLAGS) $(subst,$(COMMON_OUTDIR),$(OUTPATH) $@) $(foreach,j,$(ZIP7LIST) $(subst,LANGDIR,{$(subst,$(ZIP7HELPVAR)_, $(@:db))} $j )) -x delzip $(avoid_cvs_dir) $(CHECKZIPRESULT)
849	$(COMMAND_ECHO)$(IFEXIST) $(subst,$(COMMON_OUTDIR),$(OUTPATH) $@) $(THEN) \
850	    $(PERL) -w $(SOLARENV)/bin/cleanzip.pl $(subst,$(COMMON_OUTDIR),$(OUTPATH) $@) \
851	    $(FI)
852	@@-$(GNUCOPY) -p $(subst,$(COMMON_OUTDIR),$(OUTPATH) $@) $@.$(INPATH)
853	@-$(RM) $(subst,$(COMMON_OUTDIR),$(OUTPATH) $@)
854.ENDIF			# "$(ZIP7DIR)" != ""
855	@@-$(RM) $@
856	@$(IFEXIST) $@.$(INPATH) $(THEN) $(RENAME:s/+//) $@.$(INPATH) $@ $(FI)
857#	@$(IFEXIST) $@ $(THEN) $(TOUCH) $@ $(FI)  # even if it's not used...
858.ELSE			# "$(common_build_zip)"!=""
859.IF "$(ZIP7DIR)" != ""
860	@@-$(GNUCOPY) -p $@ $(ZIP7TMP).$(ZIP7TARGET){$(subst,$(ZIP7HELPVAR),_ $(@:db))}$(ZIP7EXT)
861	$(COMMAND_ECHO)-$(CDD) $(subst,LANGDIR,{$(subst,$(ZIP7HELPVAR)_, $(@:db))} $(ZIP7DIR)) $(command_seperator) zip $(ZIP_VERBOSITY) $(ZIP7FLAGS) $(ZIP7TMP).$(ZIP7TARGET){$(subst,$(ZIP7HELPVAR),_ $(@:db))}$(ZIP7EXT) $(subst,LANGDIR_away/, $(ZIP7LIST:s/LANGDIR/LANGDIR_away/)) -x delzip  $(avoid_cvs_dir) $(CHECKZIPRESULT)
862	$(COMMAND_ECHO)$(IFEXIST) $(ZIP7TMP).$(ZIP7TARGET){$(subst,$(ZIP7HELPVAR),_ $(@:db))}$(ZIP7EXT) $(THEN) \
863	    $(PERL) -w $(SOLARENV)/bin/cleanzip.pl $(ZIP7TMP).$(ZIP7TARGET){$(subst,$(ZIP7HELPVAR),_ $(@:db))}$(ZIP7EXT) \
864	    $(FI)
865    $(COMMAND_ECHO)$(COPY) $(ZIP7TMP).$(ZIP7TARGET){$(subst,$(ZIP7HELPVAR),_ $(@:db))}$(ZIP7EXT)  $@
866    $(COMMAND_ECHO)$(RM) $(ZIP7TMP).$(ZIP7TARGET){$(subst,$(ZIP7HELPVAR),_ $(@:db))}$(ZIP7EXT)
867.ELSE			# "$(ZIP7DIR)" != ""
868	$(COMMAND_ECHO)zip $(ZIP_VERBOSITY) $(ZIP7FLAGS) $@ $(foreach,j,$(ZIP7LIST) $(subst,LANGDIR,{$(subst,$(BIN)/$(ZIP7TARGET)_, $(@:db))} $j )) -x delzip $(avoid_cvs_dir) $(CHECKZIPRESULT)
869	$(COMMAND_ECHO)$(IFEXIST) $@ $(THEN) \
870	    $(PERL) -w $(SOLARENV)/bin/cleanzip.pl $@ \
871	    $(FI)
872.ENDIF			# "$(ZIP7DIR)" != ""
873.ENDIF			# "$(common_build_zip)"!=""
874.ENDIF
875
876# unroll begin
877
878.IF "$(GUI)"=="WNT"
879command_seperator=&&
880#command_seperator=^
881avoid_cvs_dir=-x "*CVS*" -x "*.svn*"
882.ELIF "$(GUI)"=="OS2"
883command_seperator=&&
884.ELSE
885command_seperator=;
886avoid_cvs_dir=-x "*CVS*" -x "*.svn*"
887
888.ENDIF
889
890.IF "$(ZIP8TARGET)"!=""
891
892ZIP8EXT*=.zip
893.IF "$(common_build_zip)"!=""
894.IF "$(ZIP8LIST:s/LANGDIR//)" == "$(ZIP8LIST)"
895ZIP8TARGETN=$(COMMONBIN)/$(ZIP8TARGET)$(ZIP8EXT)
896.ELSE
897ZIP8TARGETN=$(foreach,i,$(zip8alllangiso) $(COMMONBIN)/$(ZIP8TARGET)_$i$(ZIP8EXT) )
898.ENDIF
899.ELSE			# "$(common_build_zip)"!=""
900.IF "$(ZIP8LIST:s/LANGDIR//)" == "$(ZIP8LIST)"
901ZIP8TARGETN=$(BIN)/$(ZIP8TARGET)$(ZIP8EXT)
902.ELSE
903ZIP8TARGETN=$(foreach,i,$(zip8alllangiso) $(BIN)/$(ZIP8TARGET)_$i$(ZIP8EXT) )
904.ENDIF
905.ENDIF			# "$(common_build_zip)"!=""
906ZIP8DEPFILE=$(subst,$(COMMON_OUTDIR),$(OUTPATH) $(subst,/bin/,/misc/ $(ZIP8TARGETN:s/$(ZIP8EXT)/.dpzz/)))
907ZIPDEPFILES+=$(ZIP8DEPFILE)
908
909ZIP8DIR*=$(ZIPDIR)
910ZIP8FLAGS*=$(ZIPFLAGS)
911.IF "$(zip8generatedlangs)"!=""
912zip8langdirs*=$(alllangiso)
913.ELSE           # "$(zip8generatedlangs)"!=""
914zip8langdirs:=$(shell @-test -d {$(subst,/$(LANGDIR), $(null,$(ZIP8DIR) . $(ZIP8DIR)))}/ && find {$(subst,/$(LANGDIR), $(null,$(ZIP8DIR) . $(ZIP8DIR)))}/ -type d ! -name CVS ! -name ".svn" ! -name "." | sed "s/\.\/\///" | sed "s/\.\///" )
915.ENDIF          # "$(zip8generatedlangs)"!=""
916.IF "$(ZIP8FORCEALLLANG)"!=""
917zip8alllangiso:=$(foreach,i,$(completelangiso) $(foreach,j,$(zip8langdirs) $(eq,$i,$j  $i $(NULL))))
918.ELSE          # "$(ZIP8ALLLANG)" != ""
919zip8alllangiso*:=$(foreach,i,$(alllangiso) $(foreach,j,$(zip8langdirs) $(eq,$i,$j  $i $(NULL))))
920.ENDIF          # "$(ZIP8ALLLANG)" != ""
921.ENDIF			# "$(ZIP8TARGET)"!=""
922
923.IF "$(ZIP8TARGETN)"!=""
924
925ZIP8TMP:=$(mktmp iii)
926
927$(MISC)/$(TARGET).$(PWD:f).$(ZIP8TARGET).dpzz : $(ZIP8TARGETN)
928
929.IF "$(common_build_zip)"!=""
930ZIP8HELPVAR=$(COMMONBIN)/$(ZIP8TARGET)
931.ELSE			# "$(common_build_zip)"!=""
932ZIP8HELPVAR=$(BIN)/$(ZIP8TARGET)
933.ENDIF			# "$(common_build_zip)"!=""
934
935$(ZIP8DEPFILE) :
936	@echo # > $(MISC)/$(@:f)
937.IF "$(common_build_zip)"!=""
938.IF "$(ZIP8DIR)" != ""
939	$(COMMAND_ECHO)-$(MKDIRHIER) $(ZIP8DIR)
940	$(COMMAND_ECHO)$(CDD) $(subst,LANGDIR,. $(subst,/LANGDIR, $(ZIP8DIR))) $(command_seperator) $(ZIPDEP) $(ZIP8FLAGS) -prefix $(subst,LANGDIR,. $(subst,/LANGDIR, $(ZIP8DIR)))/ $(subst,$(OUTPATH),$(COMMON_OUTDIR) $(subst,/misc/,/bin/ $(@:s/.dpzz/$(ZIP8EXT)/))) $(foreach,j,$(ZIP8LIST) "{$(subst,LANGDIR,{$(subst,$(ZIP8TARGET)_, $(@:f:b))} $j )}") $(avoid_cvs_dir) >> $(PWD)/$(PRJ)/$(ROUT)/misc/$(@:f)
941.ELSE			# "$(ZIP8DIR)" != ""
942	$(COMMAND_ECHO)-$(ZIPDEP) $(ZIP8FLAGS) $(subst,$(OUTPATH),$(COMMON_OUTDIR) $(subst,/misc/,/bin/ $(@:s/.dpzz/$(ZIP8EXT)/))) $(foreach,j,$(ZIP8LIST) "{$(subst,LANGDIR,{$(subst,$(ZIP8TARGET)_, $(@:f:b))} $j )}") $(avoid_cvs_dir) >> $(MISC)/$(@:f)
943.ENDIF			# "$(ZIP8DIR)" != ""
944.ELSE			# "$(common_build_zip)"!=""
945.IF "$(ZIP8DIR)" != ""
946	$(COMMAND_ECHO)-$(MKDIRHIER) $(ZIP8DIR)
947	$(COMMAND_ECHO)$(CDD) $(subst,LANGDIR,. $(subst,/LANGDIR, $(ZIP8DIR))) $(command_seperator) $(ZIPDEP) $(ZIP8FLAGS) -prefix $(subst,LANGDIR,. $(subst,/LANGDIR, $(ZIP8DIR)))/ $(subst,/misc/,/bin/ $(@:s/.dpzz/$(ZIP8EXT)/)) $(foreach,j,$(ZIP8LIST) "{$(subst,LANGDIR,{$(subst,$(BIN)/$(ZIP8TARGET)_, $(subst,/misc/,/bin/ $(@:db)))} $j )}") $(avoid_cvs_dir) >> $(PWD)/$(PRJ)/$(ROUT)/misc/$(@:f)
948.ELSE			# "$(ZIP8DIR)" != ""
949	$(COMMAND_ECHO)-$(ZIPDEP) $(ZIP8FLAGS) $(subst,/misc/,/bin/ $(@:s/.dpzz/$(ZIP8EXT)/)) $(foreach,j,$(ZIP8LIST) "{$(subst,LANGDIR,{$(subst,$(BIN)/$(ZIP8TARGET)_, $(subst,/misc/,/bin/ $(@:db)))} $j )}") $(avoid_cvs_dir) >> $(MISC)/$(@:f)
950.ENDIF			# "$(ZIP8DIR)" != ""
951.ENDIF			# "$(common_build_zip)"!=""
952	@echo $(@:n:s#\#/#) : makefile.mk >> $(MISC)/$(@:f)
953
954
955$(ZIP8TARGETN) : delzip $(ZIP8DEPS)
956	@echo "Making:   " $(@:f)
957    @@$(!eq,$?,$(?:s/delzip/zzz/) -$(RM) echo) $(uniq $@ $(subst,$(COMMON_OUTDIR),$(OUTPATH) $@))
958	@$(eq,$?,$(?:s/delzip/zzz/) noop echo ) rebuilding zipfiles
959.IF "$(GUI)" != "OS2"
960	@echo ------------------------------ $(eq,$?,$(?:s/delzip/zzz/) >&$(NULLDEV) )
961.ENDIF
962.IF "$(common_build_zip)"!=""
963.IF "$(ZIP8DIR)" != ""
964	@@-$(GNUCOPY) -p $@ $(ZIP8TMP).$(ZIP8TARGET){$(subst,$(ZIP8HELPVAR),_ $(@:db))}$(ZIP8EXT)
965	$(COMMAND_ECHO)-$(CDD) $(subst,LANGDIR,{$(subst,$(ZIP8HELPVAR)_, $(@:db))} $(ZIP8DIR)) $(command_seperator) zip $(ZIP_VERBOSITY) $(ZIP8FLAGS) $(ZIP8TMP).$(ZIP8TARGET){$(subst,$(ZIP8HELPVAR),_ $(@:db))}$(ZIP8EXT) $(subst,LANGDIR_away/, $(ZIP8LIST:s/LANGDIR/LANGDIR_away/)) -x delzip $(avoid_cvs_dir) $(CHECKZIPRESULT)
966	$(COMMAND_ECHO)$(IFEXIST) $(ZIP8TMP).$(ZIP8TARGET){$(subst,$(ZIP8HELPVAR),_ $(@:db))}$(ZIP8EXT) $(THEN) \
967	    $(PERL) -w $(SOLARENV)/bin/cleanzip.pl $(ZIP8TMP).$(ZIP8TARGET){$(subst,$(ZIP8HELPVAR),_ $(@:db))}$(ZIP8EXT) \
968	    $(FI)
969    $(COMMAND_ECHO)$(COPY) $(ZIP8TMP).$(ZIP8TARGET){$(subst,$(ZIP8HELPVAR),_ $(@:db))}$(ZIP8EXT) $@.$(INPATH)
970    $(COMMAND_ECHO)$(RM) $(ZIP8TMP).$(ZIP8TARGET){$(subst,$(ZIP8HELPVAR),_ $(@:db))}$(ZIP8EXT)
971.ELSE			# "$(ZIP8DIR)" != ""
972	@@-$(GNUCOPY) -p $@ $(subst,$(COMMON_OUTDIR),$(OUTPATH) $@)
973	$(COMMAND_ECHO)zip $(ZIP_VERBOSITY) $(ZIP8FLAGS) $(subst,$(COMMON_OUTDIR),$(OUTPATH) $@) $(foreach,j,$(ZIP8LIST) $(subst,LANGDIR,{$(subst,$(ZIP8HELPVAR)_, $(@:db))} $j )) -x delzip $(avoid_cvs_dir) $(CHECKZIPRESULT)
974	$(COMMAND_ECHO)$(IFEXIST) $(subst,$(COMMON_OUTDIR),$(OUTPATH) $@) $(THEN) \
975	    $(PERL) -w $(SOLARENV)/bin/cleanzip.pl $(subst,$(COMMON_OUTDIR),$(OUTPATH) $@) \
976	    $(FI)
977	@@-$(GNUCOPY) -p $(subst,$(COMMON_OUTDIR),$(OUTPATH) $@) $@.$(INPATH)
978	@-$(RM) $(subst,$(COMMON_OUTDIR),$(OUTPATH) $@)
979.ENDIF			# "$(ZIP8DIR)" != ""
980	@@-$(RM) $@
981	@$(IFEXIST) $@.$(INPATH) $(THEN) $(RENAME:s/+//) $@.$(INPATH) $@ $(FI)
982#	@$(IFEXIST) $@ $(THEN) $(TOUCH) $@ $(FI)  # even if it's not used...
983.ELSE			# "$(common_build_zip)"!=""
984.IF "$(ZIP8DIR)" != ""
985	@@-$(GNUCOPY) -p $@ $(ZIP8TMP).$(ZIP8TARGET){$(subst,$(ZIP8HELPVAR),_ $(@:db))}$(ZIP8EXT)
986	$(COMMAND_ECHO)-$(CDD) $(subst,LANGDIR,{$(subst,$(ZIP8HELPVAR)_, $(@:db))} $(ZIP8DIR)) $(command_seperator) zip $(ZIP_VERBOSITY) $(ZIP8FLAGS) $(ZIP8TMP).$(ZIP8TARGET){$(subst,$(ZIP8HELPVAR),_ $(@:db))}$(ZIP8EXT) $(subst,LANGDIR_away/, $(ZIP8LIST:s/LANGDIR/LANGDIR_away/)) -x delzip  $(avoid_cvs_dir) $(CHECKZIPRESULT)
987	$(COMMAND_ECHO)$(IFEXIST) $(ZIP8TMP).$(ZIP8TARGET){$(subst,$(ZIP8HELPVAR),_ $(@:db))}$(ZIP8EXT) $(THEN) \
988	    $(PERL) -w $(SOLARENV)/bin/cleanzip.pl $(ZIP8TMP).$(ZIP8TARGET){$(subst,$(ZIP8HELPVAR),_ $(@:db))}$(ZIP8EXT) \
989	    $(FI)
990    $(COMMAND_ECHO)$(COPY) $(ZIP8TMP).$(ZIP8TARGET){$(subst,$(ZIP8HELPVAR),_ $(@:db))}$(ZIP8EXT)  $@
991    $(COMMAND_ECHO)$(RM) $(ZIP8TMP).$(ZIP8TARGET){$(subst,$(ZIP8HELPVAR),_ $(@:db))}$(ZIP8EXT)
992.ELSE			# "$(ZIP8DIR)" != ""
993	$(COMMAND_ECHO)zip $(ZIP_VERBOSITY) $(ZIP8FLAGS) $@ $(foreach,j,$(ZIP8LIST) $(subst,LANGDIR,{$(subst,$(BIN)/$(ZIP8TARGET)_, $(@:db))} $j )) -x delzip $(avoid_cvs_dir) $(CHECKZIPRESULT)
994	$(COMMAND_ECHO)$(IFEXIST) $@ $(THEN) \
995	    $(PERL) -w $(SOLARENV)/bin/cleanzip.pl $@ \
996	    $(FI)
997.ENDIF			# "$(ZIP8DIR)" != ""
998.ENDIF			# "$(common_build_zip)"!=""
999.ENDIF
1000
1001# unroll begin
1002
1003.IF "$(GUI)"=="WNT"
1004command_seperator=&&
1005#command_seperator=^
1006avoid_cvs_dir=-x "*CVS*" -x "*.svn*"
1007.ELIF "$(GUI)"=="OS2"
1008command_seperator=&&
1009.ELSE
1010command_seperator=;
1011avoid_cvs_dir=-x "*CVS*" -x "*.svn*"
1012
1013.ENDIF
1014
1015.IF "$(ZIP9TARGET)"!=""
1016
1017ZIP9EXT*=.zip
1018.IF "$(common_build_zip)"!=""
1019.IF "$(ZIP9LIST:s/LANGDIR//)" == "$(ZIP9LIST)"
1020ZIP9TARGETN=$(COMMONBIN)/$(ZIP9TARGET)$(ZIP9EXT)
1021.ELSE
1022ZIP9TARGETN=$(foreach,i,$(zip9alllangiso) $(COMMONBIN)/$(ZIP9TARGET)_$i$(ZIP9EXT) )
1023.ENDIF
1024.ELSE			# "$(common_build_zip)"!=""
1025.IF "$(ZIP9LIST:s/LANGDIR//)" == "$(ZIP9LIST)"
1026ZIP9TARGETN=$(BIN)/$(ZIP9TARGET)$(ZIP9EXT)
1027.ELSE
1028ZIP9TARGETN=$(foreach,i,$(zip9alllangiso) $(BIN)/$(ZIP9TARGET)_$i$(ZIP9EXT) )
1029.ENDIF
1030.ENDIF			# "$(common_build_zip)"!=""
1031ZIP9DEPFILE=$(subst,$(COMMON_OUTDIR),$(OUTPATH) $(subst,/bin/,/misc/ $(ZIP9TARGETN:s/$(ZIP9EXT)/.dpzz/)))
1032ZIPDEPFILES+=$(ZIP9DEPFILE)
1033
1034ZIP9DIR*=$(ZIPDIR)
1035ZIP9FLAGS*=$(ZIPFLAGS)
1036.IF "$(zip9generatedlangs)"!=""
1037zip9langdirs*=$(alllangiso)
1038.ELSE           # "$(zip9generatedlangs)"!=""
1039zip9langdirs:=$(shell @-test -d {$(subst,/$(LANGDIR), $(null,$(ZIP9DIR) . $(ZIP9DIR)))}/ && find {$(subst,/$(LANGDIR), $(null,$(ZIP9DIR) . $(ZIP9DIR)))}/ -type d ! -name CVS ! -name ".svn" ! -name "." | sed "s/\.\/\///" | sed "s/\.\///" )
1040.ENDIF          # "$(zip9generatedlangs)"!=""
1041.IF "$(ZIP9FORCEALLLANG)"!=""
1042zip9alllangiso:=$(foreach,i,$(completelangiso) $(foreach,j,$(zip9langdirs) $(eq,$i,$j  $i $(NULL))))
1043.ELSE          # "$(ZIP9ALLLANG)" != ""
1044zip9alllangiso*:=$(foreach,i,$(alllangiso) $(foreach,j,$(zip9langdirs) $(eq,$i,$j  $i $(NULL))))
1045.ENDIF          # "$(ZIP9ALLLANG)" != ""
1046.ENDIF			# "$(ZIP9TARGET)"!=""
1047
1048.IF "$(ZIP9TARGETN)"!=""
1049
1050ZIP9TMP:=$(mktmp iii)
1051
1052$(MISC)/$(TARGET).$(PWD:f).$(ZIP9TARGET).dpzz : $(ZIP9TARGETN)
1053
1054.IF "$(common_build_zip)"!=""
1055ZIP9HELPVAR=$(COMMONBIN)/$(ZIP9TARGET)
1056.ELSE			# "$(common_build_zip)"!=""
1057ZIP9HELPVAR=$(BIN)/$(ZIP9TARGET)
1058.ENDIF			# "$(common_build_zip)"!=""
1059
1060$(ZIP9DEPFILE) :
1061	@echo # > $(MISC)/$(@:f)
1062.IF "$(common_build_zip)"!=""
1063.IF "$(ZIP9DIR)" != ""
1064	$(COMMAND_ECHO)-$(MKDIRHIER) $(ZIP9DIR)
1065	$(COMMAND_ECHO)$(CDD) $(subst,LANGDIR,. $(subst,/LANGDIR, $(ZIP9DIR))) $(command_seperator) $(ZIPDEP) $(ZIP9FLAGS) -prefix $(subst,LANGDIR,. $(subst,/LANGDIR, $(ZIP9DIR)))/ $(subst,$(OUTPATH),$(COMMON_OUTDIR) $(subst,/misc/,/bin/ $(@:s/.dpzz/$(ZIP9EXT)/))) $(foreach,j,$(ZIP9LIST) "{$(subst,LANGDIR,{$(subst,$(ZIP9TARGET)_, $(@:f:b))} $j )}") $(avoid_cvs_dir) >> $(PWD)/$(PRJ)/$(ROUT)/misc/$(@:f)
1066.ELSE			# "$(ZIP9DIR)" != ""
1067	$(COMMAND_ECHO)-$(ZIPDEP) $(ZIP9FLAGS) $(subst,$(OUTPATH),$(COMMON_OUTDIR) $(subst,/misc/,/bin/ $(@:s/.dpzz/$(ZIP9EXT)/))) $(foreach,j,$(ZIP9LIST) "{$(subst,LANGDIR,{$(subst,$(ZIP9TARGET)_, $(@:f:b))} $j )}") $(avoid_cvs_dir) >> $(MISC)/$(@:f)
1068.ENDIF			# "$(ZIP9DIR)" != ""
1069.ELSE			# "$(common_build_zip)"!=""
1070.IF "$(ZIP9DIR)" != ""
1071	$(COMMAND_ECHO)-$(MKDIRHIER) $(ZIP9DIR)
1072	$(COMMAND_ECHO)$(CDD) $(subst,LANGDIR,. $(subst,/LANGDIR, $(ZIP9DIR))) $(command_seperator) $(ZIPDEP) $(ZIP9FLAGS) -prefix $(subst,LANGDIR,. $(subst,/LANGDIR, $(ZIP9DIR)))/ $(subst,/misc/,/bin/ $(@:s/.dpzz/$(ZIP9EXT)/)) $(foreach,j,$(ZIP9LIST) "{$(subst,LANGDIR,{$(subst,$(BIN)/$(ZIP9TARGET)_, $(subst,/misc/,/bin/ $(@:db)))} $j )}") $(avoid_cvs_dir) >> $(PWD)/$(PRJ)/$(ROUT)/misc/$(@:f)
1073.ELSE			# "$(ZIP9DIR)" != ""
1074	$(COMMAND_ECHO)-$(ZIPDEP) $(ZIP9FLAGS) $(subst,/misc/,/bin/ $(@:s/.dpzz/$(ZIP9EXT)/)) $(foreach,j,$(ZIP9LIST) "{$(subst,LANGDIR,{$(subst,$(BIN)/$(ZIP9TARGET)_, $(subst,/misc/,/bin/ $(@:db)))} $j )}") $(avoid_cvs_dir) >> $(MISC)/$(@:f)
1075.ENDIF			# "$(ZIP9DIR)" != ""
1076.ENDIF			# "$(common_build_zip)"!=""
1077	@echo $(@:n:s#\#/#) : makefile.mk >> $(MISC)/$(@:f)
1078
1079
1080$(ZIP9TARGETN) : delzip $(ZIP9DEPS)
1081	@echo "Making:   " $(@:f)
1082    @@$(!eq,$?,$(?:s/delzip/zzz/) -$(RM) echo) $(uniq $@ $(subst,$(COMMON_OUTDIR),$(OUTPATH) $@))
1083	@$(eq,$?,$(?:s/delzip/zzz/) noop echo ) rebuilding zipfiles
1084.IF "$(GUI)" != "OS2"
1085	@echo ------------------------------ $(eq,$?,$(?:s/delzip/zzz/) >&$(NULLDEV) )
1086.ENDIF
1087.IF "$(common_build_zip)"!=""
1088.IF "$(ZIP9DIR)" != ""
1089	@@-$(GNUCOPY) -p $@ $(ZIP9TMP).$(ZIP9TARGET){$(subst,$(ZIP9HELPVAR),_ $(@:db))}$(ZIP9EXT)
1090	$(COMMAND_ECHO)-$(CDD) $(subst,LANGDIR,{$(subst,$(ZIP9HELPVAR)_, $(@:db))} $(ZIP9DIR)) $(command_seperator) zip $(ZIP_VERBOSITY) $(ZIP9FLAGS) $(ZIP9TMP).$(ZIP9TARGET){$(subst,$(ZIP9HELPVAR),_ $(@:db))}$(ZIP9EXT) $(subst,LANGDIR_away/, $(ZIP9LIST:s/LANGDIR/LANGDIR_away/)) -x delzip $(avoid_cvs_dir) $(CHECKZIPRESULT)
1091	$(COMMAND_ECHO)$(IFEXIST) $(ZIP9TMP).$(ZIP9TARGET){$(subst,$(ZIP9HELPVAR),_ $(@:db))}$(ZIP9EXT) $(THEN) \
1092	    $(PERL) -w $(SOLARENV)/bin/cleanzip.pl $(ZIP9TMP).$(ZIP9TARGET){$(subst,$(ZIP9HELPVAR),_ $(@:db))}$(ZIP9EXT) \
1093	    $(FI)
1094    $(COMMAND_ECHO)$(COPY) $(ZIP9TMP).$(ZIP9TARGET){$(subst,$(ZIP9HELPVAR),_ $(@:db))}$(ZIP9EXT) $@.$(INPATH)
1095    $(COMMAND_ECHO)$(RM) $(ZIP9TMP).$(ZIP9TARGET){$(subst,$(ZIP9HELPVAR),_ $(@:db))}$(ZIP9EXT)
1096.ELSE			# "$(ZIP9DIR)" != ""
1097	@@-$(GNUCOPY) -p $@ $(subst,$(COMMON_OUTDIR),$(OUTPATH) $@)
1098	$(COMMAND_ECHO)zip $(ZIP_VERBOSITY) $(ZIP9FLAGS) $(subst,$(COMMON_OUTDIR),$(OUTPATH) $@) $(foreach,j,$(ZIP9LIST) $(subst,LANGDIR,{$(subst,$(ZIP9HELPVAR)_, $(@:db))} $j )) -x delzip $(avoid_cvs_dir) $(CHECKZIPRESULT)
1099	$(COMMAND_ECHO)$(IFEXIST) $(subst,$(COMMON_OUTDIR),$(OUTPATH) $@) $(THEN) \
1100	    $(PERL) -w $(SOLARENV)/bin/cleanzip.pl $(subst,$(COMMON_OUTDIR),$(OUTPATH) $@) \
1101	    $(FI)
1102	@@-$(GNUCOPY) -p $(subst,$(COMMON_OUTDIR),$(OUTPATH) $@) $@.$(INPATH)
1103	@-$(RM) $(subst,$(COMMON_OUTDIR),$(OUTPATH) $@)
1104.ENDIF			# "$(ZIP9DIR)" != ""
1105	@@-$(RM) $@
1106	@$(IFEXIST) $@.$(INPATH) $(THEN) $(RENAME:s/+//) $@.$(INPATH) $@ $(FI)
1107#	@$(IFEXIST) $@ $(THEN) $(TOUCH) $@ $(FI)  # even if it's not used...
1108.ELSE			# "$(common_build_zip)"!=""
1109.IF "$(ZIP9DIR)" != ""
1110	@@-$(GNUCOPY) -p $@ $(ZIP9TMP).$(ZIP9TARGET){$(subst,$(ZIP9HELPVAR),_ $(@:db))}$(ZIP9EXT)
1111	$(COMMAND_ECHO)-$(CDD) $(subst,LANGDIR,{$(subst,$(ZIP9HELPVAR)_, $(@:db))} $(ZIP9DIR)) $(command_seperator) zip $(ZIP_VERBOSITY) $(ZIP9FLAGS) $(ZIP9TMP).$(ZIP9TARGET){$(subst,$(ZIP9HELPVAR),_ $(@:db))}$(ZIP9EXT) $(subst,LANGDIR_away/, $(ZIP9LIST:s/LANGDIR/LANGDIR_away/)) -x delzip  $(avoid_cvs_dir) $(CHECKZIPRESULT)
1112	$(COMMAND_ECHO)$(IFEXIST) $(ZIP9TMP).$(ZIP9TARGET){$(subst,$(ZIP9HELPVAR),_ $(@:db))}$(ZIP9EXT) $(THEN) \
1113	    $(PERL) -w $(SOLARENV)/bin/cleanzip.pl $(ZIP9TMP).$(ZIP9TARGET){$(subst,$(ZIP9HELPVAR),_ $(@:db))}$(ZIP9EXT) \
1114	    $(FI)
1115    $(COMMAND_ECHO)$(COPY) $(ZIP9TMP).$(ZIP9TARGET){$(subst,$(ZIP9HELPVAR),_ $(@:db))}$(ZIP9EXT)  $@
1116    $(COMMAND_ECHO)$(RM) $(ZIP9TMP).$(ZIP9TARGET){$(subst,$(ZIP9HELPVAR),_ $(@:db))}$(ZIP9EXT)
1117.ELSE			# "$(ZIP9DIR)" != ""
1118	$(COMMAND_ECHO)zip $(ZIP_VERBOSITY) $(ZIP9FLAGS) $@ $(foreach,j,$(ZIP9LIST) $(subst,LANGDIR,{$(subst,$(BIN)/$(ZIP9TARGET)_, $(@:db))} $j )) -x delzip $(avoid_cvs_dir) $(CHECKZIPRESULT)
1119	$(COMMAND_ECHO)$(IFEXIST) $@ $(THEN) \
1120	    $(PERL) -w $(SOLARENV)/bin/cleanzip.pl $@ \
1121	    $(FI)
1122.ENDIF			# "$(ZIP9DIR)" != ""
1123.ENDIF			# "$(common_build_zip)"!=""
1124.ENDIF
1125
1126# unroll begin
1127
1128.IF "$(GUI)"=="WNT"
1129command_seperator=&&
1130#command_seperator=^
1131avoid_cvs_dir=-x "*CVS*" -x "*.svn*"
1132.ELIF "$(GUI)"=="OS2"
1133command_seperator=&&
1134.ELSE
1135command_seperator=;
1136avoid_cvs_dir=-x "*CVS*" -x "*.svn*"
1137
1138.ENDIF
1139
1140.IF "$(ZIP10TARGET)"!=""
1141
1142ZIP10EXT*=.zip
1143.IF "$(common_build_zip)"!=""
1144.IF "$(ZIP10LIST:s/LANGDIR//)" == "$(ZIP10LIST)"
1145ZIP10TARGETN=$(COMMONBIN)/$(ZIP10TARGET)$(ZIP10EXT)
1146.ELSE
1147ZIP10TARGETN=$(foreach,i,$(zip10alllangiso) $(COMMONBIN)/$(ZIP10TARGET)_$i$(ZIP10EXT) )
1148.ENDIF
1149.ELSE			# "$(common_build_zip)"!=""
1150.IF "$(ZIP10LIST:s/LANGDIR//)" == "$(ZIP10LIST)"
1151ZIP10TARGETN=$(BIN)/$(ZIP10TARGET)$(ZIP10EXT)
1152.ELSE
1153ZIP10TARGETN=$(foreach,i,$(zip10alllangiso) $(BIN)/$(ZIP10TARGET)_$i$(ZIP10EXT) )
1154.ENDIF
1155.ENDIF			# "$(common_build_zip)"!=""
1156ZIP10DEPFILE=$(subst,$(COMMON_OUTDIR),$(OUTPATH) $(subst,/bin/,/misc/ $(ZIP10TARGETN:s/$(ZIP10EXT)/.dpzz/)))
1157ZIPDEPFILES+=$(ZIP10DEPFILE)
1158
1159ZIP10DIR*=$(ZIPDIR)
1160ZIP10FLAGS*=$(ZIPFLAGS)
1161.IF "$(zip10generatedlangs)"!=""
1162zip10langdirs*=$(alllangiso)
1163.ELSE           # "$(zip10generatedlangs)"!=""
1164zip10langdirs:=$(shell @-test -d {$(subst,/$(LANGDIR), $(null,$(ZIP10DIR) . $(ZIP10DIR)))}/ && find {$(subst,/$(LANGDIR), $(null,$(ZIP10DIR) . $(ZIP10DIR)))}/ -type d ! -name CVS ! -name ".svn" ! -name "." | sed "s/\.\/\///" | sed "s/\.\///" )
1165.ENDIF          # "$(zip10generatedlangs)"!=""
1166.IF "$(ZIP10FORCEALLLANG)"!=""
1167zip10alllangiso:=$(foreach,i,$(completelangiso) $(foreach,j,$(zip10langdirs) $(eq,$i,$j  $i $(NULL))))
1168.ELSE          # "$(ZIP10ALLLANG)" != ""
1169zip10alllangiso*:=$(foreach,i,$(alllangiso) $(foreach,j,$(zip10langdirs) $(eq,$i,$j  $i $(NULL))))
1170.ENDIF          # "$(ZIP10ALLLANG)" != ""
1171.ENDIF			# "$(ZIP10TARGET)"!=""
1172
1173.IF "$(ZIP10TARGETN)"!=""
1174
1175ZIP10TMP:=$(mktmp iii)
1176
1177$(MISC)/$(TARGET).$(PWD:f).$(ZIP10TARGET).dpzz : $(ZIP10TARGETN)
1178
1179.IF "$(common_build_zip)"!=""
1180ZIP10HELPVAR=$(COMMONBIN)/$(ZIP10TARGET)
1181.ELSE			# "$(common_build_zip)"!=""
1182ZIP10HELPVAR=$(BIN)/$(ZIP10TARGET)
1183.ENDIF			# "$(common_build_zip)"!=""
1184
1185$(ZIP10DEPFILE) :
1186	@echo # > $(MISC)/$(@:f)
1187.IF "$(common_build_zip)"!=""
1188.IF "$(ZIP10DIR)" != ""
1189	$(COMMAND_ECHO)-$(MKDIRHIER) $(ZIP10DIR)
1190	$(COMMAND_ECHO)$(CDD) $(subst,LANGDIR,. $(subst,/LANGDIR, $(ZIP10DIR))) $(command_seperator) $(ZIPDEP) $(ZIP10FLAGS) -prefix $(subst,LANGDIR,. $(subst,/LANGDIR, $(ZIP10DIR)))/ $(subst,$(OUTPATH),$(COMMON_OUTDIR) $(subst,/misc/,/bin/ $(@:s/.dpzz/$(ZIP10EXT)/))) $(foreach,j,$(ZIP10LIST) "{$(subst,LANGDIR,{$(subst,$(ZIP10TARGET)_, $(@:f:b))} $j )}") $(avoid_cvs_dir) >> $(PWD)/$(PRJ)/$(ROUT)/misc/$(@:f)
1191.ELSE			# "$(ZIP10DIR)" != ""
1192	$(COMMAND_ECHO)-$(ZIPDEP) $(ZIP10FLAGS) $(subst,$(OUTPATH),$(COMMON_OUTDIR) $(subst,/misc/,/bin/ $(@:s/.dpzz/$(ZIP10EXT)/))) $(foreach,j,$(ZIP10LIST) "{$(subst,LANGDIR,{$(subst,$(ZIP10TARGET)_, $(@:f:b))} $j )}") $(avoid_cvs_dir) >> $(MISC)/$(@:f)
1193.ENDIF			# "$(ZIP10DIR)" != ""
1194.ELSE			# "$(common_build_zip)"!=""
1195.IF "$(ZIP10DIR)" != ""
1196	$(COMMAND_ECHO)-$(MKDIRHIER) $(ZIP10DIR)
1197	$(COMMAND_ECHO)$(CDD) $(subst,LANGDIR,. $(subst,/LANGDIR, $(ZIP10DIR))) $(command_seperator) $(ZIPDEP) $(ZIP10FLAGS) -prefix $(subst,LANGDIR,. $(subst,/LANGDIR, $(ZIP10DIR)))/ $(subst,/misc/,/bin/ $(@:s/.dpzz/$(ZIP10EXT)/)) $(foreach,j,$(ZIP10LIST) "{$(subst,LANGDIR,{$(subst,$(BIN)/$(ZIP10TARGET)_, $(subst,/misc/,/bin/ $(@:db)))} $j )}") $(avoid_cvs_dir) >> $(PWD)/$(PRJ)/$(ROUT)/misc/$(@:f)
1198.ELSE			# "$(ZIP10DIR)" != ""
1199	$(COMMAND_ECHO)-$(ZIPDEP) $(ZIP10FLAGS) $(subst,/misc/,/bin/ $(@:s/.dpzz/$(ZIP10EXT)/)) $(foreach,j,$(ZIP10LIST) "{$(subst,LANGDIR,{$(subst,$(BIN)/$(ZIP10TARGET)_, $(subst,/misc/,/bin/ $(@:db)))} $j )}") $(avoid_cvs_dir) >> $(MISC)/$(@:f)
1200.ENDIF			# "$(ZIP10DIR)" != ""
1201.ENDIF			# "$(common_build_zip)"!=""
1202	@echo $(@:n:s#\#/#) : makefile.mk >> $(MISC)/$(@:f)
1203
1204
1205$(ZIP10TARGETN) : delzip $(ZIP10DEPS)
1206	@echo "Making:   " $(@:f)
1207    @@$(!eq,$?,$(?:s/delzip/zzz/) -$(RM) echo) $(uniq $@ $(subst,$(COMMON_OUTDIR),$(OUTPATH) $@))
1208	@$(eq,$?,$(?:s/delzip/zzz/) noop echo ) rebuilding zipfiles
1209.IF "$(GUI)" != "OS2"
1210	@echo ------------------------------ $(eq,$?,$(?:s/delzip/zzz/) >&$(NULLDEV) )
1211.ENDIF
1212.IF "$(common_build_zip)"!=""
1213.IF "$(ZIP10DIR)" != ""
1214	@@-$(GNUCOPY) -p $@ $(ZIP10TMP).$(ZIP10TARGET){$(subst,$(ZIP10HELPVAR),_ $(@:db))}$(ZIP10EXT)
1215	$(COMMAND_ECHO)-$(CDD) $(subst,LANGDIR,{$(subst,$(ZIP10HELPVAR)_, $(@:db))} $(ZIP10DIR)) $(command_seperator) zip $(ZIP_VERBOSITY) $(ZIP10FLAGS) $(ZIP10TMP).$(ZIP10TARGET){$(subst,$(ZIP10HELPVAR),_ $(@:db))}$(ZIP10EXT) $(subst,LANGDIR_away/, $(ZIP10LIST:s/LANGDIR/LANGDIR_away/)) -x delzip $(avoid_cvs_dir) $(CHECKZIPRESULT)
1216	$(COMMAND_ECHO)$(IFEXIST) $(ZIP10TMP).$(ZIP10TARGET){$(subst,$(ZIP10HELPVAR),_ $(@:db))}$(ZIP10EXT) $(THEN) \
1217	    $(PERL) -w $(SOLARENV)/bin/cleanzip.pl $(ZIP10TMP).$(ZIP10TARGET){$(subst,$(ZIP10HELPVAR),_ $(@:db))}$(ZIP10EXT) \
1218	    $(FI)
1219    $(COMMAND_ECHO)$(COPY) $(ZIP10TMP).$(ZIP10TARGET){$(subst,$(ZIP10HELPVAR),_ $(@:db))}$(ZIP10EXT) $@.$(INPATH)
1220    $(COMMAND_ECHO)$(RM) $(ZIP10TMP).$(ZIP10TARGET){$(subst,$(ZIP10HELPVAR),_ $(@:db))}$(ZIP10EXT)
1221.ELSE			# "$(ZIP10DIR)" != ""
1222	@@-$(GNUCOPY) -p $@ $(subst,$(COMMON_OUTDIR),$(OUTPATH) $@)
1223	$(COMMAND_ECHO)zip $(ZIP_VERBOSITY) $(ZIP10FLAGS) $(subst,$(COMMON_OUTDIR),$(OUTPATH) $@) $(foreach,j,$(ZIP10LIST) $(subst,LANGDIR,{$(subst,$(ZIP10HELPVAR)_, $(@:db))} $j )) -x delzip $(avoid_cvs_dir) $(CHECKZIPRESULT)
1224	$(COMMAND_ECHO)$(IFEXIST) $(subst,$(COMMON_OUTDIR),$(OUTPATH) $@) $(THEN) \
1225	    $(PERL) -w $(SOLARENV)/bin/cleanzip.pl $(subst,$(COMMON_OUTDIR),$(OUTPATH) $@) \
1226	    $(FI)
1227	@@-$(GNUCOPY) -p $(subst,$(COMMON_OUTDIR),$(OUTPATH) $@) $@.$(INPATH)
1228	@-$(RM) $(subst,$(COMMON_OUTDIR),$(OUTPATH) $@)
1229.ENDIF			# "$(ZIP10DIR)" != ""
1230	@@-$(RM) $@
1231	@$(IFEXIST) $@.$(INPATH) $(THEN) $(RENAME:s/+//) $@.$(INPATH) $@ $(FI)
1232#	@$(IFEXIST) $@ $(THEN) $(TOUCH) $@ $(FI)  # even if it's not used...
1233.ELSE			# "$(common_build_zip)"!=""
1234.IF "$(ZIP10DIR)" != ""
1235	@@-$(GNUCOPY) -p $@ $(ZIP10TMP).$(ZIP10TARGET){$(subst,$(ZIP10HELPVAR),_ $(@:db))}$(ZIP10EXT)
1236	$(COMMAND_ECHO)-$(CDD) $(subst,LANGDIR,{$(subst,$(ZIP10HELPVAR)_, $(@:db))} $(ZIP10DIR)) $(command_seperator) zip $(ZIP_VERBOSITY) $(ZIP10FLAGS) $(ZIP10TMP).$(ZIP10TARGET){$(subst,$(ZIP10HELPVAR),_ $(@:db))}$(ZIP10EXT) $(subst,LANGDIR_away/, $(ZIP10LIST:s/LANGDIR/LANGDIR_away/)) -x delzip  $(avoid_cvs_dir) $(CHECKZIPRESULT)
1237	$(COMMAND_ECHO)$(IFEXIST) $(ZIP10TMP).$(ZIP10TARGET){$(subst,$(ZIP10HELPVAR),_ $(@:db))}$(ZIP10EXT) $(THEN) \
1238	    $(PERL) -w $(SOLARENV)/bin/cleanzip.pl $(ZIP10TMP).$(ZIP10TARGET){$(subst,$(ZIP10HELPVAR),_ $(@:db))}$(ZIP10EXT) \
1239	    $(FI)
1240    $(COMMAND_ECHO)$(COPY) $(ZIP10TMP).$(ZIP10TARGET){$(subst,$(ZIP10HELPVAR),_ $(@:db))}$(ZIP10EXT)  $@
1241    $(COMMAND_ECHO)$(RM) $(ZIP10TMP).$(ZIP10TARGET){$(subst,$(ZIP10HELPVAR),_ $(@:db))}$(ZIP10EXT)
1242.ELSE			# "$(ZIP10DIR)" != ""
1243	$(COMMAND_ECHO)zip $(ZIP_VERBOSITY) $(ZIP10FLAGS) $@ $(foreach,j,$(ZIP10LIST) $(subst,LANGDIR,{$(subst,$(BIN)/$(ZIP10TARGET)_, $(@:db))} $j )) -x delzip $(avoid_cvs_dir) $(CHECKZIPRESULT)
1244	$(COMMAND_ECHO)$(IFEXIST) $@ $(THEN) \
1245	    $(PERL) -w $(SOLARENV)/bin/cleanzip.pl $@ \
1246	    $(FI)
1247.ENDIF			# "$(ZIP10DIR)" != ""
1248.ENDIF			# "$(common_build_zip)"!=""
1249.ENDIF
1250
1251