Changeset 4611094f in mainline for release/Makefile


Ignore:
Timestamp:
2011-03-20T19:09:19Z (14 years ago)
Author:
Maurizio Lombardi <m.lombardi85@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
cfbcd86
Parents:
8c76c30 (diff), 7308e84 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
Message:

merge mainline changes

File:
1 moved

Legend:

Unmodified
Added
Removed
  • release/Makefile

    r8c76c30 r4611094f  
    2828
    2929-include ../version
    30 -include ../Makefile.config
    31 -include ../boot/arch/$(BARCH)/Makefile.inc
    32 -include ../boot/Makefile.common
     30
     31EXPORT_DIR = /var/tmp/helenos/HelenOS-$(RELEASE)
     32SRC_ARCHIVE = HelenOS-$(RELEASE).tar.bz2
    3333
    3434PROFILES = amd64 arm32/GXemul arm32/integratorcp arm32/gta02 ia32 \
     
    3636    sparc64/serengeti sparc64/ultra
    3737
     38BZR = bzr
     39TAR = tar
     40
     41# To determine IMG_FILE
     42-include $(EXPORT_DIR)/Makefile.config
     43-include $(EXPORT_DIR)/boot/arch/$(BARCH)/Makefile.inc
     44-include $(EXPORT_DIR)/boot/Makefile.common
     45
    3846ifdef POST_OUTPUT
    39         IMGFILE = $(POST_OUTPUT)
     47        IMG_FILE = $(EXPORT_DIR)/boot/$(POST_OUTPUT)
    4048else
    41         IMGFILE = $(BOOT_OUTPUT)
     49        IMG_FILE = $(EXPORT_DIR)/boot/$(BOOT_OUTPUT)
    4250endif
    4351
    44 SUFFIX = $(suffix $(IMGFILE))
     52SUFFIX = $(suffix $(IMG_FILE))
    4553
    4654ifdef PROFILE
    47         DISTFILE = Helenos-$(shell echo $(PROFILE) | tr '/' '-')$(SUFFIX)
     55        RELEASE_FILE = HelenOS-$(RELEASE)-$(shell echo $(PROFILE) | tr '/' '-')$(SUFFIX)
    4856else
    49         DISTFILE = HelenOS-$(RELEASE)-$(PLATFORM)-$(MACHINE)-$(PROCESSOR)$(SUFFIX)
     57        RELEASE_FILE = HelenOS-$(RELEASE)-$(PLATFORM)-$(MACHINE)-$(PROCESSOR)$(SUFFIX)
    5058endif
    5159
    52 .PHONY: all clean dist distfile
     60.PHONY: all clean release releasefile export src_rel
    5361
    54 all: distfile
    55 distfile: $(DISTFILE)
     62all: releasefile
     63releasefile: $(RELEASE_FILE)
    5664
    57 $(DISTFILE): $(IMGFILE)
     65$(RELEASE_FILE): $(IMG_FILE)
    5866        cp $< $@
    5967
    60 $(IMGFILE):
    61         $(MAKE) -C ..
     68$(IMG_FILE):
     69        $(MAKE) -C $(EXPORT_DIR)
    6270
    63 dist:
     71release: src_rel
    6472        for profile in $(PROFILES); do \
    65                 $(MAKE) -C .. clean ; \
    66                 $(MAKE) -C .. PROFILE=$$profile distfile ; \
     73                $(MAKE) -C $(EXPORT_DIR) clean ; \
     74                $(MAKE) -C $(EXPORT_DIR) PROFILE=$$profile ; \
     75                $(MAKE) PROFILE=$$profile releasefile ; \
    6776        done
    6877
     78$(EXPORT_DIR) export:
     79        rm -rf $(EXPORT_DIR)
     80        mkdir -p $(EXPORT_DIR)
     81        $(BZR) export $(EXPORT_DIR)
     82
     83src_rel $(SRC_ARCHIVE): export
     84        $(TAR) -C $(shell dirname $(EXPORT_DIR)) \
     85            -cjf $(SRC_ARCHIVE) $(shell basename $(EXPORT_DIR))
     86
    6987clean:
    70         rm -f $(DISTFILE)
     88        rm -f $(RELEASE_FILE)
Note: See TracChangeset for help on using the changeset viewer.