Merge branch 'kbuild' of git://git.kernel.org/pub/scm/linux/kernel/git/mmarek/kbuild
authorLinus Torvalds <torvalds@linux-foundation.org>
Tue, 14 Oct 2014 07:22:26 +0000 (09:22 +0200)
committerLinus Torvalds <torvalds@linux-foundation.org>
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

55 files changed:
Makefile
arch/arm/Makefile
arch/arm/mach-at91/Makefile
arch/arm/mach-ebsa110/Makefile
arch/arm/mach-ep93xx/Makefile
arch/arm/mach-exynos/Makefile
arch/arm/mach-footbridge/Makefile
arch/arm/mach-iop13xx/Makefile
arch/arm/mach-iop32x/Makefile
arch/arm/mach-iop33x/Makefile
arch/arm/mach-ks8695/Makefile
arch/arm/mach-rpc/Makefile
arch/arm/mach-s3c24xx/Makefile
arch/arm/mach-s3c64xx/Makefile
arch/arm/mach-s5pv210/Makefile
arch/arm/mach-sa1100/Makefile
arch/arm/mach-u300/Makefile
arch/arm/plat-iop/Makefile
arch/arm/plat-omap/Makefile
arch/arm/plat-samsung/Makefile
arch/arm64/Makefile
drivers/clk/shmobile/Makefile
drivers/net/wimax/Makefile
firmware/Makefile
scripts/Kbuild.include
scripts/Makefile.build
scripts/Makefile.clean
scripts/Makefile.fwinst
scripts/Makefile.host
scripts/Makefile.lib
scripts/bootgraph.pl [changed mode: 0644->0755]
scripts/export_report.pl [changed mode: 0644->0755]
scripts/gcc-goto.sh [changed mode: 0644->0755]
scripts/gcc-ld [changed mode: 0644->0755]
scripts/gcc-version.sh [changed mode: 0644->0755]
scripts/gcc-x86_32-has-stack-protector.sh [changed mode: 0644->0755]
scripts/gcc-x86_64-has-stack-protector.sh [changed mode: 0644->0755]
scripts/gen_initramfs_list.sh [changed mode: 0644->0755]
scripts/headers_check.pl [changed mode: 0644->0755]
scripts/headers_install.sh [changed mode: 0644->0755]
scripts/kconfig/Makefile
scripts/kconfig/lxdialog/check-lxdialog.sh [changed mode: 0644->0755]
scripts/kconfig/lxdialog/dialog.h
scripts/kconfig/streamline_config.pl [changed mode: 0644->0755]
scripts/link-vmlinux.sh [changed mode: 0644->0755]
scripts/markup_oops.pl [changed mode: 0644->0755]
scripts/mkmakefile [changed mode: 0644->0755]
scripts/mksysmap [changed mode: 0644->0755]
scripts/package/builddeb [changed mode: 0644->0755]
scripts/package/buildtar [changed mode: 0644->0755]
scripts/profile2linkerlist.pl [changed mode: 0644->0755]
scripts/rt-tester/rt-tester.py [changed mode: 0644->0755]
scripts/selinux/install_policy.sh [changed mode: 0644->0755]
scripts/tracing/draw_functrace.py [changed mode: 0644->0755]
scripts/xz_wrap.sh [changed mode: 0644->0755]

index 6127ca66ed981600ca738a43b3d558be43415c56..36a77a3d156ce87dd0103a2a092a50482e01dd61 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -10,11 +10,9 @@ NAME = Shuffling Zombie Juror
 # 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 @@ endif
 
 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.
@@ -140,7 +110,6 @@ endif
 # 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 @@ PHONY += $(MAKECMDGOALS) sub-make
 $(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 @@ 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
@@ -889,9 +883,7 @@ vmlinux-dirs        := $(patsubst %/,%,$(filter %/, $(init-y) $(init-m) \
                     $(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))
@@ -1591,7 +1583,7 @@ endif
 # 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
 
index dceb0441b1a6de111eb5cc3e9b96e1bbb5e69f34..034a94904d69e5578e3792408368ebc6c1d08a77 100644 (file)
@@ -50,8 +50,6 @@ AS            += -EL
 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
index ac99d87ffefea5562346f454ae145c1f3e94200e..1b9ae0257a6eac6321c94bea9ccde88a286731fd 100644 (file)
@@ -3,9 +3,6 @@
 #
 
 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
index 935e4af01a2769a7ab83282bda801389f36a4d50..a7d68c13c1d16fb53ef40d4f3633915ba3b2448f 100644 (file)
@@ -5,6 +5,3 @@
 # Object file lists.
 
 obj-y                  := core.o io.o leds.o
-obj-m                  :=
-obj-n                  :=
-obj-                   :=
index 0dc51f9462ded5223839c8172d887da5b01fb063..78d427b34b1f2953c391af495d8e4f479ba6e811 100644 (file)
@@ -2,9 +2,6 @@
 # Makefile for the linux kernel.
 #
 obj-y                  := core.o clock.o
-obj-m                  :=
-obj-n                  :=
-obj-                   :=
 
 obj-$(CONFIG_EP93XX_DMA)       += dma.o
 
index 788f26d21141df6c67c0511e51d9a72d4b02c86e..27ae6144679c6a369087420836bf7210b728f116 100644 (file)
@@ -7,11 +7,6 @@
 
 ccflags-$(CONFIG_ARCH_MULTIPLATFORM) += -I$(srctree)/$(src)/include -I$(srctree)/arch/arm/plat-samsung/include
 
-obj-y                          :=
-obj-m                          :=
-obj-n                          :=
-obj-                           :=
-
 # Core
 
 obj-$(CONFIG_ARCH_EXYNOS)      += exynos.o pmu.o exynos-smc.o firmware.o
index c3faa3bc84dd3ea49321d06ae997132dabd12c7b..e83d5c8396ff720a9c1cb8a3e9095fe4d9166f3c 100644 (file)
@@ -5,9 +5,6 @@
 # Object file lists.
 
 obj-y                  := common.o dma.o isa-irq.o
-obj-m                  :=
-obj-n                  :=
-obj-                   :=
 
 pci-y                  += dc21285.o
 pci-$(CONFIG_ARCH_CATS) += cats-pci.o
index cad015fee12febbefa2e43fb5dbaaa3d39cfafcc..a3d9260e335f2f1e5f5e24119fc2e3cb247f00bd 100644 (file)
@@ -1,8 +1,3 @@
-obj-y                  :=
-obj-m                  :=
-obj-n                  :=
-obj-                   :=
-
 obj-$(CONFIG_ARCH_IOP13XX) += setup.o
 obj-$(CONFIG_ARCH_IOP13XX) += irq.o
 obj-$(CONFIG_ARCH_IOP13XX) += pci.o
index cfdf8a137c2b9f8911771d87859b0edb4934019b..2d4010abb82fb7e9bcd4e00199f14766d67a353b 100644 (file)
@@ -3,9 +3,6 @@
 #
 
 obj-y                  := irq.o
-obj-m                  :=
-obj-n                  :=
-obj-                   :=
 
 obj-$(CONFIG_MACH_GLANTANK) += glantank.o
 obj-$(CONFIG_ARCH_IQ80321) += iq80321.o
index 90081d8c9d16c862da18602d851d7aa92cbea5e5..e95db30d81d5ba74d34551a86020c66a0a40c431 100644 (file)
@@ -3,9 +3,6 @@
 #
 
 obj-y                  := irq.o uart.o
-obj-m                  :=
-obj-n                  :=
-obj-                   :=
 
 obj-$(CONFIG_ARCH_IQ80331) += iq80331.o
 obj-$(CONFIG_MACH_IQ80332) += iq80332.o
index e370caf0c91beacf86ba38305e97f7182f3e4730..8ecb7973ae542c4fa8f89a8f29e9f1ccb6d95c72 100644 (file)
@@ -4,9 +4,6 @@
 #
 
 obj-y                          := cpu.o irq.o time.o devices.o
-obj-m                          :=
-obj-n                          :=
-obj-                           :=
 
 # PCI support is optional
 obj-$(CONFIG_PCI)              += pci.o
index 992e28b4ae9a54ddab9ea92b2d0c92d6b303964e..2ebc6875aeb8f69dc4e27fd1bc3f636e8b2125f2 100644 (file)
@@ -5,7 +5,3 @@
 # Object file lists.
 
 obj-y                  := dma.o ecard.o fiq.o irq.o riscpc.o time.o
-obj-m                  :=
-obj-n                  :=
-obj-                   :=
-
index 2235d0d3b38dd933b81687bcc681001a2a44d8d8..b92071638733badcd7f69d65c685e35d731773a8 100644 (file)
@@ -7,11 +7,6 @@
 #
 # Licensed under GPLv2
 
-obj-y                          :=
-obj-m                          :=
-obj-n                          :=
-obj-                           :=
-
 # core
 
 obj-y                          += common.o
index 58069a702a435046ae627bff9ab4e8c689b1aa3c..12f67b61ca5f7e7340821f21744530bef0ec844d 100644 (file)
@@ -5,11 +5,6 @@
 #
 # Licensed under GPLv2
 
-obj-y                          :=
-obj-m                          :=
-obj-n                          :=
-obj-                           :=
-
 # Core
 
 obj-y                          += common.o
index 7dc2d0e25a83363e337e5e6e8433ee66ae1527cc..72b9e96715070f2c47b13b7f7aade101abb9586e 100644 (file)
@@ -7,11 +7,6 @@
 
 ccflags-$(CONFIG_ARCH_MULTIPLATFORM) += -I$(srctree)/$(src)/include -I$(srctree)/arch/arm/plat-samsung/include
 
-obj-y                          :=
-obj-m                          :=
-obj-n                          :=
-obj-                           :=
-
 # Core
 
 obj-$(CONFIG_PM_SLEEP)         += pm.o sleep.o
index 2732eef48966bfa337d34f32fb806f4e604d515c..f1114d11fe13eb21dfe51af7af00f0fb0c0e242a 100644 (file)
@@ -4,9 +4,6 @@
 
 # Common support
 obj-y := clock.o generic.o irq.o time.o #nmi-oopser.o
-obj-m :=
-obj-n :=
-obj-  :=
 
 # Specific board support
 obj-$(CONFIG_SA1100_ASSABET)           += assabet.o
index 3ec74ac95bc1c1087c04776c0c1b2e6176273f4f..87d37de054b65b5d273dddd29d97ac5fc0912c8b 100644 (file)
@@ -3,9 +3,6 @@
 #
 
 obj-y          := core.o
-obj-m          :=
-obj-n          :=
-obj-           :=
 
 obj-$(CONFIG_MACH_U300_SPIDUMMY)  += dummyspichip.o
 obj-$(CONFIG_REGULATOR_AB3100)    += regulator.o
index 224e56c6049b04f35579e385fd0a7bed83899b1c..f2af203d601f2bb057921e3277f489797dc77fc4 100644 (file)
@@ -2,8 +2,6 @@
 # Makefile for the linux kernel.
 #
 
-obj-y :=
-
 # IOP32X
 obj-$(CONFIG_ARCH_IOP32X) += i2c.o
 obj-$(CONFIG_ARCH_IOP32X) += pci.o
@@ -27,7 +25,3 @@ obj-$(CONFIG_ARCH_IOP33X) += restart.o
 # IOP13XX
 obj-$(CONFIG_ARCH_IOP13XX) += cp6.o
 obj-$(CONFIG_ARCH_IOP13XX) += time.o
-
-obj-m                  :=
-obj-n                  :=
-obj-                   :=
index 0b01b68fd033072c818de997bd07536feb2ca64b..97a50e8883f949726912263af5075db15c4d61e8 100644 (file)
@@ -6,9 +6,6 @@ ccflags-$(CONFIG_ARCH_MULTIPLATFORM) := -I$(srctree)/arch/arm/plat-omap/include
 
 # Common support
 obj-y := sram.o dma.o counter_32k.o
-obj-m :=
-obj-n :=
-obj-  :=
 
 # omap_device support (OMAP2+ only at the moment)
 
index 5fe175017f07bad4d698ad226e38b2c41cec0bb4..f0a008496993ec1a5fc1625068ffb69aa510a3f1 100644 (file)
@@ -6,11 +6,6 @@
 
 ccflags-$(CONFIG_ARCH_MULTI_V7) += -I$(srctree)/$(src)/include
 
-obj-y                          :=
-obj-m                          :=
-obj-n                          := dummy.o
-obj-                           :=
-
 # Objects we always build independent of SoC choice
 
 obj-y                          += init.o cpu.o
index 59c86b6b30520444d77f061d677049acb8e694b7..20901ffed182a6d1b1f41c08f91109e1ac2047ef 100644 (file)
@@ -30,8 +30,6 @@ AS            += -EL
 LD             += -EL
 endif
 
-comma = ,
-
 CHECKFLAGS     += -D__aarch64__
 
 # Default value
index 531d4f6c70501e12aa19a1e6c4118a4a4fa1c615..960bf22d42ae156bda33c375ccfcbbb42bed8712 100644 (file)
@@ -7,5 +7,3 @@ 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 992bc02bc016f55e3106b7f4e426998b908cd4d0..692184dd674a378aba293ca6be398eccd0aa8b87 100644 (file)
@@ -1,5 +1 @@
-
 obj-$(CONFIG_WIMAX_I2400M)     += i2400m/
-
-# (from Sam Ravnborg) force kbuild to create built-in.o
-obj- := dummy.o
index 0862d34cf7d1068db9e0d926646b431bf7c2fd4b..e297e1b52636dadb9bf3f3acb2102c079e73e0e6 100644 (file)
@@ -232,6 +232,6 @@ targets := $(fw-shipped-) $(patsubst $(obj)/%,%, \
 
 # Without this, built-in.o won't be created when it's empty, and the
 # final vmlinux link will fail.
-obj-n := dummy
+obj- := dummy
 
 hostprogs-y := ihex2fw
index 8a9a4e1c7eab6757f16daacd736529784881f39e..65e7b08bb2cc04db54412c07e72ef16c9fe2344e 100644 (file)
@@ -171,13 +171,13 @@ ld-ifversion = $(shell [ $(call ld-version) $(1) $(2) ] && echo $(3))
 # Shorthand for $(Q)$(MAKE) -f scripts/Makefile.build obj=
 # Usage:
 # $(Q)$(MAKE) $(build)=dir
-build := -f $(if $(KBUILD_SRC),$(srctree)/)scripts/Makefile.build obj
+build := -f $(srctree)/scripts/Makefile.build obj
 
 ###
 # Shorthand for $(Q)$(MAKE) -f scripts/Makefile.modbuiltin obj=
 # Usage:
 # $(Q)$(MAKE) $(modbuiltin)=dir
-modbuiltin := -f $(if $(KBUILD_SRC),$(srctree)/)scripts/Makefile.modbuiltin obj
+modbuiltin := -f $(srctree)/scripts/Makefile.modbuiltin obj
 
 # Prefix -I with $(srctree) if it is not an absolute path.
 # skip if -I has no parameter
index bf3e6778cd71addc1884b895a65cde06af11525e..649ce68440331cdd5c5446ac76e01a487d2bcf6a 100644 (file)
@@ -79,11 +79,11 @@ endif
 
 # ===========================================================================
 
-ifneq ($(strip $(lib-y) $(lib-m) $(lib-n) $(lib-)),)
+ifneq ($(strip $(lib-y) $(lib-m) $(lib-)),)
 lib-target := $(obj)/lib.a
 endif
 
-ifneq ($(strip $(obj-y) $(obj-m) $(obj-n) $(obj-) $(subdir-m) $(lib-target)),)
+ifneq ($(strip $(obj-y) $(obj-m) $(obj-) $(subdir-m) $(lib-target)),)
 builtin-target := $(obj)/built-in.o
 endif
 
@@ -382,16 +382,14 @@ cmd_link_multi-y = $(LD) $(ld_flags) -r -o $@ $(link_multi_deps) $(cmd_secanalys
 quiet_cmd_link_multi-m = LD [M]  $@
 cmd_link_multi-m = $(cmd_link_multi-y)
 
-# We would rather have a list of rules like
-#      foo.o: $(foo-objs)
-# but that's not so easy, so we rather make all composite objects depend
-# on the set of all their parts
-$(multi-used-y) : %.o: $(multi-objs-y) FORCE
+$(multi-used-y): FORCE
        $(call if_changed,link_multi-y)
+$(call multi_depend, $(multi-used-y), .o, -objs -y)
 
-$(multi-used-m) : %.o: $(multi-objs-m) FORCE
+$(multi-used-m): FORCE
        $(call if_changed,link_multi-m)
        @{ echo $(@:.o=.ko); echo $(link_multi_deps); } > $(MODVERDIR)/$(@F:.o=.mod)
+$(call multi_depend, $(multi-used-m), .o, -objs -y)
 
 targets += $(multi-used-y) $(multi-used-m)
 
index a651cee84f2a837ba2212bb82aa15433cb78ac90..b1c668dc68150b4780d0c5ff0c69cec5278c2daf 100644 (file)
@@ -10,7 +10,7 @@ __clean:
 # Shorthand for $(Q)$(MAKE) 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
 
 # The filename Kbuild has precedence over Makefile
 kbuild-dir := $(if $(filter /%,$(src)),$(src),$(srctree)/$(src))
@@ -23,15 +23,13 @@ __subdir-y  := $(patsubst %/,%,$(filter %/, $(obj-y)))
 subdir-y       += $(__subdir-y)
 __subdir-m     := $(patsubst %/,%,$(filter %/, $(obj-m)))
 subdir-m       += $(__subdir-m)
-__subdir-n     := $(patsubst %/,%,$(filter %/, $(obj-n)))
-subdir-n       += $(__subdir-n)
 __subdir-      := $(patsubst %/,%,$(filter %/, $(obj-)))
 subdir-                += $(__subdir-)
 
 # Subdirectories we need to descend into
 
 subdir-ym      := $(sort $(subdir-y) $(subdir-m))
-subdir-ymn      := $(sort $(subdir-ym) $(subdir-n) $(subdir-))
+subdir-ymn      := $(sort $(subdir-ym) $(subdir-))
 
 # Add subdir path
 
index d8e335eed22632a495c341c21d995a076ef7cb57..5b698add4f31ca634a273ae890cf52471ce85537 100644 (file)
@@ -2,7 +2,7 @@
 # Installing firmware
 #
 # We don't include the .config, so all firmware files are in $(fw-shipped-)
-# rather than in $(fw-shipped-y) or $(fw-shipped-n).
+# rather than in $(fw-shipped-y) or $(fw-shipped-m).
 # ==========================================================================
 
 INSTALL := install
index ab5980f917141e9f90f52a9ae49e71901104196f..133edfae5b8a8d7a66f59b9c1ef3130cb63eb928 100644 (file)
@@ -96,8 +96,9 @@ quiet_cmd_host-cmulti = HOSTLD  $@
       cmd_host-cmulti  = $(HOSTCC) $(HOSTLDFLAGS) -o $@ \
                          $(addprefix $(obj)/,$($(@F)-objs)) \
                          $(HOST_LOADLIBES) $(HOSTLOADLIBES_$(@F))
-$(host-cmulti): $(obj)/%: $(host-cobjs) FORCE
+$(host-cmulti): FORCE
        $(call if_changed,host-cmulti)
+$(call multi_depend, $(host-cmulti), , -objs)
 
 # Create .o file from a single .c file
 # host-cobjs -> .o
@@ -113,8 +114,9 @@ quiet_cmd_host-cxxmulti     = HOSTLD  $@
                          $(foreach o,objs cxxobjs,\
                          $(addprefix $(obj)/,$($(@F)-$(o)))) \
                          $(HOST_LOADLIBES) $(HOSTLOADLIBES_$(@F))
-$(host-cxxmulti): $(obj)/%: $(host-cobjs) $(host-cxxobjs) FORCE
+$(host-cxxmulti): FORCE
        $(call if_changed,host-cxxmulti)
+$(call multi_depend, $(host-cxxmulti), , -objs -cxxobjs)
 
 # Create .o file from a single .cc (C++) file
 quiet_cmd_host-cxxobjs = HOSTCXX $@
index 260bf8acfce96cfcbae0eb2c3c6754e96e649317..54be19a0fa512ed41338faae85746177f1b53376 100644 (file)
@@ -159,6 +159,15 @@ dtc_cpp_flags  = -Wp,-MD,$(depfile).pre.tmp -nostdinc                    \
 modname-multi = $(sort $(foreach m,$(multi-used),\
                $(if $(filter $(subst $(obj)/,,$*.o), $($(m:.o=-objs)) $($(m:.o=-y))),$(m:.o=))))
 
+# Useful for describing the dependency of composite objects
+# Usage:
+#   $(call multi_depend, multi_used_targets, suffix_to_remove, suffix_to_add)
+define multi_depend
+$(foreach m, $(notdir $1), \
+       $(eval $(obj)/$m: \
+       $(addprefix $(obj)/, $(foreach s, $3, $($(m:%$(strip $2)=%$(s)))))))
+endef
+
 ifdef REGENERATE_PARSERS
 
 # GPERF
old mode 100644 (file)
new mode 100755 (executable)
old mode 100644 (file)
new mode 100755 (executable)
old mode 100644 (file)
new mode 100755 (executable)
old mode 100644 (file)
new mode 100755 (executable)
old mode 100644 (file)
new mode 100755 (executable)
old mode 100644 (file)
new mode 100755 (executable)
old mode 100644 (file)
new mode 100755 (executable)
old mode 100644 (file)
new mode 100755 (executable)
old mode 100644 (file)
new mode 100755 (executable)
old mode 100644 (file)
new mode 100755 (executable)
index ebf40f6edb4d4ee5f847a103cb082bcddec99dd6..9645c073938617dd1a72cb4b13973d86cef053e9 100644 (file)
@@ -176,39 +176,10 @@ qconf-cxxobjs     := qconf.o
 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 +210,12 @@ HOSTCFLAGS_gconf.o        = `pkg-config --cflags gtk+-2.0 gmodule-2.0 libglade-2.0` \
 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 +272,7 @@ endif
 
 $(obj)/gconf.o: $(obj)/.tmp_gtkcheck
 
-ifeq ($(gconf-target),1)
+ifeq ($(MAKECMDGOALS),gconfig)
 -include $(obj)/.tmp_gtkcheck
 
 # GTK needs some extra effort, too...
old mode 100644 (file)
new mode 100755 (executable)
index 9d2a4c5..5075ebf
@@ -21,7 +21,11 @@ ldflags()
 # Where is ncurses.h?
 ccflags()
 {
-       if [ -f /usr/include/ncursesw/curses.h ]; then
+       if pkg-config --cflags ncursesw 2>/dev/null; then
+               echo '-DCURSES_LOC="<ncurses.h>" -DNCURSES_WIDECHAR=1'
+       elif pkg-config --cflags ncurses 2>/dev/null; then
+               echo '-DCURSES_LOC="<ncurses.h>"'
+       elif [ -f /usr/include/ncursesw/curses.h ]; then
                echo '-I/usr/include/ncursesw -DCURSES_LOC="<curses.h>"'
                echo ' -DNCURSES_WIDECHAR=1'
        elif [ -f /usr/include/ncurses/ncurses.h ]; then
index b4343d384926600329203b846855f940b597b5fd..fcffd5b41fb07bff8cab87c3cdee93c18e884e1b 100644 (file)
@@ -170,7 +170,7 @@ char item_tag(void);
 /* item list manipulation for lxdialog use */
 #define MAXITEMSTR 200
 struct dialog_item {
-       char str[MAXITEMSTR];   /* promtp displayed */
+       char str[MAXITEMSTR];   /* prompt displayed */
        char tag;
        void *data;     /* pointer to menu item - used by menubox+checklist */
        int selected;   /* Set to 1 by dialog_*() function if selected. */
old mode 100644 (file)
new mode 100755 (executable)
old mode 100644 (file)
new mode 100755 (executable)
old mode 100644 (file)
new mode 100755 (executable)
old mode 100644 (file)
new mode 100755 (executable)
old mode 100644 (file)
new mode 100755 (executable)
old mode 100644 (file)
new mode 100755 (executable)
old mode 100644 (file)
new mode 100755 (executable)
old mode 100644 (file)
new mode 100755 (executable)
old mode 100644 (file)
new mode 100755 (executable)
old mode 100644 (file)
new mode 100755 (executable)
old mode 100644 (file)
new mode 100755 (executable)
old mode 100644 (file)
new mode 100755 (executable)