source: trunk/Makefile.kmk @ 508

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

Lucide: changed the rpm/wpi check, removed the look4dll.exe need

File size: 3.8 KB
RevLine 
[295]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
[301]12include $(PATH_SUB_CURRENT)/libdjvu/Makefile.kmk
13include $(PATH_SUB_CURRENT)/libjpeg/Makefile.kmk
[306]14include $(PATH_SUB_CURRENT)/Lucide/Makefile.kmk
[295]15
[424]16#
17# WarpIn & Zip distribution
18#
19
[438]20PATH_OUT        ?= . # be on the safe side (we do rmdir -fR of PATH_PACKING)
[500]21PATH_PACKING = $(PATH_OUT)/dist/packing
[424]22
[438]23FILE_VERSION = $(subst $(SP),_,$(subst .,_,$(VERSION)$(if $(BUILD),_$(BUILD))))
[424]24
[438]25LUCIDE_WPI       = $(PATH_OUT)/Lucide-$(FILE_VERSION).wpi
26LUCIDE_ZIP       = $(PATH_OUT)/Lucide-$(FILE_VERSION).zip
[424]27
[438]28LUCIDE_WIS       = $(PATH_PACKING)/wpi/lucide.wis
29
30OTHER_CLEAN     += $(LUCIDE_WPI) $(LUCIDE_ZIP) $(LUCIDE_WIS)
31
[424]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#
[427]38PACKING          = do_packing
[424]39
40do_packing:
[432]41        $(RM) -fR $(PATH_PACKING)
42        $(QUIET)$(MAKE) IN_PACKING=1 uninstall rebuild packing
[424]43
44fastpacking:
[432]45        $(RM) -fR $(PATH_PACKING)
46        $(QUIET)$(MAKE) IN_PACKING=1 uninstall packing
[424]47
[442]48fastestpacking:
49        $(QUIET)$(MAKE) IN_PACKING=1 packing
50
[424]51else
52
53#
54# Real packing rules
55#
[481]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 \
[504]58                   Lucide_wpi_99 Lucide_zip
[427]59PACKING          = $(LUCIDE_WPI) $(LUCIDE_ZIP)
[424]60
[427]61#
62# WPI
63#
64
[500]65Lucide_wpi_1_INST                = $(notdir $(PATH_PACKING))/wpi/1/
[427]66Lucide_wpi_1_SOURCES     = \
[502]67        $(Lucide_1_TARGET) \
68        $(Lucide_dll_1_TARGET) \
69        $(ludoc_1_TARGET) \
70        $(abspathex $(Lucide_doc_SOURCES),$(Lucide_doc_DEFPATH)) \
71        $(abspathex $(Lucide_lng_SOURCES),$(Lucide_lng_DEFPATH))
[424]72
[500]73Lucide_wpi_2_INST                = $(notdir $(PATH_PACKING))/wpi/2/
[502]74Lucide_wpi_2_SOURCES     = $(lupoppler_1_TARGET)
[424]75
[500]76Lucide_wpi_3_INST                = $(notdir $(PATH_PACKING))/wpi/3/
[502]77Lucide_wpi_3_SOURCES     = $(ludjvu_1_TARGET)
[424]78
[500]79Lucide_wpi_4_INST                = $(notdir $(PATH_PACKING))/wpi/4/
[502]80Lucide_wpi_4_SOURCES     = $(lujpeg_1_TARGET)
[424]81
[500]82Lucide_wpi_5_INST                = $(notdir $(PATH_PACKING))/wpi/5/
[481]83Lucide_wpi_5_SOURCES     = warpin/LngDummy.txt
84
[500]85Lucide_wpi_6_INST                = $(notdir $(PATH_PACKING))/wpi/6/
[481]86Lucide_wpi_6_SOURCES     = warpin/LngDummy.txt
87
[500]88Lucide_wpi_7_INST                = $(notdir $(PATH_PACKING))/wpi/7/
[481]89Lucide_wpi_7_SOURCES     = warpin/LngDummy.txt
90
[500]91Lucide_wpi_8_INST                = $(notdir $(PATH_PACKING))/wpi/8/
[481]92Lucide_wpi_8_SOURCES     = warpin/LngDummy.txt
93
[500]94Lucide_wpi_9_INST                = $(notdir $(PATH_PACKING))/wpi/9/
[481]95Lucide_wpi_9_SOURCES     = warpin/LngDummy.txt
96
[500]97Lucide_wpi_10_INST               = $(notdir $(PATH_PACKING))/wpi/10/
[481]98Lucide_wpi_10_SOURCES    = warpin/LngDummy.txt
99
100
[438]101$(LUCIDE_WPI): $(LUCIDE_WIS) install
[424]102        $(call MSG_L1,Packing $@)
103        -$(QUIET)$(RM) -f $@
[501]104        $(QUIET)echo > $(abspathex $(Lucide_wpi_1_INST),$(PATH_OUT)/dist)/lucide.fcf
105        $(QUIET)wic -a $@ \
[424]106                $(foreach p,$(patsubst Lucide_wpi_%,%,$(filter Lucide_wpi_%,$(INSTALLS))),\
[500]107                        $(p) -c$(abspathex $(Lucide_wpi_$(p)_INST),$(PATH_OUT)/dist) \*) \
[438]108                -s $(LUCIDE_WIS)
[424]109
[438]110$(LUCIDE_WIS): warpin/lucide.wis.tpl Config.kmk | $$(call DIRDEP,$$(@D))
111        $(call MSG_L1,Generating $@)
112        $(QUIET)$(SED) \
[442]113                -e "s;\\\$${VERSION};$(VERSION);g" \
114                -e "s;\\\$${BUILD};$(BUILD);g" \
[438]115                -e "s;\\\$${WPIVERSION};$(subst .,\\\,$(VERSION));g" \
116                -e "s;\\\$${WPIBUILD};$(WPIBUILD);g" \
117                --output $@ $<
[436]118
[438]119BLDDIRS += $(dir $(LUCIDE_WIS))
120
[427]121#
122# ZIP (puts all WPI packages together)
123#
124
[500]125Lucide_zip_INST          = $(notdir $(PATH_PACKING))/zip/
[427]126Lucide_zip_SOURCES       = \
127        $(foreach p,$(patsubst Lucide_wpi_%,%,$(filter Lucide_wpi_%,$(INSTALLS))),\
128                $(Lucide_wpi_$(p)_SOURCES))
[424]129
[427]130$(LUCIDE_ZIP): install
[424]131        $(call MSG_L1,Packing $@)
132        -$(QUIET)$(RM) -f $@
[505]133        $(QUIET)$(REDIRECT) -C $(PATH_PACKING)/zip -- zip -Sr9 $@ \*
[424]134
[427]135endif # IN_PACKING
[424]136
[295]137include $(FILE_KBUILD_SUB_FOOTER)
138
Note: See TracBrowser for help on using the repository browser.