Changeset 2725 in MondoRescue for branches/2.2.9/mindi-busybox/Makefile


Ignore:
Timestamp:
Feb 25, 2011, 9:26:54 PM (13 years ago)
Author:
Bruno Cornec
Message:
  • Update mindi-busybox to 1.18.3 to avoid problems with the tar command which is now failing on recent versions with busybox 1.7.3
File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/2.2.9/mindi-busybox/Makefile

    r1772 r2725  
    11VERSION = 1
    2 PATCHLEVEL = 7
     2PATCHLEVEL = 18
    33SUBLEVEL = 3
    4 EXTRAVERSION = -rPBREV
     4EXTRAVERSION =
    55NAME = Unnamed
    66
     
    142142export srctree objtree VPATH TOPDIR
    143143
    144 
    145 # SUBARCH tells the usermode build what the underlying arch is.  That is set
    146 # first, and if a usermode build is happening, the "ARCH=um" on the command
    147 # line overrides the setting of ARCH below.  If a native build is happening,
    148 # then ARCH is assigned, getting whatever value it gets normally, and
    149 # SUBARCH is subsequently ignored.
    150 
    151 SUBARCH := $(shell uname -m | sed -e s/i.86/i386/ -e s/sun4u/sparc64/ \
    152                   -e s/arm.*/arm/ -e s/sa110/arm/ \
    153                   -e s/s390x/s390/ -e s/parisc64/parisc/ \
    154                   -e s/ppc.*/powerpc/ -e s/mips.*/mips/ )
    155144
    156145# Cross compiling and selecting different set of gcc/bin-utils
     
    173162# Note: Some architectures assign CROSS_COMPILE in their arch/*/Makefile
    174163
    175 ARCH        ?= $(SUBARCH)
    176 CROSS_COMPILE   ?=
     164CROSS_COMPILE ?=
     165# bbox: we may have CONFIG_CROSS_COMPILER_PREFIX in .config,
     166# and it has not been included yet... thus using an awkward syntax.
     167ifeq ($(CROSS_COMPILE),)
     168CROSS_COMPILE := $(shell grep ^CONFIG_CROSS_COMPILER_PREFIX .config 2>/dev/null)
     169CROSS_COMPILE := $(subst CONFIG_CROSS_COMPILER_PREFIX=,,$(CROSS_COMPILE))
     170CROSS_COMPILE := $(subst ",,$(CROSS_COMPILE))
     171#")
     172endif
     173
     174# SUBARCH tells the usermode build what the underlying arch is.  That is set
     175# first, and if a usermode build is happening, the "ARCH=um" on the command
     176# line overrides the setting of ARCH below.  If a native build is happening,
     177# then ARCH is assigned, getting whatever value it gets normally, and
     178# SUBARCH is subsequently ignored.
     179
     180ifneq ($(CROSS_COMPILE),)
     181SUBARCH := $(shell echo $(CROSS_COMPILE) | cut -d- -f1)
     182else
     183SUBARCH := $(shell uname -m)
     184endif
     185SUBARCH := $(shell echo $(SUBARCH) | sed -e s/i.86/i386/ -e s/sun4u/sparc64/ \
     186                     -e s/arm.*/arm/ -e s/sa110/arm/ \
     187                     -e s/s390x/s390/ -e s/parisc64/parisc/ \
     188                     -e s/ppc.*/powerpc/ -e s/mips.*/mips/ )
     189
     190ARCH ?= $(SUBARCH)
    177191
    178192# Architecture as present in compile.h
     
    303317# Needed to be compatible with the O= option
    304318CFLAGS      := $(CFLAGS)
     319# Added only to final link stage of busybox binary
     320CFLAGS_busybox  := $(CFLAGS_busybox)
    305321CPPFLAGS    := $(CPPFLAGS)
    306322AFLAGS      := $(AFLAGS)
     
    342358# To avoid any implicit rule to kick in, define an empty command.
    343359scripts/basic/%: scripts_basic ;
     360
     361# This target generates Kbuild's and Config.in's from *.c files
     362PHONY += gen_build_files
     363gen_build_files: $(wildcard $(srctree)/*/*.c) $(wildcard $(srctree)/*/*/*.c)
     364    $(Q)$(srctree)/scripts/gen_build_files.sh $(srctree) $(objtree)
     365
     366# bbox: we have helpers in applets/
     367# we depend on scripts_basic, since scripts/basic/fixdep
     368# must be built before any other host prog
     369PHONY += applets_dir
     370applets_dir: scripts_basic gen_build_files
     371    $(Q)$(MAKE) $(build)=applets
     372
     373applets/%: applets_dir ;
    344374
    345375PHONY += outputmakefile
     
    362392
    363393no-dot-config-targets := clean mrproper distclean \
    364              cscope TAGS tags help %docs check%
     394             cscope TAGS tags help %docs
     395#bbox# check% is removed from above
    365396
    366397config-targets := 0
     
    403434export KBUILD_DEFCONFIG
    404435
    405 config %config: scripts_basic outputmakefile FORCE
     436config: scripts_basic outputmakefile gen_build_files FORCE
     437    $(Q)mkdir -p include
     438    $(Q)$(MAKE) $(build)=scripts/kconfig $@
     439    $(Q)$(MAKE) -C $(srctree) KBUILD_SRC= .kernelrelease
     440
     441%config: scripts_basic outputmakefile gen_build_files FORCE
    406442    $(Q)mkdir -p include
    407443    $(Q)$(MAKE) $(build)=scripts/kconfig $@
     
    416452# Additional helpers built in scripts/
    417453# Carefully list dependencies so we do not try to build scripts twice
    418 # in parrallel
     454# in parallel
    419455PHONY += scripts
    420 scripts: scripts_basic include/config/MARKER
     456scripts: gen_build_files scripts_basic include/config/MARKER
    421457    $(Q)$(MAKE) $(build)=$(@)
    422458
     
    429465libs-y      := \
    430466        archival/ \
    431         archival/libunarchive/ \
     467        archival/libarchive/ \
    432468        console-tools/ \
    433469        coreutils/ \
     
    438474        findutils/ \
    439475        init/ \
    440         ipsvd/ \
    441476        libbb/ \
    442477        libpwdgrp/ \
    443478        loginutils/ \
     479        mailutils/ \
    444480        miscutils/ \
    445481        modutils/ \
     
    447483        networking/libiproute/ \
    448484        networking/udhcp/ \
     485        printutils/ \
    449486        procps/ \
    450487        runit/ \
     
    453490        sysklogd/ \
    454491        util-linux/ \
     492        util-linux/volume_id/ \
    455493
    456494endif # KBUILD_EXTMOD
     
    477515# If kconfig.d is missing then we are probarly in a cleaned tree so
    478516# we execute the config step to be sure to catch updated Kconfig files
    479 include/autoconf.h: .kconfig.d .config
     517include/autoconf.h: .kconfig.d .config $(wildcard $(srctree)/*/*.c) $(wildcard $(srctree)/*/*/*.c) | gen_build_files
    480518    $(Q)$(MAKE) -f $(srctree)/Makefile silentoldconfig
     519
     520include/usage.h: gen_build_files
    481521
    482522else
     
    489529# This allow a user to issue only 'make' to build a kernel including modules
    490530# Defaults busybox but it is usually overridden in the arch makefile
    491 all: busybox
     531all: busybox doc
    492532
    493533-include $(srctree)/arch/$(ARCH)/Makefile
     
    496536#bbox# NOSTDINC_FLAGS += -nostdinc -isystem $(shell $(CC) -print-file-name=include)
    497537CHECKFLAGS += $(NOSTDINC_FLAGS)
    498 
    499 # warn about C99 declaration after statement
    500 CFLAGS += $(call cc-option,-Wdeclaration-after-statement,)
    501 
    502 # disable pointer signedness warnings in gcc 4.0
    503 CFLAGS += $(call cc-option,-Wno-pointer-sign,)
    504538
    505539# Default kernel image to build when no specific target is given.
     
    569603# May be overridden by arch/$(ARCH)/Makefile
    570604quiet_cmd_busybox__ ?= LINK    $@
    571       cmd_busybox__ ?= $(srctree)/scripts/trylink $(CC) $(LDFLAGS) \
    572       -o $@ -Wl,-Map -Wl,$@.map \
    573       -Wl,--warn-common -Wl,--sort-common -Wl,--gc-sections \
    574       -Wl,--start-group $(busybox-all) -Wl,--end-group \
    575       $(LDLIBS)
     605      cmd_busybox__ ?= $(srctree)/scripts/trylink \
     606      "$@" \
     607      "$(CC)" \
     608      "$(CFLAGS) $(CFLAGS_busybox)" \
     609      "$(LDFLAGS) $(EXTRA_LDFLAGS)" \
     610      "$(core-y)" \
     611      "$(libs-y)" \
     612      "$(LDLIBS)"
    576613
    577614# Generate System.map
     
    685722    $(Q)$(STRIP) -s --remove-section=.note --remove-section=.comment \
    686723        busybox_unstripped -o $@
     724# strip is confused by PIE executable and does not set exec bits
     725    $(Q)chmod a+x $@
    687726endif
    688727
     
    728767# Other SCMs can edit scripts/setlocalversion and add the appropriate
    729768# checks as needed.
    730 ifdef CONFIG_LOCALVERSION_AUTO
     769ifdef _BB_DISABLED_CONFIG_LOCALVERSION_AUTO
    731770    _localver-auto = $(shell $(CONFIG_SHELL) \
    732771                      $(srctree)/scripts/setlocalversion $(srctree))
     
    780819endif
    781820
    782 archprepare: prepare1 scripts_basic
     821archprepare: prepare1 scripts_basic applets_dir
    783822
    784823prepare0: archprepare FORCE
     
    804843#   Split autoconf.h into include/linux/config/*
    805844quiet_cmd_gen_bbconfigopts = GEN     include/bbconfigopts.h
    806       cmd_gen_bbconfigopts = $(srctree)/scripts/mkconfigs > include/bbconfigopts.h
     845      cmd_gen_bbconfigopts = $(srctree)/scripts/mkconfigs include/bbconfigopts.h include/bbconfigopts_bz2.h
    807846quiet_cmd_split_autoconf   = SPLIT   include/autoconf.h -> include/config/*
    808847      cmd_split_autoconf   = scripts/basic/split-include include/autoconf.h include/config
     
    841880# Modules
    842881
    843 ifdef CONFIG_MODULES
     882ifdef _BB_DISABLED_CONFIG_MODULES
    844883
    845884#   By default, build modules as well
     
    917956
    918957# Directories & files removed with 'make clean'
    919 CLEAN_DIRS  += $(MODVERDIR)
    920 CLEAN_FILES +=  busybox* System.map .kernelrelease \
     958CLEAN_DIRS  += $(MODVERDIR) _install 0_lib
     959CLEAN_FILES +=  busybox busybox_unstripped* busybox.links \
     960                System.map .kernelrelease \
    921961                .tmp_kallsyms* .tmp_version .tmp_busybox* .tmp_System.map
    922962
     
    927967          include/bbconfigopts.h \
    928968          include/usage_compressed.h \
    929           .kernelrelease Module.symvers tags TAGS cscope*
     969          include/applet_tables.h \
     970          applets/usage \
     971          .kernelrelease Module.symvers tags TAGS cscope* \
     972          busybox_old
    930973
    931974# clean - Delete most, but leave enough to build external modules
     
    943986    $(call cmd,rmfiles)
    944987    @find . $(RCS_FIND_IGNORE) \
    945         \( -name '*.[oas]' -o -name '*.ko' -o -name '.*.cmd' \
     988        \( -name '*.[oas]' -o -name '*.ko' -o -name '.*.cmd' \
    946989        -o -name '.*.d' -o -name '.*.tmp' -o -name '*.mod.c' \) \
    947990        -type f -print | xargs rm -f
     991
     992PHONY += doc-clean
     993doc-clean: rm-files := docs/busybox.pod \
     994          docs/BusyBox.html docs/busybox.1 docs/BusyBox.txt
     995doc-clean:
     996    $(call cmd,rmfiles)
    948997
    949998# mrproper - Delete all generated files, including .config
     
    9601009    $(call cmd,rmdirs)
    9611010    $(call cmd,rmfiles)
     1011    @find -name Config.src | sed 's/.src$$/.in/' | xargs -r rm -f
     1012    @find -name Kbuild.src | sed 's/.src$$//' | xargs -r rm -f
    9621013
    9631014# distclean
     
    9671018distclean: mrproper
    9681019    @find $(srctree) $(RCS_FIND_IGNORE) \
    969         \( -name '*.orig' -o -name '*.rej' -o -name '*~' \
     1020        \( -name '*.orig' -o -name '*.rej' -o -name '*~' \
    9701021        -o -name '*.bak' -o -name '#*#' -o -name '.*.orig' \
    971         -o -name '.*.rej' -o -size 0 \
     1022        -o -name '.*.rej' -o -name '*.tmp' -o -size 0 \
    9721023        -o -name '*%' -o -name '.*.cmd' -o -name 'core' \) \
    9731024        -type f -print | xargs rm -f
     
    10731124    $(call cmd,rmdirs)
    10741125    @find $(KBUILD_EXTMOD) $(RCS_FIND_IGNORE) \
    1075         \( -name '*.[oas]' -o -name '*.ko' -o -name '.*.cmd' \
     1126        \( -name '*.[oas]' -o -name '*.ko' -o -name '.*.cmd' \
    10761127        -o -name '.*.d' -o -name '.*.tmp' -o -name '*.mod.c' \) \
    10771128        -type f -print | xargs rm -f
     
    12401291
    12411292# Modules
    1242 / %/: prepare scripts FORCE
     1293%/: prepare scripts FORCE
    12431294    $(Q)$(MAKE) KBUILD_MODULES=$(if $(CONFIG_MODULES),1) \
    12441295    $(build)=$(build-dir)
     1296/: prepare scripts FORCE
     1297    $(Q)$(MAKE) KBUILD_MODULES=$(if $(CONFIG_MODULES),1) \
     1298    $(build)=$(build-dir)
     1299
    12451300%.ko: prepare scripts FORCE
    12461301    $(Q)$(MAKE) KBUILD_MODULES=$(if $(CONFIG_MODULES),1)   \
Note: See TracChangeset for help on using the changeset viewer.