source: trunk/Makefile.kmk @ 696

Last change on this file since 696 was 696, checked in by Gregg Young, 3 years ago

Add debug package to installer; Give readmes and help in different languages unique object names. Minor version cleanup;

File size: 9.4 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 .,_,$(VERSION)$(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;\\\$${GBMVERSION};$(GBMVERSION);g" \
114                -e "s;\\\$${VERSIONDATE};$(VERSIONDATE);g" \
115                -e "s;\\\$${VERSIONTIME};$(VERSIONTIME);g" \
116                -e "s;\\\$${BUILDMACHINE};$(BUILDMACHINE);g" \
117                --output $@  $<   
118
119ifeq ($(IN_PACKING),)
120
121#
122# Special packing target sets a magic variable and restarts
123# (to avoid extra INSTALLS targets during regular non-packing kmk invocations)
124#
125PACKING          = do_packing
126
127PACKING:
128        $(RM) -fR $(PATH_PACKING)
129        $(QUIET)$(MAKE) IN_PACKING=1 uninstall rebuild packing
130
131fastpacking:
132        $(RM) -fR $(PATH_PACKING)
133        $(QUIET)$(MAKE) IN_PACKING=1 uninstall packing
134
135fastestpacking:
136        $(QUIET)$(MAKE) IN_PACKING=1 packing
137
138else
139
140#
141# Real packing rules
142#
143INSTALLS         = Lucide_wpi_1 Lucide_wpi_2 Lucide_wpi_3 Lucide_wpi_4 Lucide_wpi_5 \
144                   Lucide_wpi_6 Lucide_wpi_7 Lucide_wpi_8 Lucide_wpi_1033 \
145                   Lucide_wpi_1049 Lucide_wpi_1031 Lucide_wpi_1034 \
146                   Lucide_wpi_1046 Lucide_wpi_1039 Lucide_wpi_1421 Lucide_wpi_1045 \
147                   Lucide_wpi_1007 Lucide_wpi_1088 \
148                   Lucide_zip
149PACKING          = $(LUCIDE_WPI) $(LUCIDE_ZIP)
150
151#
152# WPI
153#
154
155Lucide_wpi_1_INST                = $(notdir $(PATH_PACKING))/wpi/1/
156Lucide_wpi_1_SOURCES     = \
157        $(Lucide_1_TARGET) \
158        $(Lucide_dll_1_TARGET) \
159        $(ludoc_1_TARGET) \
160        $(Lucide_en.hlp_1_TARGET) \
161        $(abspathex $(Lucide_doc_SOURCES),$(Lucide_doc_DEFPATH)) \
162        $(PATH_OBJ)\Lucide_en.hlp\gbm_en.hlp
163
164Lucide_wpi_2_INST                = $(notdir $(PATH_PACKING))/wpi/2/
165Lucide_wpi_2_SOURCES     = $(lupoppler_1_TARGET)
166
167Lucide_wpi_3_INST                = $(notdir $(PATH_PACKING))/wpi/3/
168Lucide_wpi_3_SOURCES     = $(ludjvu_1_TARGET)
169
170Lucide_wpi_4_INST                = $(notdir $(PATH_PACKING))/wpi/4/
171Lucide_wpi_4_SOURCES     = $(lujpeg_1_TARGET)
172
173Lucide_wpi_5_INST                = $(notdir $(PATH_PACKING))/wpi/5/
174Lucide_wpi_5_SOURCES     = $(lugbm_1_TARGET) \
175                           $(abspathex $(Lugbm_doc_SOURCES),$(Lugbm_doc_DEFPATH))
176
177Lucide_wpi_6_INST                = $(notdir $(PATH_PACKING))/wpi/6/
178Lucide_wpi_6_SOURCES     = $(PATH_SUB_CURRENT)/Lucide/lng/Lucide.lng
179
180Lucide_wpi_7_INST                = $(notdir $(PATH_PACKING))/wpi/7/
181Lucide_wpi_7_SOURCES     = $(wildcard $(PATH_SUB_CURRENT)/Lucide/gui/alticons/lucide_*.ICO)
182
183Lucide_wpi_8_INST                = $(notdir $(PATH_PACKING))/wpi/8/
184Lucide_wpi_8_SOURCES     = $(wildcard $(PATH_OBJ)/*/*.map) \
185                           $(wildcard $(PATH_OBJ)/*/*.sym) \
186                           $(wildcard $(PATH_OBJ)/*/*.xqs)
187
188Lucide_wpi_1033_INST             = $(notdir $(PATH_PACKING))/wpi/1033/
189Lucide_wpi_1033_SOURCES  = $(PATH_SUB_CURRENT)/Lucide/readme_fr.txt \
190                           $(PATH_SUB_CURRENT)/Lucide/lng/Lucide_fr.lng
191
192Lucide_wpi_1049_INST             = $(notdir $(PATH_PACKING))/wpi/1049/
193Lucide_wpi_1049_SOURCES  = $(PATH_SUB_CURRENT)/Lucide/readme_de.txt \
194                           $(PATH_SUB_CURRENT)/Lucide/lng/Lucide_de.lng
195
196Lucide_wpi_1031_INST             = $(notdir $(PATH_PACKING))/wpi/1031/
197Lucide_wpi_1031_SOURCES  = $(PATH_SUB_CURRENT)/Lucide/readme_nl.txt \
198                           $(PATH_SUB_CURRENT)/Lucide/lng/Lucide_nl.lng
199
200Lucide_wpi_1034_INST             = $(notdir $(PATH_PACKING))/wpi/1034/
201Lucide_wpi_1034_SOURCES  = $(PATH_SUB_CURRENT)/Lucide/readme_es.txt \
202                           $(PATH_SUB_CURRENT)/Lucide/lng/Lucide_es.lng \
203                           $(PATH_SUB_CURRENT)/Lucide/plugins/lugbm/doc/readme_gbmlucide_es.txt \
204                           $(PATH_SUB_CURRENT)/Lucide/plugins/lugbm/doc/lugbm_es.cfg \
205                           $(PATH_OBJ)\Lucide_en.hlp\Lucide_es.hlp
206
207Lucide_wpi_1046_INST             = $(notdir $(PATH_PACKING))/wpi/1046/
208Lucide_wpi_1046_SOURCES  = $(PATH_SUB_CURRENT)/Lucide/lng/Lucide_sv.lng
209
210Lucide_wpi_1039_INST             = $(notdir $(PATH_PACKING))/wpi/1039/
211Lucide_wpi_1039_SOURCES  = $(PATH_SUB_CURRENT)/Lucide/readme_it.txt \
212                           $(PATH_SUB_CURRENT)/Lucide/lng/Lucide_it.lng
213
214Lucide_wpi_1421_INST             = $(notdir $(PATH_PACKING))/wpi/1421/
215Lucide_wpi_1421_SOURCES  = $(PATH_SUB_CURRENT)/Lucide/readme_cs.txt  \
216                           $(PATH_SUB_CURRENT)/Lucide/lng/lucide_cs_cz.lng
217
218Lucide_wpi_1045_INST             = $(notdir $(PATH_PACKING))/wpi/1045/
219Lucide_wpi_1045_SOURCES  = $(PATH_SUB_CURRENT)/Lucide/lng/Lucide_da.lng
220
221Lucide_wpi_1007_INST             = $(notdir $(PATH_PACKING))/wpi/1007/
222Lucide_wpi_1007_SOURCES  = $(PATH_SUB_CURRENT)/Lucide/lng/Lucide_ru.lng
223
224Lucide_wpi_1088_INST             = $(notdir $(PATH_PACKING))/wpi/1088/
225Lucide_wpi_1088_SOURCES  = $(PATH_SUB_CURRENT)/Lucide/lng/Lucide_zh_TW.lng
226
227
228$(LUCIDE_WPI): $(LUCIDE_WIS) install
229        $(call MSG_L1,Packing $@)
230        $(QUIET)$(RM) -f $@
231        $(QUIET)echo > $(abspathex $(Lucide_wpi_1_INST),$(PATH_OUT)/dist)/lucide.fcf
232        $(QUIET)$(WIC) -a $@ \
233                $(foreach p,$(patsubst Lucide_wpi_%,%,$(filter Lucide_wpi_%,$(INSTALLS))),\
234                        $(p) -c$(abspathex $(Lucide_wpi_$(p)_INST),$(PATH_OUT)/dist) \*) \
235                -s $(LUCIDE_WIS) -v
236
237$(LUCIDE_WIS): warpin/lucide.wis.tpl Config.kmk | $$(call DIRDEP,$$(@D))
238        $(call MSG_L1,Generating $@)
239        $(QUIET)$(SED) \
240                -e "s;\\\$${VERSION};$(VERSION);g" \
241                -e "s;\\\$${BUILD};$(BUILD);g" \
242                -e "s;\\\$${WPIVERSION};$(subst .,\\\,$(VERSION));g" \
243                -e "s;\\\$${WPIBUILD};$(WPIBUILD);g" \
244                --output $@ $<
245
246BLDDIRS += $(dir $(LUCIDE_WIS))
247
248#
249# ZIP (puts all WPI packages together)
250#
251
252Lucide_zip_INST          = $(notdir $(PATH_PACKING))/zip/
253Lucide_zip_SOURCES       = \
254        $(foreach p,$(patsubst Lucide_wpi_%,%,$(filter Lucide_wpi_%,$(INSTALLS))),\
255                $(Lucide_wpi_$(p)_SOURCES))
256
257$(LUCIDE_ZIP): install
258        $(call MSG_L1,Packing $@)
259        -$(QUIET)$(RM) -f $@
260        $(QUIET)$(REDIRECT) -C $(PATH_PACKING)/zip -- zip -Sr9 $@ \*
261
262endif # IN_PACKING
263
264include $(FILE_KBUILD_SUB_FOOTER)
265
266
Note: See TracBrowser for help on using the repository browser.