source: trunk/Makefile.kmk @ 492

Last change on this file since 492 was 481, checked in by Silvan Scherrer, 10 years ago

Lucide better NLS support

File size: 3.7 KB
Line 
1## @file
2# Top-Level Makefile
3#
4
5SUB_DEPTH = .
6include $(KBUILD_PATH)/subheader.kmk
7
8#
9# Include sub-makefiles
10#
11include $(PATH_SUB_CURRENT)/poppler/Makefile.kmk
12include $(PATH_SUB_CURRENT)/libdjvu/Makefile.kmk
13include $(PATH_SUB_CURRENT)/libjpeg/Makefile.kmk
14include $(PATH_SUB_CURRENT)/Lucide/Makefile.kmk
15
16#
17# WarpIn & Zip distribution
18#
19
20PATH_OUT        ?= . # be on the safe side (we do rmdir -fR of PATH_PACKING)
21PATH_PACKING = $(PATH_OUT)/packing
22
23FILE_VERSION = $(subst $(SP),_,$(subst .,_,$(VERSION)$(if $(BUILD),_$(BUILD))))
24
25LUCIDE_WPI       = $(PATH_OUT)/Lucide-$(FILE_VERSION).wpi
26LUCIDE_ZIP       = $(PATH_OUT)/Lucide-$(FILE_VERSION).zip
27
28LUCIDE_WIS       = $(PATH_PACKING)/wpi/lucide.wis
29
30OTHER_CLEAN     += $(LUCIDE_WPI) $(LUCIDE_ZIP) $(LUCIDE_WIS)
31
32ifeq ($(IN_PACKING),)
33
34#
35# Special packing target sets a magic variable and restarts
36# (to avoid extra INSTALLS targets during regular non-packing kmk invocations)
37#
38PACKING          = do_packing
39
40do_packing:
41        $(RM) -fR $(PATH_PACKING)
42        $(QUIET)$(MAKE) IN_PACKING=1 uninstall rebuild packing
43
44fastpacking:
45        $(RM) -fR $(PATH_PACKING)
46        $(QUIET)$(MAKE) IN_PACKING=1 uninstall packing
47
48fastestpacking:
49        $(QUIET)$(MAKE) IN_PACKING=1 packing
50
51else
52
53#
54# Real packing rules
55#
56INSTALLS         = Lucide_wpi_1 Lucide_wpi_2 Lucide_wpi_3 Lucide_wpi_4 Lucide_wpi_5 \
57                   Lucide_wpi_6 Lucide_wpi_7 Lucide_wpi_8 Lucide_wpi_9 Lucide_wpi_10 \
58                   Lucide_zip
59PACKING          = $(LUCIDE_WPI) $(LUCIDE_ZIP)
60
61#
62# WPI
63#
64
65Lucide_wpi_1_INST                = $(notdir $(PATH_PACKING))/wpi/1
66Lucide_wpi_1_SOURCES     = \
67        $(TARGET_Lucide) \
68        $(TARGET_Lucide_dll) \
69        $(TARGET_ludoc) \
70        $(abspathex $(Lucide_doc_SOURCES),$(Lucide_doc_PATH)) \
71        $(abspathex $(Lucide_lng_SOURCES),$(Lucide_lng_PATH))
72
73Lucide_wpi_2_INST                = $(notdir $(PATH_PACKING))/wpi/2
74Lucide_wpi_2_SOURCES     = $(TARGET_lupoppler)
75
76Lucide_wpi_3_INST                = $(notdir $(PATH_PACKING))/wpi/3
77Lucide_wpi_3_SOURCES     = $(TARGET_ludjvu)
78
79Lucide_wpi_4_INST                = $(notdir $(PATH_PACKING))/wpi/4
80Lucide_wpi_4_SOURCES     = $(TARGET_lujpeg)
81
82Lucide_wpi_5_INST                = $(notdir $(PATH_PACKING))/wpi/5
83Lucide_wpi_5_SOURCES     = warpin/LngDummy.txt
84
85Lucide_wpi_6_INST                = $(notdir $(PATH_PACKING))/wpi/6
86Lucide_wpi_6_SOURCES     = warpin/LngDummy.txt
87
88Lucide_wpi_7_INST                = $(notdir $(PATH_PACKING))/wpi/7
89Lucide_wpi_7_SOURCES     = warpin/LngDummy.txt
90
91Lucide_wpi_8_INST                = $(notdir $(PATH_PACKING))/wpi/8
92Lucide_wpi_8_SOURCES     = warpin/LngDummy.txt
93
94Lucide_wpi_9_INST                = $(notdir $(PATH_PACKING))/wpi/9
95Lucide_wpi_9_SOURCES     = warpin/LngDummy.txt
96
97Lucide_wpi_10_INST               = $(notdir $(PATH_PACKING))/wpi/10
98Lucide_wpi_10_SOURCES    = warpin/LngDummy.txt
99
100
101$(LUCIDE_WPI): $(LUCIDE_WIS) install
102        $(call MSG_L1,Packing $@)
103        -$(QUIET)$(RM) -f $@
104        $(QUIET)echo > $(abspathex $(Lucide_wpi_1_INST),$(PATH_OUT))/lucide.fcf
105        $(QUIET)wic -a $@ \
106                $(foreach p,$(patsubst Lucide_wpi_%,%,$(filter Lucide_wpi_%,$(INSTALLS))),\
107                        $(p) -c$(abspathex $(Lucide_wpi_$(p)_INST),$(PATH_OUT)) \*) \
108                -s $(LUCIDE_WIS)
109
110$(LUCIDE_WIS): warpin/lucide.wis.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;\\\$${WPIVERSION};$(subst .,\\\,$(VERSION));g" \
116                -e "s;\\\$${WPIBUILD};$(WPIBUILD);g" \
117                --output $@ $<
118
119BLDDIRS += $(dir $(LUCIDE_WIS))
120
121#
122# ZIP (puts all WPI packages together)
123#
124
125Lucide_zip_INST          = $(notdir $(PATH_PACKING))/zip
126Lucide_zip_SOURCES       = \
127        $(foreach p,$(patsubst Lucide_wpi_%,%,$(filter Lucide_wpi_%,$(INSTALLS))),\
128                $(Lucide_wpi_$(p)_SOURCES))
129
130$(LUCIDE_ZIP): install
131        $(call MSG_L1,Packing $@)
132        -$(QUIET)$(RM) -f $@
133        $(QUIET)$(REDIRECT) -C $(PATH_PACKING)/zip -- zip -Sr9 $@ \*
134
135endif # IN_PACKING
136
137include $(FILE_KBUILD_SUB_FOOTER)
138
Note: See TracBrowser for help on using the repository browser.