]> Git Repo - linux.git/commitdiff
Merge branch 'kbuild' of git://git.kernel.org/pub/scm/linux/kernel/git/mmarek/kbuild
authorLinus Torvalds <[email protected]>
Tue, 14 Oct 2014 07:22:26 +0000 (09:22 +0200)
committerLinus Torvalds <[email protected]>
Tue, 14 Oct 2014 07:22:26 +0000 (09:22 +0200)
Pull kbuild changes from Michal Marek:
 - fix for handling dependencies of *-objs targets by Masahiro Yamada
 - lots of cleanups in the kbuild machinery, also by Masahiro
 - fixes for the kconfig build to use an UTF-8 capable ncurses library
   if possible and to build on not-so-standard installs
 - some more minor fixes

* 'kbuild' of git://git.kernel.org/pub/scm/linux/kernel/git/mmarek/kbuild:
  kbuild: Do not reference *-n variables in the Makefile
  kbuild: simplify build, clean, modbuiltin shorthands
  kbuild: arm: Do not define "comma" twice
  kbuild: remove obj-n and lib-n handling
  kbuild: remove unnecessary variable initializaions
  kbuild: remove unnecessary "obj- := dummy.o" trick
  kbuild: handle C=... and M=... after entering into build directory
  kbuild: use $(Q) for sub-make target
  kbuild: fake the "Entering directory ..." message more simply
  kconfig/lxdialog: get ncurses CFLAGS with pkg-config
  kconfig: nconfig: fix multi-byte UTF handling
  kconfig: lxdialog: fix spelling
  kbuild: Make scripts executable
  kbuild: remove redundant clean-files from scripts/kconfig/Makefile
  kbuild: refactor script/kconfig/Makefile
  kbuild: handle the dependency of multi-objs hostprogs appropriately
  kbuild: handle multi-objs dependency appropriately

1  2 
Makefile
arch/arm/Makefile
arch/arm/mach-at91/Makefile
arch/arm64/Makefile
drivers/clk/shmobile/Makefile
scripts/headers_install.sh
scripts/kconfig/Makefile

diff --combined Makefile
index 6127ca66ed981600ca738a43b3d558be43415c56,106f300128159d8ffa1710e59eaf2904e0cf69ec..36a77a3d156ce87dd0103a2a092a50482e01dd61
+++ b/Makefile
@@@ -1,7 -1,7 +1,7 @@@
  VERSION = 3
  PATCHLEVEL = 17
  SUBLEVEL = 0
 -EXTRAVERSION = -rc1
 +EXTRAVERSION =
  NAME = Shuffling Zombie Juror
  
  # *DOCUMENTATION*
  # Comments in this file are targeted only to the developer, do not
  # expect to learn how to build the kernel reading this file.
  
- # Do not:
- # o  use make's built-in rules and variables
- #    (this increases performance and avoids hard-to-debug behaviour);
- # o  print "Entering directory ...";
- MAKEFLAGS += -rR --no-print-directory
+ # Do not use make's built-in rules and variables
+ # (this increases performance and avoids hard-to-debug behaviour);
+ MAKEFLAGS += -rR
  
  # Avoid funny character set dependencies
  unexport LC_ALL
@@@ -97,34 -95,6 +95,6 @@@ endi
  
  export quiet Q KBUILD_VERBOSE
  
- # Call a source code checker (by default, "sparse") as part of the
- # C compilation.
- #
- # Use 'make C=1' to enable checking of only re-compiled files.
- # Use 'make C=2' to enable checking of *all* source files, regardless
- # of whether they are re-compiled or not.
- #
- # See the file "Documentation/sparse.txt" for more details, including
- # where to get the "sparse" utility.
- ifeq ("$(origin C)", "command line")
-   KBUILD_CHECKSRC = $(C)
- endif
- ifndef KBUILD_CHECKSRC
-   KBUILD_CHECKSRC = 0
- endif
- # Use make M=dir to specify directory of external module to build
- # Old syntax make ... SUBDIRS=$PWD is still supported
- # Setting the environment variable KBUILD_EXTMOD take precedence
- ifdef SUBDIRS
-   KBUILD_EXTMOD ?= $(SUBDIRS)
- endif
- ifeq ("$(origin M)", "command line")
-   KBUILD_EXTMOD := $(M)
- endif
  # kbuild supports saving output files in a separate directory.
  # To locate output files in a separate directory two syntaxes are supported.
  # In both cases the working directory must be the root of the kernel src.
  # The O= assignment takes precedence over the KBUILD_OUTPUT environment
  # variable.
  
  # KBUILD_SRC is set on invocation of make in OBJ directory
  # KBUILD_SRC is not intended to be used by the regular user (for now)
  ifeq ($(KBUILD_SRC),)
@@@ -172,17 -141,9 +141,9 @@@ PHONY += $(MAKECMDGOALS) sub-mak
  $(filter-out _all sub-make $(CURDIR)/Makefile, $(MAKECMDGOALS)) _all: sub-make
        @:
  
- # Fake the "Entering directory" message once, so that IDEs/editors are
- # able to understand relative filenames.
-        echodir := @echo
-  quiet_echodir := @echo
- silent_echodir := @:
  sub-make: FORCE
-       $($(quiet)echodir) "make[1]: Entering directory \`$(KBUILD_OUTPUT)'"
-       $(if $(KBUILD_VERBOSE:1=),@)$(MAKE) -C $(KBUILD_OUTPUT) \
-       KBUILD_SRC=$(CURDIR) \
-       KBUILD_EXTMOD="$(KBUILD_EXTMOD)" -f $(CURDIR)/Makefile \
-       $(filter-out _all sub-make,$(MAKECMDGOALS))
+       $(Q)$(MAKE) -C $(KBUILD_OUTPUT) KBUILD_SRC=$(CURDIR) \
+       -f $(CURDIR)/Makefile $(filter-out _all sub-make,$(MAKECMDGOALS))
  
  # Leave processing to above invocation of make
  skip-makefile := 1
@@@ -192,6 -153,39 +153,39 @@@ endif # ifeq ($(KBUILD_SRC),
  # We process the rest of the Makefile if this is the final invocation of make
  ifeq ($(skip-makefile),)
  
+ # Do not print "Entering directory ...",
+ # but we want to display it when entering to the output directory
+ # so that IDEs/editors are able to understand relative filenames.
+ MAKEFLAGS += --no-print-directory
+ # Call a source code checker (by default, "sparse") as part of the
+ # C compilation.
+ #
+ # Use 'make C=1' to enable checking of only re-compiled files.
+ # Use 'make C=2' to enable checking of *all* source files, regardless
+ # of whether they are re-compiled or not.
+ #
+ # See the file "Documentation/sparse.txt" for more details, including
+ # where to get the "sparse" utility.
+ ifeq ("$(origin C)", "command line")
+   KBUILD_CHECKSRC = $(C)
+ endif
+ ifndef KBUILD_CHECKSRC
+   KBUILD_CHECKSRC = 0
+ endif
+ # Use make M=dir to specify directory of external module to build
+ # Old syntax make ... SUBDIRS=$PWD is still supported
+ # Setting the environment variable KBUILD_EXTMOD take precedence
+ ifdef SUBDIRS
+   KBUILD_EXTMOD ?= $(SUBDIRS)
+ endif
+ ifeq ("$(origin M)", "command line")
+   KBUILD_EXTMOD := $(M)
+ endif
  # If building an external module we do not care about the all: rule
  # but instead _all depend on modules
  PHONY += all
@@@ -842,21 -836,6 +836,21 @@@ mod_strip_cmd = tru
  endif # INSTALL_MOD_STRIP
  export mod_strip_cmd
  
 +# CONFIG_MODULE_COMPRESS, if defined, will cause module to be compressed
 +# after they are installed in agreement with CONFIG_MODULE_COMPRESS_GZIP
 +# or CONFIG_MODULE_COMPRESS_XZ.
 +
 +mod_compress_cmd = true
 +ifdef CONFIG_MODULE_COMPRESS
 +  ifdef CONFIG_MODULE_COMPRESS_GZIP
 +    mod_compress_cmd = gzip -n
 +  endif # CONFIG_MODULE_COMPRESS_GZIP
 +  ifdef CONFIG_MODULE_COMPRESS_XZ
 +    mod_compress_cmd = xz
 +  endif # CONFIG_MODULE_COMPRESS_XZ
 +endif # CONFIG_MODULE_COMPRESS
 +export mod_compress_cmd
 +
  # Select initial ramdisk compression format, default is gzip(1).
  # This shall be used by the dracut(8) tool while creating an initramfs image.
  #
@@@ -889,9 -868,7 +883,7 @@@ vmlinux-dirs       := $(patsubst %/,%,$(filte
                     $(net-y) $(net-m) $(libs-y) $(libs-m)))
  
  vmlinux-alldirs       := $(sort $(vmlinux-dirs) $(patsubst %/,%,$(filter %/, \
-                    $(init-n) $(init-) \
-                    $(core-n) $(core-) $(drivers-n) $(drivers-) \
-                    $(net-n)  $(net-)  $(libs-n)    $(libs-))))
+                    $(init-) $(core-) $(drivers-) $(net-) $(libs-))))
  
  init-y                := $(patsubst %/, %/built-in.o, $(init-y))
  core-y                := $(patsubst %/, %/built-in.o, $(core-y))
@@@ -1547,8 -1524,6 +1539,8 @@@ endi
        $(cmd_crmodverdir)
        $(Q)$(MAKE) KBUILD_MODULES=$(if $(CONFIG_MODULES),1) \
        $(build)=$(build-dir)
 +# Make sure the latest headers are built for Documentation
 +Documentation/: headers_install
  %/: prepare scripts FORCE
        $(cmd_crmodverdir)
        $(Q)$(MAKE) KBUILD_MODULES=$(if $(CONFIG_MODULES),1) \
@@@ -1591,7 -1566,7 +1583,7 @@@ endi
  # Shorthand for $(Q)$(MAKE) -f scripts/Makefile.clean obj=dir
  # Usage:
  # $(Q)$(MAKE) $(clean)=dir
- clean := -f $(if $(KBUILD_SRC),$(srctree)/)scripts/Makefile.clean obj
+ clean := -f $(srctree)/scripts/Makefile.clean obj
  
  endif # skip-makefile
  
diff --combined arch/arm/Makefile
index dceb0441b1a6de111eb5cc3e9b96e1bbb5e69f34,8568b6fb9b3f3cba557783dacc2b47ddaf535838..034a94904d69e5578e3792408368ebc6c1d08a77
@@@ -50,8 -50,6 +50,6 @@@ AS            += -E
  LD            += -EL
  endif
  
- comma = ,
  # This selects which instruction set is used.
  # Note that GCC does not numerically define an architecture version
  # macro, but instead defines a whole series of macros which makes
@@@ -157,7 -155,6 +155,7 @@@ machine-$(CONFIG_ARCH_EBSA110)             += ebsa
  machine-$(CONFIG_ARCH_EFM32)          += efm32
  machine-$(CONFIG_ARCH_EP93XX)         += ep93xx
  machine-$(CONFIG_ARCH_EXYNOS)         += exynos
 +machine-$(CONFIG_ARCH_FOOTBRIDGE)     += footbridge
  machine-$(CONFIG_ARCH_GEMINI)         += gemini
  machine-$(CONFIG_ARCH_HIGHBANK)               += highbank
  machine-$(CONFIG_ARCH_HISI)           += hisi
@@@ -169,7 -166,6 +167,7 @@@ machine-$(CONFIG_ARCH_IXP4XX)              += ixp4x
  machine-$(CONFIG_ARCH_KEYSTONE)               += keystone
  machine-$(CONFIG_ARCH_KS8695)         += ks8695
  machine-$(CONFIG_ARCH_LPC32XX)                += lpc32xx
 +machine-$(CONFIG_ARCH_MESON)          += meson
  machine-$(CONFIG_ARCH_MMP)            += mmp
  machine-$(CONFIG_ARCH_MOXART)         += moxart
  machine-$(CONFIG_ARCH_MSM)            += msm
@@@ -207,6 -203,7 +205,6 @@@ machine-$(CONFIG_ARCH_VEXPRESS)            += vex
  machine-$(CONFIG_ARCH_VT8500)         += vt8500
  machine-$(CONFIG_ARCH_W90X900)                += w90x900
  machine-$(CONFIG_ARCH_ZYNQ)           += zynq
 -machine-$(CONFIG_FOOTBRIDGE)          += footbridge
  machine-$(CONFIG_PLAT_SPEAR)          += spear
  
  # Platform directory name.  This list is sorted alphanumerically
index ac99d87ffefea5562346f454ae145c1f3e94200e,75033839fc08cb631d34732488a78687be879788..1b9ae0257a6eac6321c94bea9ccde88a286731fd
@@@ -2,13 -2,12 +2,10 @@@
  # Makefile for the linux kernel.
  #
  
 -obj-y         := irq.o gpio.o setup.o sysirq_mask.o
 +obj-y         := gpio.o setup.o sysirq_mask.o
- obj-m         :=
- obj-n         :=
- obj-          :=
  
 +obj-$(CONFIG_OLD_IRQ_AT91)    += irq.o
  obj-$(CONFIG_OLD_CLK_AT91)    += clock.o
 -obj-$(CONFIG_AT91_SAM9_ALT_RESET) += at91sam9_alt_reset.o
 -obj-$(CONFIG_AT91_SAM9G45_RESET) += at91sam9g45_reset.o
 -obj-$(CONFIG_AT91_SAM9_TIME)  += at91sam926x_time.o
  obj-$(CONFIG_SOC_AT91SAM9)    += sam9_smc.o
  
  # CPU-specific support
@@@ -21,7 -20,6 +18,7 @@@ obj-$(CONFIG_SOC_AT91SAM9N12) += at91sa
  obj-$(CONFIG_SOC_AT91SAM9X5)  += at91sam9x5.o
  obj-$(CONFIG_SOC_AT91SAM9RL)  += at91sam9rl.o
  obj-$(CONFIG_SOC_SAMA5D3)     += sama5d3.o
 +obj-$(CONFIG_SOC_SAMA5D4)     += sama5d4.o
  
  obj-$(CONFIG_ARCH_AT91RM9200) += at91rm9200_devices.o
  obj-$(CONFIG_ARCH_AT91SAM9260)        += at91sam9260_devices.o
@@@ -45,6 -43,7 +42,6 @@@ obj-$(CONFIG_MACH_ECBAT91)    += board-ecb
  obj-$(CONFIG_MACH_YL9200)     += board-yl-9200.o
  obj-$(CONFIG_MACH_CPUAT91)    += board-cpuat91.o
  obj-$(CONFIG_MACH_ECO920)     += board-eco920.o
 -obj-$(CONFIG_MACH_RSI_EWS)    += board-rsi-ews.o
  
  # AT91SAM9260 board-specific support
  obj-$(CONFIG_MACH_AT91SAM9260EK) += board-sam9260ek.o
@@@ -67,6 -66,7 +64,6 @@@ obj-$(CONFIG_MACH_AT91SAM9RLEK)       += boar
  # AT91SAM9G20 board-specific support
  obj-$(CONFIG_MACH_AT91SAM9G20EK) += board-sam9g20ek.o
  obj-$(CONFIG_MACH_CPU9G20)    += board-cpu9krea.o
 -obj-$(CONFIG_MACH_ACMENETUSFOXG20) += board-foxg20.o
  obj-$(CONFIG_MACH_STAMP9G20)  += board-stamp9g20.o
  obj-$(CONFIG_MACH_PORTUXG20)  += board-stamp9g20.o
  obj-$(CONFIG_MACH_PCONTROL_G20)       += board-pcontrol-g20.o board-stamp9g20.o
diff --combined arch/arm64/Makefile
index 59c86b6b30520444d77f061d677049acb8e694b7,ebd06592d7a645158c326c1222e5838e662965d7..20901ffed182a6d1b1f41c08f91109e1ac2047ef
@@@ -30,8 -30,6 +30,6 @@@ AS            += -E
  LD            += -EL
  endif
  
- comma = ,
  CHECKFLAGS    += -D__aarch64__
  
  # Default value
@@@ -39,7 -37,7 +37,7 @@@ head-y                := arch/arm64/kernel/head.
  
  # The byte offset of the kernel image in RAM from the start of RAM.
  ifeq ($(CONFIG_ARM64_RANDOMIZE_TEXT_OFFSET), y)
 -TEXT_OFFSET := $(shell awk 'BEGIN {srand(); printf "0x%04x0\n", int(65535 * rand())}')
 +TEXT_OFFSET := $(shell awk 'BEGIN {srand(); printf "0x%03x000\n", int(512 * rand())}')
  else
  TEXT_OFFSET := 0x00080000
  endif
@@@ -47,7 -45,6 +45,7 @@@
  export        TEXT_OFFSET GZFLAGS
  
  core-y                += arch/arm64/kernel/ arch/arm64/mm/
 +core-$(CONFIG_NET) += arch/arm64/net/
  core-$(CONFIG_KVM) += arch/arm64/kvm/
  core-$(CONFIG_XEN) += arch/arm64/xen/
  core-$(CONFIG_CRYPTO) += arch/arm64/crypto/
index 531d4f6c70501e12aa19a1e6c4118a4a4fa1c615,9aab51c8d159bed07a78eedc6be59a3fcb49b912..960bf22d42ae156bda33c375ccfcbbb42bed8712
@@@ -4,8 -4,5 +4,6 @@@ obj-$(CONFIG_ARCH_R8A7740)               += clk-r8a7
  obj-$(CONFIG_ARCH_R8A7779)            += clk-r8a7779.o
  obj-$(CONFIG_ARCH_R8A7790)            += clk-rcar-gen2.o
  obj-$(CONFIG_ARCH_R8A7791)            += clk-rcar-gen2.o
 +obj-$(CONFIG_ARCH_R8A7794)            += clk-rcar-gen2.o
  obj-$(CONFIG_ARCH_SHMOBILE_MULTI)     += clk-div6.o
  obj-$(CONFIG_ARCH_SHMOBILE_MULTI)     += clk-mstp.o
- # for emply built-in.o
- obj-n := dummy
index fdebd66f8fc16c2db0189480318c5f8599aebdf0,5de5660cb7085ac899df9f9dc87989bc931f24be..fdebd66f8fc16c2db0189480318c5f8599aebdf0
mode 100644,100755..100755
@@@ -1,8 -1,8 +1,8 @@@
  #!/bin/sh
  
 -if [ $# -lt 1 ]
 +if [ $# -lt 2 ]
  then
 -      echo "Usage: headers_install.sh OUTDIR SRCDIR [FILES...]
 +      echo "Usage: headers_install.sh OUTDIR SRCDIR [FILES...]"
        echo
        echo "Prepares kernel header files for use by user space, by removing"
        echo "all compiler.h definitions and #includes, removing any"
diff --combined scripts/kconfig/Makefile
index ebf40f6edb4d4ee5f847a103cb082bcddec99dd6,c05938555225c127d31901b8f2a32d8f9f651e7e..9645c073938617dd1a72cb4b13973d86cef053e9
@@@ -104,23 -104,6 +104,23 @@@ endi
  %_defconfig: $(obj)/conf
        $(Q)$< --defconfig=arch/$(SRCARCH)/configs/$@ $(Kconfig)
  
 +configfiles=$(wildcard $(srctree)/kernel/configs/$(1).config $(srctree)/arch/$(SRCARCH)/configs/$(1).config)
 +
 +define mergeconfig
 +$(if $(wildcard $(objtree)/.config),, $(error You need an existing .config for this target))
 +$(if $(call configfiles,$(1)),, $(error No configuration exists for this target on this architecture))
 +$(Q)$(CONFIG_SHELL) $(srctree)/scripts/kconfig/merge_config.sh -m -O $(objtree) $(objtree)/.config $(call configfiles,$(1))
 +$(Q)yes "" | $(MAKE) -f $(srctree)/Makefile oldconfig
 +endef
 +
 +PHONY += kvmconfig
 +kvmconfig:
 +      $(call mergeconfig,kvm_guest)
 +
 +PHONY += tinyconfig
 +tinyconfig: allnoconfig
 +      $(call mergeconfig,tiny)
 +
  # Help text used by make help
  help:
        @echo  '  config          - Update current config utilising a line-oriented program'
        @echo  '  randconfig      - New config with random answer to all options'
        @echo  '  listnewconfig   - List new options'
        @echo  '  olddefconfig    - Same as silentoldconfig but sets new symbols to their default value'
 +      @echo  '  kvmconfig       - Enable additional options for guest kernel support'
 +      @echo  '  tinyconfig      - Configure the tiniest possible kernel'
  
  # lxdialog stuff
  check-lxdialog  := $(srctree)/$(src)/lxdialog/check-lxdialog.sh
@@@ -176,39 -157,10 +176,10 @@@ qconf-cxxobjs   := qconf.
  qconf-objs    := zconf.tab.o
  gconf-objs    := gconf.o zconf.tab.o
  
- hostprogs-y := conf
- ifeq ($(MAKECMDGOALS),nconfig)
-       hostprogs-y += nconf
- endif
- ifeq ($(MAKECMDGOALS),menuconfig)
-       hostprogs-y += mconf
- endif
- ifeq ($(MAKECMDGOALS),update-po-config)
-       hostprogs-y += kxgettext
- endif
- ifeq ($(MAKECMDGOALS),xconfig)
-       qconf-target := 1
- endif
- ifeq ($(MAKECMDGOALS),gconfig)
-       gconf-target := 1
- endif
- ifeq ($(qconf-target),1)
-       hostprogs-y += qconf
- endif
- ifeq ($(gconf-target),1)
-       hostprogs-y += gconf
- endif
+ hostprogs-y := conf nconf mconf kxgettext qconf gconf
  
  clean-files   := qconf.moc .tmp_qtcheck .tmp_gtkcheck
  clean-files   += zconf.tab.c zconf.lex.c zconf.hash.c gconf.glade.h
- clean-files     += mconf qconf gconf nconf
  clean-files     += config.pot linux.pot
  
  # Check that we have the required ncurses stuff installed for lxdialog (menuconfig)
@@@ -239,11 -191,12 +210,12 @@@ HOSTCFLAGS_gconf.o      = `pkg-config --cfla
  HOSTLOADLIBES_mconf   = $(shell $(CONFIG_SHELL) $(check-lxdialog) -ldflags $(HOSTCC))
  
  HOSTLOADLIBES_nconf   = $(shell \
-                               pkg-config --libs menu panel ncurses 2>/dev/null \
+                               pkg-config --libs menuw panelw ncursesw 2>/dev/null \
+                               || pkg-config --libs menu panel ncurses 2>/dev/null \
                                || echo "-lmenu -lpanel -lncurses"  )
  $(obj)/qconf.o: $(obj)/.tmp_qtcheck
  
- ifeq ($(qconf-target),1)
+ ifeq ($(MAKECMDGOALS),xconfig)
  $(obj)/.tmp_qtcheck: $(src)/Makefile
  -include $(obj)/.tmp_qtcheck
  
@@@ -300,7 -253,7 +272,7 @@@ endi
  
  $(obj)/gconf.o: $(obj)/.tmp_gtkcheck
  
- ifeq ($(gconf-target),1)
+ ifeq ($(MAKECMDGOALS),gconfig)
  -include $(obj)/.tmp_gtkcheck
  
  # GTK needs some extra effort, too...
This page took 0.098241 seconds and 4 git commands to generate.