Changeset 725


Ignore:
Timestamp:
May 1, 2010, 12:51:27 AM (15 years ago)
Author:
Dmitry A. Kuminov
Message:

packaging: Delete temporary package directories at start to make sure removed files are not accidentally packed to WPIs (this also fixes the problem of directories not being updated when gathering them in temporary package dirs).

Location:
packaging
Files:
1 added
1 edited

Legend:

Unmodified
Added
Removed
  • packaging/Makefile.packages

    r581 r725  
    4747        $(QT_BUILD)/CHANGES.OS2
    4848
     49#
    4950# Runtime archive
     51#
    5052
    5153pkg.lib.runtime.PATH            = $(WPI_ROOT)/pkg.lib.runtime
     
    8587wpi.lib.PATH            = $(OUT_ROOT)/qt-lib-$(QT_VER_FULL).wpi
    8688wpi.lib.SCRIPT      = $(WPI_ROOT)/lib.wis
    87 wpi.lib.PACKAGES        = pkg.lib.runtime=1 pkg.lib.instutils=2 pkg.lib.plugins=3 \
    88                       pkg.lib.translations=4 pkg.lib.systray=5 pkg.readme=6
    89 
     89wpi.lib.PACKAGES        = \
     90        pkg.lib.runtime=1 \
     91        pkg.lib.instutils=2 \
     92        pkg.lib.plugins=3 \
     93        pkg.lib.translations=4 \
     94        pkg.lib.systray=5 \
     95        pkg.readme=6
     96
     97#
    9098# Development archive
     99#
    91100
    92101# @todo QtDsgn4.dll and QtDsgC4.dll must be taken from $(QT_INSTALL)
     
    118127wpi.dev.PATH            = $(OUT_ROOT)/qt-dev-$(QT_VER_FULL).wpi
    119128wpi.dev.SCRIPT      = $(WPI_ROOT)/dev.wis
    120 wpi.dev.PACKAGES        = pkg.dev.libraries=1 pkg.dev.runtime=2 \
    121                       pkg.dev.translations=3 pkg.readme=4
    122 
     129wpi.dev.PACKAGES        = \
     130        pkg.dev.libraries=1 \
     131        pkg.dev.runtime=2 \
     132    pkg.dev.translations=3 \
     133        pkg.readme=4
     134
     135#
    123136# Examples archive
     137#
    124138
    125139pkg.examples.demos.PATH         = $(WPI_ROOT)/pkg.examples.demos
     
    136150
    137151# @todo add examples.example-plugins
    138 # @todo install qtdemo in bin/ when its' ready
     152# @todo install qtdemo in bin/ when it's ready
    139153
    140154wpi.examples.PATH               = $(OUT_ROOT)/qt-examples-$(QT_VER_FULL).wpi
    141155wpi.examples.SCRIPT             = $(WPI_ROOT)/examples.wis
    142 wpi.examples.PACKAGES   = pkg.examples.demos=1 pkg.examples.demo-plugins=2 \
    143                                                   pkg.examples.examples=3 \
    144                                                   pkg.readme=4
    145 
     156wpi.examples.PACKAGES   = \
     157        pkg.examples.demos=1 \
     158        pkg.examples.demo-plugins=2 \
     159        pkg.examples.examples=3 \
     160        pkg.readme=4
     161
     162#
    146163# Summary
     164#
    147165
    148166WPIS = wpi.lib wpi.dev wpi.examples
     
    162180_DIRS_ += $(1)
    163181$$(eval $$(call EnsureDir,$(dir $(1:%/=%))))
    164 $$(shell if not exist $(subst /,\,$(1:%/=%)) mkdir $(subst /,\,$(1:%/=%)) >nul 2>&1)
     182$$(shell if not exist "$(subst /,\,$(1:%/=%))" mkdir "$(subst /,\,$(1:%/=%))" >nul 2>&1)
    165183endif
    166184endif
     
    169187
    170188# Generate rules to copy one file.
    171 # @param $(1)   Stem whose file is to copy.
     189# @param $(1)   Stem which file is to copy.
    172190# @param $(2)   File name in format src[->tgt].
    173191define GenFileCopyRule
     
    208226$$(foreach file,$$($(1).SOURCES),$$(eval $$(call GenFileCopyRule,$(1),$$(file))))
    209227$(1): $$($(1).TARGETS)
     228clean-$(1):
     229        if exist "$($(1).PATH)" deltree.cmd "$(subst /,\,$($(1).PATH))" /Y /S
    210230endif
    211231endef
     
    226246$(eval $(1).PACKAGES :=)
    227247$(foreach pkg,$($(1)._PACKAGES),$(eval $(call GenWpiRuleHelper,$(1),$(pkg))))
    228 $(1): $($(1).PACKAGES) $($(1).SCRIPT)
     248# generate WPI target (depends on clean to make sure the removed files are not packed)
     249$(1): clean-$(1) $($(1).PACKAGES) $($(1).SCRIPT)
    229250        -del $(subst /,\,$($(1).PATH))
    230251        $(WIC) $($(1).PATH) -a $($(1)._PACKAGES_CMD) -s $($(1).SCRIPT)
     252# clean WPI target
     253clean-$(1): $(foreach pkg,$($(1).PACKAGES),clean-$(pkg))
     254# helpers
    231255$(foreach pkg,$($(1).PACKAGES),$(eval $(pkg).TARGETS :=))
    232256$(foreach pkg,$($(1).PACKAGES),$(eval $(call GenPkgRule,$(pkg))))
Note: See TracChangeset for help on using the changeset viewer.