source: trunk/Makefile.kmk

Last change on this file was 711, checked in by Gregg Young, 2 years ago

Build changes to add Polish lng file; Fixed lugbm-gcc.def generation Ticket #380; Fixed some grammar in the wis file.

File size: 9.6 KB
Line 
1## @file
2# Top-Level Makefile
3#
4
5SUB_DEPTH = .
6include $(KBUILD_PATH)/subheader.kmk
7
8#
9# Include sub-makefiles
10#
11#include $(PATH_SUB_CURRENT)/libdjvu/Makefile.kmk
12#include $(PATH_SUB_CURRENT)/libjpeg/Makefile.kmk
13include $(PATH_SUB_CURRENT)/Lucide/Makefile.kmk
14
15#
16# WarpIn & Zip distribution
17#
18
19PATH_OUT        ?= . # be on the safe side (we do rmdir -fR of PATH_PACKING)
20PATH_PACKING = $(PATH_OUT)/dist/packing
21
22FILE_VERSION = $(subst $(SP),_,$(subst .,_,$(WPIVERSION)$(if $(BUILD),_$(BUILD))))
23
24LUCIDE_WPI       = $(PATH_OUT)/Lucide-$(FILE_VERSION).wpi
25LUCIDE_ZIP       = $(PATH_OUT)/Lucide-$(FILE_VERSION).zip
26
27LUCIDE_WIS       = $(PATH_PACKING)/wpi/lucide.wis
28WIC              = WIC.EXE
29
30LCD_DEF          = $(PATH_ROOT)/lucide/gui/lcd.def
31LUCIDE1_DEF      = $(PATH_ROOT)/lucide/gui/lucide1.def
32LUDJVU_DEF       = $(PATH_ROOT)/lucide/plugins/ludjvu/ludjvu.def
33LUDOC_DEF        = $(PATH_ROOT)/lucide/plugins/ludoc/ludoc.def
34LUJPEG_DEF       = $(PATH_ROOT)/lucide/plugins/lujpeg/lujpeg.def
35LUPOPPLER_DEF    = $(PATH_ROOT)/lucide/plugins/lupoppler/lupoppler.def
36LUGBM_DEF        = $(PATH_ROOT)/lucide/plugins/lugbm/lugbm_gcc.def
37
38OTHER_CLEAN     += $(LUCIDE_WPI) $(LUCIDE_ZIP) $(LUCIDE_WIS)
39
40#
41# Fixme PACKING fails on missing def if this is enabled
42#
43
44# OTHER_CLEAN   += $(LUDJVU_DEF) $(LUDOC_DEF) $(LUJPEG_DEF) $(LUPOPPLER_DEF) $(LCD_DEF) $(LUCIDE1_DEF)
45
46#
47# Add target to build the def files from template set/update VERSION, VERSIONDATE
48# VERSIONTIME and BUILDMACHINE in Config.kmk first. Always run kmk -B DEFINES to
49# force them to rebuild.
50#
51
52DEFINES: $(LUCIDE1_DEF) $(LCD_DEF) $(LUDJVU_DEF) $(LUDOC_DEF) $(LUJPEG_DEF) $(LUPOPPLER_DEF) $(LUGBM_DEF)
53
54$(LUCIDE1_DEF): lucide/gui/lucide1.def.tpl Config.kmk  | $$(call DIRDEP,$$(@D))
55        $(call MSG_L1,Generating $@)
56        $(QUIET)$(SED) \
57                -e "s;\\\$${VERSION};$(VERSION);g" \
58                -e "s;\\\$${BUILD};$(BUILD);g" \
59                -e "s;\\\$${VERSIONDATE};$(VERSIONDATE);g" \
60                -e "s;\\\$${VERSIONTIME};$(VERSIONTIME);g" \
61                -e "s;\\\$${BUILDMACHINE};$(BUILDMACHINE);g" \
62                --output $@  $<
63               
64$(LCD_DEF): lucide/gui/lcd.def.tpl Config.kmk | $$(call DIRDEP,$$(@D))
65        $(call MSG_L1,Generating $@)
66        $(QUIET)$(SED) \
67                -e "s;\\\$${VERSION};$(VERSION);g" \
68                -e "s;\\\$${BUILD};$(BUILD);g" \
69                -e "s;\\\$${VERSIONDATE};$(VERSIONDATE);g" \
70                -e "s;\\\$${VERSIONTIME};$(VERSIONTIME);g" \
71                -e "s;\\\$${BUILDMACHINE};$(BUILDMACHINE);g" \
72                --output $@  $<   
73               
74$(LUDJVU_DEF): Lucide/plugins/ludjvu/ludjvu.def.tpl Config.kmk | $$(call DIRDEP,$$(@D))
75        $(call MSG_L1,Generating $@)
76        $(QUIET)$(SED) \
77                -e "s;\\\$${VERSION};$(VERSION);g" \
78                -e "s;\\\$${BUILD};$(BUILD);g" \
79                -e "s;\\\$${VERSIONDATE};$(VERSIONDATE);g" \
80                -e "s;\\\$${VERSIONTIME};$(VERSIONTIME);g" \
81                -e "s;\\\$${BUILDMACHINE};$(BUILDMACHINE);g" \
82                --output $@  $<   
83$(LUDOC_DEF):  Lucide/plugins/ludoc/ludoc.def.tpl Config.kmk | $$(call DIRDEP,$$(@D))
84        $(call MSG_L1,Generating $@)
85        $(QUIET)$(SED) \
86                -e "s;\\\$${VERSION};$(VERSION);g" \
87                -e "s;\\\$${BUILD};$(BUILD);g" \
88                -e "s;\\\$${VERSIONDATE};$(VERSIONDATE);g" \
89                -e "s;\\\$${VERSIONTIME};$(VERSIONTIME);g" \
90                -e "s;\\\$${BUILDMACHINE};$(BUILDMACHINE);g" \
91                --output $@  $<   
92$(LUJPEG_DEF): Lucide/plugins/lujpeg/lujpeg.def.tpl  Config.kmk | $$(call DIRDEP,$$(@D))
93        $(call MSG_L1,Generating $@)
94        $(QUIET)$(SED) \
95                -e "s;\\\$${VERSION};$(VERSION);g" \
96                -e "s;\\\$${BUILD};$(BUILD);g" \
97                -e "s;\\\$${VERSIONDATE};$(VERSIONDATE);g" \
98                -e "s;\\\$${VERSIONTIME};$(VERSIONTIME);g" \
99                -e "s;\\\$${BUILDMACHINE};$(BUILDMACHINE);g" \
100                --output $@  $<   
101$(LUPOPPLER_DEF): Lucide/plugins/lupoppler/lupoppler.def.tpl Config.kmk | $$(call DIRDEP,$$(@D))
102        $(call MSG_L1,Generating $@)
103        $(QUIET)$(SED) \
104                -e "s;\\\$${VERSION};$(VERSION);g" \
105                -e "s;\\\$${BUILD};$(BUILD);g" \
106                -e "s;\\\$${VERSIONDATE};$(VERSIONDATE);g" \
107                -e "s;\\\$${VERSIONTIME};$(VERSIONTIME);g" \
108                -e "s;\\\$${BUILDMACHINE};$(BUILDMACHINE);g" \
109                --output $@  $<   
110$(LUGBM_DEF): Lucide/plugins/lugbm/lugbm.def.tpl Config.kmk | $$(call DIRDEP,$$(@D))
111        $(call MSG_L1,Generating $@)
112        $(QUIET)$(SED) \
113                -e "s;\\\$${VERSION};$(VERSION);g" \
114                -e "s;\\\$${BUILD};$(BUILD);g" \
115                -e "s;\\\$${VERSIONDATE};$(VERSIONDATE);g" \
116                -e "s;\\\$${VERSIONTIME};$(VERSIONTIME);g" \
117                -e "s;\\\$${BUILDMACHINE};$(BUILDMACHINE);g" \
118                --output $@  $<   
119
120ifeq ($(IN_PACKING),)
121
122#
123# Special packing target sets a magic variable and restarts
124# (to avoid extra INSTALLS targets during regular non-packing kmk invocations)
125#
126PACKING          = do_packing
127
128PACKING:
129        $(RM) -fR $(PATH_PACKING)
130        $(QUIET)$(MAKE) IN_PACKING=1 uninstall rebuild packing
131
132fastpacking:
133        $(RM) -fR $(PATH_PACKING)
134        $(QUIET)$(MAKE) IN_PACKING=1 uninstall packing
135
136fastestpacking:
137        $(QUIET)$(MAKE) IN_PACKING=1 packing
138
139else
140
141#
142# Real packing rules
143#
144INSTALLS         = Lucide_wpi_1 Lucide_wpi_2 Lucide_wpi_3 Lucide_wpi_4 Lucide_wpi_5 \
145                   Lucide_wpi_6 Lucide_wpi_7 Lucide_wpi_8 Lucide_wpi_1033 \
146                   Lucide_wpi_1049 Lucide_wpi_1031 Lucide_wpi_1034 \
147                   Lucide_wpi_1046 Lucide_wpi_1039 Lucide_wpi_1421 Lucide_wpi_1045 \
148                   Lucide_wpi_1048 Lucide_wpi_1007 Lucide_wpi_1088 \
149                   Lucide_zip
150PACKING          = $(LUCIDE_WPI) $(LUCIDE_ZIP)
151
152#
153# WPI
154#
155
156Lucide_wpi_1_INST                = $(notdir $(PATH_PACKING))/wpi/1/
157Lucide_wpi_1_SOURCES     = \
158        $(Lucide_1_TARGET) \
159        $(Lucide_dll_1_TARGET) \
160        $(ludoc_1_TARGET) \
161        $(Lucide_en.hlp_1_TARGET) \
162        $(abspathex $(Lucide_doc_SOURCES),$(Lucide_doc_DEFPATH)) \
163        $(PATH_OBJ)\Lucide_en.hlp\gbm_en.hlp
164
165Lucide_wpi_2_INST                = $(notdir $(PATH_PACKING))/wpi/2/
166Lucide_wpi_2_SOURCES     = $(lupoppler_1_TARGET)
167
168Lucide_wpi_3_INST                = $(notdir $(PATH_PACKING))/wpi/3/
169Lucide_wpi_3_SOURCES     = $(ludjvu_1_TARGET)
170
171Lucide_wpi_4_INST                = $(notdir $(PATH_PACKING))/wpi/4/
172Lucide_wpi_4_SOURCES     = $(lujpeg_1_TARGET)
173
174Lucide_wpi_5_INST                = $(notdir $(PATH_PACKING))/wpi/5/
175Lucide_wpi_5_SOURCES     = $(lugbm_1_TARGET) \
176                           $(abspathex $(Lugbm_doc_SOURCES),$(Lugbm_doc_DEFPATH))
177
178Lucide_wpi_6_INST                = $(notdir $(PATH_PACKING))/wpi/6/
179Lucide_wpi_6_SOURCES     = $(PATH_SUB_CURRENT)/Lucide/lng/Lucide.lng
180
181Lucide_wpi_7_INST                = $(notdir $(PATH_PACKING))/wpi/7/
182Lucide_wpi_7_SOURCES     = $(wildcard $(PATH_SUB_CURRENT)/Lucide/gui/alticons/lucide_*.ICO)
183
184Lucide_wpi_8_INST                = $(notdir $(PATH_PACKING))/wpi/8/
185Lucide_wpi_8_SOURCES     = $(wildcard $(PATH_OBJ)/*/*.map) \
186                           $(wildcard $(PATH_OBJ)/*/*.sym) \
187                           $(wildcard $(PATH_OBJ)/*/*.xqs)
188
189Lucide_wpi_1033_INST             = $(notdir $(PATH_PACKING))/wpi/1033/
190Lucide_wpi_1033_SOURCES  = $(PATH_SUB_CURRENT)/Lucide/readme_fr.txt \
191                           $(PATH_SUB_CURRENT)/Lucide/lng/Lucide_fr.lng
192
193Lucide_wpi_1049_INST             = $(notdir $(PATH_PACKING))/wpi/1049/
194Lucide_wpi_1049_SOURCES  = $(PATH_SUB_CURRENT)/Lucide/readme_de.txt \
195                           $(PATH_SUB_CURRENT)/Lucide/lng/Lucide_de.lng
196
197Lucide_wpi_1031_INST             = $(notdir $(PATH_PACKING))/wpi/1031/
198Lucide_wpi_1031_SOURCES  = $(PATH_SUB_CURRENT)/Lucide/readme_nl.txt \
199                           $(PATH_SUB_CURRENT)/Lucide/lng/Lucide_nl.lng
200
201Lucide_wpi_1034_INST             = $(notdir $(PATH_PACKING))/wpi/1034/
202Lucide_wpi_1034_SOURCES  = $(PATH_SUB_CURRENT)/Lucide/readme_es.txt \
203                           $(PATH_SUB_CURRENT)/Lucide/lng/Lucide_es.lng \
204                           $(PATH_SUB_CURRENT)/Lucide/plugins/lugbm/doc/readme_gbmlucide_es.txt \
205                           $(PATH_SUB_CURRENT)/Lucide/plugins/lugbm/doc/lugbm_es.cfg \
206                           $(PATH_OBJ)\Lucide_en.hlp\Lucide_es.hlp
207
208Lucide_wpi_1046_INST             = $(notdir $(PATH_PACKING))/wpi/1046/
209Lucide_wpi_1046_SOURCES  = $(PATH_SUB_CURRENT)/Lucide/lng/Lucide_sv.lng
210
211Lucide_wpi_1039_INST             = $(notdir $(PATH_PACKING))/wpi/1039/
212Lucide_wpi_1039_SOURCES  = $(PATH_SUB_CURRENT)/Lucide/readme_it.txt \
213                           $(PATH_SUB_CURRENT)/Lucide/lng/Lucide_it.lng
214
215Lucide_wpi_1421_INST             = $(notdir $(PATH_PACKING))/wpi/1421/
216Lucide_wpi_1421_SOURCES  = $(PATH_SUB_CURRENT)/Lucide/readme_cs.txt  \
217                           $(PATH_SUB_CURRENT)/Lucide/lng/lucide_cs_cz.lng
218
219Lucide_wpi_1045_INST             = $(notdir $(PATH_PACKING))/wpi/1045/
220Lucide_wpi_1045_SOURCES  = $(PATH_SUB_CURRENT)/Lucide/lng/Lucide_da.lng
221
222Lucide_wpi_1048_INST             = $(notdir $(PATH_PACKING))/wpi/1048/
223Lucide_wpi_1048_SOURCES  = $(PATH_SUB_CURRENT)/Lucide/lng/Lucide_pl.lng
224
225Lucide_wpi_1007_INST             = $(notdir $(PATH_PACKING))/wpi/1007/
226Lucide_wpi_1007_SOURCES  = $(PATH_SUB_CURRENT)/Lucide/lng/Lucide_ru.lng
227
228Lucide_wpi_1088_INST             = $(notdir $(PATH_PACKING))/wpi/1088/
229Lucide_wpi_1088_SOURCES  = $(PATH_SUB_CURRENT)/Lucide/lng/Lucide_zh_TW.lng
230
231
232$(LUCIDE_WPI): $(LUCIDE_WIS) install
233        $(call MSG_L1,Packing $@)
234        $(QUIET)$(RM) -f $@
235        $(QUIET)echo > $(abspathex $(Lucide_wpi_1_INST),$(PATH_OUT)/dist)/lucide.fcf
236        $(QUIET)$(WIC) -a $@ \
237                $(foreach p,$(patsubst Lucide_wpi_%,%,$(filter Lucide_wpi_%,$(INSTALLS))),\
238                        $(p) -c$(abspathex $(Lucide_wpi_$(p)_INST),$(PATH_OUT)/dist) \*) \
239                -s $(LUCIDE_WIS) -v
240
241$(LUCIDE_WIS): warpin/lucide.wis.tpl Config.kmk | $$(call DIRDEP,$$(@D))
242        $(call MSG_L1,Generating $@)
243        $(QUIET)$(SED) \
244                -e "s;\\\$${VERSION};$(WPIVERSION);g" \
245                -e "s;\\\$${BUILD};$(BUILD);g" \
246                -e "s;\\\$${WPIVERSION};$(subst .,\\\,$(WPIVERSION));g" \
247                -e "s;\\\$${WPIBUILD};$(WPIBUILD);g" \
248                --output $@ $<
249
250BLDDIRS += $(dir $(LUCIDE_WIS))
251
252#
253# ZIP (puts all WPI packages together)
254#
255
256Lucide_zip_INST          = $(notdir $(PATH_PACKING))/zip/
257Lucide_zip_SOURCES       = \
258        $(foreach p,$(patsubst Lucide_wpi_%,%,$(filter Lucide_wpi_%,$(INSTALLS))),\
259                $(Lucide_wpi_$(p)_SOURCES))
260
261$(LUCIDE_ZIP): install
262        $(call MSG_L1,Packing $@)
263        -$(QUIET)$(RM) -f $@
264        $(QUIET)$(REDIRECT) -C $(PATH_PACKING)/zip -- zip -Sr9 $@ \*
265
266endif # IN_PACKING
267
268include $(FILE_KBUILD_SUB_FOOTER)
269
270
Note: See TracBrowser for help on using the repository browser.