summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Makefile2
-rw-r--r--drivers/misc/Makefile2
-rw-r--r--scripts/Makefile27
-rw-r--r--scripts/Makefile.build4
-rw-r--r--scripts/Makefile.lib1
-rw-r--r--scripts/lxdialog/Makefile8
6 files changed, 12 insertions, 32 deletions
diff --git a/Makefile b/Makefile
index 2d97192ece66..50214dd1f61c 100644
--- a/Makefile
+++ b/Makefile
@@ -629,7 +629,7 @@ xconfig: scripts/kconfig/qconf
./scripts/kconfig/qconf arch/$(ARCH)/Kconfig
menuconfig: scripts/kconfig/mconf
- $(Q)$(MAKE) -f scripts/Makefile.build obj=scripts lxdialog
+ $(Q)$(MAKE) -f scripts/Makefile.build obj=scripts/lxdialog
./scripts/kconfig/mconf arch/$(ARCH)/Kconfig
config: scripts/kconfig/conf
diff --git a/drivers/misc/Makefile b/drivers/misc/Makefile
index dc7ec8baee12..5ce866f84241 100644
--- a/drivers/misc/Makefile
+++ b/drivers/misc/Makefile
@@ -1,5 +1,5 @@
#
# Makefile for misc devices that really don't fit anywhere else.
#
-
+obj- := misc.o # Dummy rule to force built-in.o to be made
include $(TOPDIR)/Rules.make
diff --git a/scripts/Makefile b/scripts/Makefile
index 5ecc03a43242..25979b0efdb3 100644
--- a/scripts/Makefile
+++ b/scripts/Makefile
@@ -8,31 +8,12 @@
# docproc: Preprocess .tmpl file in order to generate .sgml documentation
# conmakehash: Create arrays for initializing the kernel console tables
-EXTRA_TARGETS := fixdep split-include docproc conmakehash
+host-progs := fixdep split-include conmakehash docproc
+build-targets := $(host-progs)
+# Let clean descend into subdirs
subdir- := lxdialog kconfig
-# Yikes. We need to build this stuff here even if the user only wants
-# modules.
-
-KBUILD_BUILTIN := 1
-
-# The following temporary rule will make sure that people's
-# trees get updated to the right permissions, since patch(1)
-# can't do it
-# ---------------------------------------------------------------------------
-
-host-progs := fixdep split-include conmakehash docproc
-
-include $(TOPDIR)/Rules.make
-
-
-# ---------------------------------------------------------------------------
-# Targets hardcoded and wellknow in top-level makefile
-.PHONY: lxdialog
-lxdialog:
- $(call descend,scripts/lxdialog,)
-
# fixdep is needed to compile other host programs
$(obj)/split-include $(obj)/docproc \
-$(obj)/conmakehash lxdialog: $(obj)/fixdep
+$(obj)/conmakehash: $(obj)/fixdep
diff --git a/scripts/Makefile.build b/scripts/Makefile.build
index db56f901d0ae..37e73b5e0b9b 100644
--- a/scripts/Makefile.build
+++ b/scripts/Makefile.build
@@ -40,12 +40,14 @@ endif
ifdef L_TARGET
L_TARGET := $(obj)/$(L_TARGET)
else
+ifneq ($(strip $(obj-y) $(obj-m) $(obj-n) $(obj-)),)
O_TARGET := $(obj)/built-in.o
endif
+endif
__build: $(if $(KBUILD_BUILTIN),$(O_TARGET) $(L_TARGET) $(EXTRA_TARGETS)) \
$(if $(KBUILD_MODULES),$(obj-m)) \
- $(subdir-ym)
+ $(subdir-ym) $(build-targets)
@:
# Compile C sources (.c)
diff --git a/scripts/Makefile.lib b/scripts/Makefile.lib
index dd074686c2e7..0f8c58e0996c 100644
--- a/scripts/Makefile.lib
+++ b/scripts/Makefile.lib
@@ -92,6 +92,7 @@ host-cshobjs := $(sort $(foreach m,$(host-cshlib),$($(m:.so=-objs))))
# Add subdir path
EXTRA_TARGETS := $(addprefix $(obj)/,$(EXTRA_TARGETS))
+build-targets := $(addprefix $(obj)/,$(build-targets))
obj-y := $(addprefix $(obj)/,$(obj-y))
obj-m := $(addprefix $(obj)/,$(obj-m))
export-objs := $(addprefix $(obj)/,$(export-objs))
diff --git a/scripts/lxdialog/Makefile b/scripts/lxdialog/Makefile
index 252c5bf86cd1..f4b40f078ee8 100644
--- a/scripts/lxdialog/Makefile
+++ b/scripts/lxdialog/Makefile
@@ -15,19 +15,15 @@ endif
endif
endif
-host-progs := lxdialog
+host-progs := lxdialog
+build-targets := $(host-progs)
lxdialog-objs := checklist.o menubox.o textbox.o yesno.o inputbox.o \
util.o lxdialog.o msgbox.o
-EXTRA_TARGETS := lxdialog
-
first_rule: ncurses
-include $(TOPDIR)/Rules.make
-
.PHONY: ncurses
-
ncurses:
@echo "main() {}" > lxtemp.c
@if $(HOSTCC) lxtemp.c $(HOST_LOADLIBES); then \