summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorSam Ravnborg <sam@mars.ravnborg.org>2002-11-22 23:15:42 +0100
committerSam Ravnborg <sam@mars.ravnborg.org>2002-11-22 23:15:42 +0100
commit80fee71cbb24e2e0f26b284e57d703dd98993133 (patch)
tree70147451e7690ccf89b6d0d862c71da49bc6eb85 /scripts
parent996fdfdc65a5adfb6442f899c3a9eeba39c48361 (diff)
kbuild: Introduced build-targets
build-targets is used to list targets that is always built. This allowed misuse of EXTRA_TARGETS to be deleted. built-in.o is now only created for directories defining a obj-* variable, avoiding this for scripts and lxdialog One Makefile needed a dummy obj- statement
Diffstat (limited to 'scripts')
-rw-r--r--scripts/Makefile27
-rw-r--r--scripts/Makefile.build4
-rw-r--r--scripts/Makefile.lib1
-rw-r--r--scripts/lxdialog/Makefile8
4 files changed, 10 insertions, 30 deletions
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 \