Ignore:
Timestamp:
2010-04-28T00:16:40+02:00 (6 years ago)
Author:
jow
Message:

[imagebuilder]

  • correctly copy .config when scripts/env is used in the buildroot
  • prevent user provides PACKAGES from overriding per-profile defaults
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/target/imagebuilder/files/Makefile

    r20064 r21213  
    6363  $(eval $(call Profile/Default)) 
    6464  $(eval $(call Profile/$(1))) 
    65   ifeq ($(PROFILE),) 
    66     PROFILE:=$(1) 
     65  ifeq ($(USER_PROFILE),) 
     66    USER_PROFILE:=$(1) 
    6767  endif 
    6868  $(1)_NAME:=$(NAME) 
     
    7474include $(INCLUDE_DIR)/target.mk 
    7575 
    76 info: FORCE 
     76_call_info: FORCE 
    7777        echo 'Current Target: "$(BOARD)$(if $(SUBTARGET), ($(BOARDNAME)))"' 
    7878        echo 'Default Packages: $(DEFAULT_PACKAGES)' 
     
    8585        @echo 'src packages file:$(PACKAGE_DIR)' >> $@ 
    8686 
    87 BUILD_PACKAGES:=$(sort $(DEFAULT_PACKAGES) $(PACKAGES) $($(PROFILE)_PACKAGES) kernel) 
     87BUILD_PACKAGES:=$(sort $(DEFAULT_PACKAGES) $(USER_PACKAGES) $($(USER_PROFILE)_PACKAGES) kernel) 
    8888# "-pkgname" in the package list means remove "pkgname" from the package list 
    8989BUILD_PACKAGES:=$(filter-out $(filter -%,$(BUILD_PACKAGES)) $(patsubst -%,%,$(filter -%,$(BUILD_PACKAGES))),$(BUILD_PACKAGES)) 
    9090 
    91 image: 
    92         echo 'Building images for $(BOARD)$(if $($(PROFILE)_NAME), - $($(PROFILE)_NAME))' 
     91_call_image: 
     92        echo 'Building images for $(BOARD)$(if $($(USER_PROFILE)_NAME), - $($(USER_PROFILE)_NAME))' 
    9393        echo 'Packages: $(BUILD_PACKAGES)' 
    9494        echo 
     
    9797        $(MAKE) package_index 
    9898        $(MAKE) package_install 
    99 ifneq ($(FILES),) 
     99ifneq ($(USER_FILES),) 
    100100        $(MAKE) copy_files 
    101101endif 
     
    119119        @echo 
    120120        @echo Copying extra files 
    121         $(CP) $(FILES)/* $(TARGET_DIR)/ 
     121        $(CP) $(USER_FILES)/* $(TARGET_DIR)/ 
    122122 
    123123package_postinst: FORCE 
     
    141141 
    142142 
     143info: 
     144        (unset PROFILE FILES PACKAGES MAKEFLAGS; $(MAKE) -s _call_info) 
     145 
     146image: 
     147        (unset PROFILE FILES PACKAGES MAKEFLAGS; \ 
     148        $(MAKE) _call_image \ 
     149                $(if $(PROFILE),USER_PROFILE="$(PROFILE)") \ 
     150                $(if $(FILES),USER_FILES="$(FILES)") \ 
     151                $(if $(PACKAGES),USER_PACKAGES="$(PACKAGES)")) 
     152 
    143153.SILENT: help info image 
    144154 
Note: See TracChangeset for help on using the changeset viewer.