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