Changeset 424


Ignore:
Timestamp:
Apr 21, 2010, 11:44:36 AM (11 years ago)
Author:
dmik
Message:

kmk: Added the 'packing' target to automatically generate the WPI and ZIP archives.

Location:
trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Makefile.kmk

    r367 r424  
    1414include $(PATH_SUB_CURRENT)/Lucide/Makefile.kmk
    1515
     16#
     17# WarpIn & Zip distribution
     18#
     19
     20PATH_PACKING     = $(PATH_OUT)/packing
     21
     22LUCIDE_WPI       = $(PATH_OUT)/Lucide-$(subst .,_,$(VERSION)).wpi
     23LUCIDE_ZIP       = $(PATH_OUT)/Lucide-$(subst .,_,$(VERSION)).zip
     24
     25OTHER_CLEAN     += $(LUCIDE_WPI) $(LUCIDE_ZIP)
     26
     27clean:
     28        $(RM) -fR $(PATH_PACKING)
     29
     30ifeq ($(IN_PACKING),)
     31
     32#
     33# Special packing target sets a magic variable and restarts
     34# (to avoid extra INSTALLS targets during regular non-packing kmk invocations)
     35#
     36PACKING         += do_packing
     37
     38do_packing:
     39        $(QUIET)$(MAKE) IN_PACKING=1 uninstall clean packing
     40
     41fastpacking:
     42        $(QUIET)$(MAKE) IN_PACKING=1 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
     52Lucide_wpi_1_INST                = $(notdir $(PATH_PACKING))/wpi/1
     53Lucide_wpi_1_SOURCES    := \
     54        $(filter-out %/ludjvu.dll \
     55                                 %/lujpeg.dll \
     56                                 %/lupplr.dll,$(wildcard $(PATH_BIN)/*))
     57
     58Lucide_wpi_2_INST                = $(notdir $(PATH_PACKING))/wpi/2
     59Lucide_wpi_2_SOURCES    := $(PATH_BIN)/ludjvu.dll
     60
     61Lucide_wpi_3_INST                = $(notdir $(PATH_PACKING))/wpi/3
     62Lucide_wpi_3_SOURCES    := $(PATH_BIN)/lujpeg.dll
     63
     64Lucide_wpi_4_INST                = $(notdir $(PATH_PACKING))/wpi/4
     65Lucide_wpi_4_SOURCES    := $(PATH_BIN)/lupplr.dll
     66
     67$(LUCIDE_WPI): all
     68        $(call MSG_L1,Packing $@)
     69        -$(QUIET)$(RM) -f $@
     70        $(QUIET)echo > $(abspathex $(Lucide_wpi_1_INST),$(PATH_OUT))/lucide.fcf
     71        $(QUIET)wic -a $@ \
     72                $(foreach p,$(patsubst Lucide_wpi_%,%,$(filter Lucide_wpi_%,$(INSTALLS))),\
     73                        $(p) -c$(abspathex $(Lucide_wpi_$(p)_INST),$(PATH_OUT)) \*) \
     74                -s warpin/lucide_wpi.wis
     75
     76Lucide_zip_INST          = $(notdir $(PATH_PACKING))/zip
     77Lucide_zip_SOURCES      := $(filter-out %/lucide.fcf,$(wildcard $(PATH_BIN)/*))
     78
     79$(LUCIDE_ZIP): all
     80        $(call MSG_L1,Packing $@)
     81        -$(QUIET)$(RM) -f $@
     82        $(QUIET)$(REDIRECT) -C $(PATH_PACKING)/zip -- zip -Sr9 $@ \*
     83
     84endif
     85
    1686include $(FILE_KBUILD_SUB_FOOTER)
    1787
  • trunk/README.DEV

    r374 r424  
    3333  - LxLite 1.3.3 or above should also be located in PATH, otherwise packing the
    3434    resulting EXEs and DLLs will be disabled. You can take LxLite here:
    35    
     35
    3636      http://www.os2site.com/sw/util/archiver/lxlt133.zip
    3737
     
    4949comment descriping what it does.
    5050
     51
     52
     53BUILDING THE PRODUCT
     54
    5155Now, start "env.cmd" to setup the environment and type "kmk" in the root
    5256directory of the Lucide source tree to start kBuild and build the release
     
    6165
    6266  ftp://ftp.netlabs.org/pub/qt4/tools/se10.zip
     67
     68
     69
     70GENERATING DISTRIBUTION ARCHIVES
     71
     72In order to generate WPI and ZIP distribution archives in the output directory,
     73issue the following command (prefixed with "se" if you use it):
     74
     75  kmk packing
     76
     77Note that this command will perform a complete cleanup before packing, to make
     78sure everything is rebuilt from scratch.
     79
     80
     81
     82USEFUL KBUILD TARGETS
     83
     84The following kmk targets may be of interest:
     85
     86  - clean           Cleans up the build by deleting all generated output.
     87  - uninstall       Deletes all installed files.
     88  - packing         Creates distribution archives in the output directory
     89                    (see GENERATING DISTRIBUTION ARCHIVES above).
    6390
    6491
Note: See TracChangeset for help on using the changeset viewer.