Changeset 4686fa6 in freewrt


Ignore:
Timestamp:
Dec 18, 2006, 8:01:30 PM (19 years ago)
Author:
Thorsten Glaser <tg@…>
Children:
f98018c
Parents:
1fe5e1e
Message:

implement splitting of .config into .cfg/* line by line
the files are only updated if their content changes, to
preserve mtime, except FWRT_HAVE_DOT_CONFIG which is magic

this will be used to forcefully rebuild packages during
an automatic build if their configuration options change

original idea by n0-1@, discussed on saturday

git-svn-id: svn://www.freewrt.org/branches/common-adk@1314 afb5a338-a214-0410-bd46-81f09a774fd1

Files:
2 added
3 edited

Legend:

Unmodified
Added
Removed
  • Config.in

    r1fe5e1e r4686fa6  
     1# $FreeWRT$
     2#-
     3# This file is part of the FreeWRT project. FreeWRT is copyrighted
     4# material, please see the LICENCE file in the top-level directory
     5# or at http://www.freewrt.org/licence for details.
     6
    17mainmenu "FreeWRT Configuration"
    28
     
    511        default y
    612
     13# this line is magic; do not remove it
     14# certain make rules depend on its existence
     15# and the name FWRT_HAVE_DOT_CONFIG is hard-coded
    716config FWRT_HAVE_DOT_CONFIG
    817        bool
     
    1625config FWRT_i386
    1726        tristate
    18        
     27
    1928config FWRT_mips
    2029        tristate
     
    8392
    8493config FWRT_WGET
    85         string 
     94        string
    8695        default "wget --passive-ftp -nd"
    8796
  • GNUmakefile

    r1fe5e1e r4686fa6  
    1010ifneq (${package},)
    1111subdir:=        package/${package}
     12_subdir_dep:=   ${TOPDIR}/.cfg/FWRT_HAVE_DOT_CONFIG
    1213endif
    1314
     
    1516${MAKECMDGOALS}: _subdir
    1617
    17 _subdir:
     18_subdir: ${_subdir_dep}
    1819        cd ${subdir} && TOPDIR=${TOPDIR} \
    1920            ${TOPDIR}/lbin/gmake ${MAKEFLAGS} ${MAKECMDGOALS}
     21
     22include lbin/prereq.mk
     23include mk/split-cfg.mk
    2024else
    2125include Makefile
  • mk/build.mk

    r1fe5e1e r4686fa6  
    2020ifeq ($(strip $(FWRT_HAVE_DOT_CONFIG)),y)
    2121include $(TOPDIR)/rules.mk
     22include mk/split-cfg.mk
    2223
    2324all: world
     
    2627.PHONY: all world clean cleandir distclean image_clean target_clean
    2728
    28 world: $(DL_DIR) $(BUILD_DIR)
     29world: $(DL_DIR) $(BUILD_DIR) ${TOPDIR}/.cfg/FWRT_HAVE_DOT_CONFIG
    2930        ${BASH} ${TOPDIR}/scripts/scan-pkgs.sh
    3031        $(MAKE) -f mk/build.mk tools/install toolchain/install target/compile package/compile root_clean package/install target/install package_index
     
    3940        @mkdir -p $(BUILD_DIR)
    4041
    41 package/%:
     42package/%: ${TOPDIR}/.cfg/FWRT_HAVE_DOT_CONFIG
    4243        @$(TRACE) $@
    4344        $(MAKE) -C package $(patsubst package/%,%,$@)
    4445
    45 target/%:
     46target/%: ${TOPDIR}/.cfg/FWRT_HAVE_DOT_CONFIG
    4647        @$(TRACE) $@
    4748        $(MAKE) -C target $(patsubst target/%,%,$@)
    4849
    49 toolchain/%:
     50toolchain/%: ${TOPDIR}/.cfg/FWRT_HAVE_DOT_CONFIG
    5051        @$(TRACE) $@
    5152        $(MAKE) -C toolchain $(patsubst toolchain/%,%,$@)
    5253
    53 tools/%:
     54tools/%: ${TOPDIR}/.cfg/FWRT_HAVE_DOT_CONFIG
    5455        @$(TRACE) $@
    5556        $(MAKE) -C tools $(patsubst tools/%,%,$@)
Note: See TracChangeset for help on using the changeset viewer.