source: trunk/Makefile.kmk @ 436

Last change on this file since 436 was 436, checked in by Silvan Scherrer, 12 years ago

warpin sync fixes ticket:182

File size: 2.8 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
23LUCIDE_WPI       = $(PATH_OUT)/Lucide-$(subst $(SP),_,$(subst .,_,$(VERSION))).wpi
24LUCIDE_ZIP       = $(PATH_OUT)/Lucide-$(subst $(SP),_,$(subst .,_,$(VERSION))).zip
25
26OTHER_CLEAN     += $(LUCIDE_WPI) $(LUCIDE_ZIP) warpin/lucide_wpi.wis
27
28ifeq ($(IN_PACKING),)
29
30#
31# Special packing target sets a magic variable and restarts
32# (to avoid extra INSTALLS targets during regular non-packing kmk invocations)
33#
34PACKING          = do_packing
35
36do_packing:
37        $(RM) -fR $(PATH_PACKING)
38        $(QUIET)$(MAKE) IN_PACKING=1 uninstall rebuild packing
39
40fastpacking:
41        $(RM) -fR $(PATH_PACKING)
42        $(QUIET)$(MAKE) IN_PACKING=1 uninstall packing
43
44else
45
46#
47# Real packing rules
48#
49INSTALLS         = Lucide_wpi_1 Lucide_wpi_2 Lucide_wpi_3 Lucide_wpi_4 Lucide_zip
50PACKING          = $(LUCIDE_WPI) $(LUCIDE_ZIP)
51
52#
53# WPI
54#
55
56Lucide_wpi_1_INST                = $(notdir $(PATH_PACKING))/wpi/1
57Lucide_wpi_1_SOURCES     = \
58        $(TARGET_Lucide) \
59        $(TARGET_Lucide_dll) \
60        $(TARGET_ludoc) \
61        $(abspathex $(Lucide_doc_SOURCES),$(Lucide_doc_PATH)) \
62        $(abspathex $(Lucide_lng_SOURCES),$(Lucide_lng_PATH))
63
64Lucide_wpi_2_INST                = $(notdir $(PATH_PACKING))/wpi/2
65Lucide_wpi_2_SOURCES     = $(TARGET_lupoppler)
66
67Lucide_wpi_3_INST                = $(notdir $(PATH_PACKING))/wpi/3
68Lucide_wpi_3_SOURCES     = $(TARGET_ludjvu)
69
70Lucide_wpi_4_INST                = $(notdir $(PATH_PACKING))/wpi/4
71Lucide_wpi_4_SOURCES     = $(TARGET_lujpeg)
72
73$(LUCIDE_WPI): install warpin/lucide_wpi.wis
74        $(call MSG_L1,Packing $@)
75        -$(QUIET)$(RM) -f $@
76        $(QUIET)echo > $(abspathex $(Lucide_wpi_1_INST),$(PATH_OUT))/lucide.fcf
77        $(QUIET)wic -a $@ \
78                $(foreach p,$(patsubst Lucide_wpi_%,%,$(filter Lucide_wpi_%,$(INSTALLS))),\
79                        $(p) -c$(abspathex $(Lucide_wpi_$(p)_INST),$(PATH_OUT)) \*) \
80                -s warpin/lucide_wpi.wis
81
82warpin/lucide_wpi.wis: config.kmk warpin/lucide_wpi.wi_
83        @echo Writing wis script
84        $(SED) "s;_WPIVERSION_;$(subst .,\\\,$(WPIVERSION));g" warpin/lucide_wpi.wi_ \
85                | $(SED) "s;_WPIBUILD_;$(WPIBUILD);g" \
86                > warpin/lucide_wpi.wis
87
88#
89# ZIP (puts all WPI packages together)
90#
91
92Lucide_zip_INST          = $(notdir $(PATH_PACKING))/zip
93Lucide_zip_SOURCES       = \
94        $(foreach p,$(patsubst Lucide_wpi_%,%,$(filter Lucide_wpi_%,$(INSTALLS))),\
95                $(Lucide_wpi_$(p)_SOURCES))
96
97$(LUCIDE_ZIP): install
98        $(call MSG_L1,Packing $@)
99        -$(QUIET)$(RM) -f $@
100        $(QUIET)$(REDIRECT) -C $(PATH_PACKING)/zip -- zip -Sr9 $@ \*
101
102endif # IN_PACKING
103
104include $(FILE_KBUILD_SUB_FOOTER)
105
Note: See TracBrowser for help on using the repository browser.