diff options
author | Bernhard Reutner-Fischer <rep.dot.nop@gmail.com> | 2013-11-03 23:27:46 +0100 |
---|---|---|
committer | Bernhard Reutner-Fischer <rep.dot.nop@gmail.com> | 2013-11-06 22:21:59 +0100 |
commit | e286a674419d31cb0757dd2f8307d8b4756cf1f9 (patch) | |
tree | 6f79c58793acb4df16ac974b64ae6307cd28a0e2 /extra/config/Makefile | |
parent | acfc107a50344b100b9ea492678928acc047c6ae (diff) |
pull kconfig from linux-3.11
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Diffstat (limited to 'extra/config/Makefile')
-rw-r--r-- | extra/config/Makefile | 40 |
1 files changed, 17 insertions, 23 deletions
diff --git a/extra/config/Makefile b/extra/config/Makefile index 3cde22640..c306a7eb1 100644 --- a/extra/config/Makefile +++ b/extra/config/Makefile @@ -12,7 +12,6 @@ include $(top_srcdir)Makerules # ugh top_srcdir:=$(shell cd $(top_srcdir) && pwd)/ -srctree := $(top_srcdir) src := extra/config obj := $(top_builddir)$(src) @@ -20,29 +19,23 @@ generated := $(patsubst %_shipped,%,$(wildcard *_shipped)) generated := $(addprefix $(obj)/,$(generated:.c=.o)) include $(top_srcdir)extra/config/Makefile.kconfig -PHONY += $(always) -chk-lxdialog := $(top_srcdir)$(src)/lxdialog/check-lxdialog.sh -check-lxdialog := cd $(obj) && $(CONFIG_SHELL) $(chk-lxdialog) -HOST_EXTRACFLAGS = $(shell $(CONFIG_SHELL) -c '$(check-lxdialog) -ccflags') -HOST_LOADLIBES = $(shell $(CONFIG_SHELL) -c '$(check-lxdialog) -ldflags $(HOSTCC)') -HOST_EXTRACFLAGS += -DLOCALE -HOST_EXTRACFLAGS += $(shell $(CONFIG_SHELL) -c '$(srctree)/$(src)/check.sh $(HOSTCC) $(HOSTCFLAGS)') +HOST_EXTRACFLAGS += -DCONFIG_='""' # do not create temporary object in the readonly srctree -$(obj)/dochecklxdialog: - $(Q)cd $(obj) && $(CONFIG_SHELL) $(chk-lxdialog) -check $(HOSTCC) $(HOST_EXTRACFLAGS) $(HOST_LOADLIBES) -HOSTCFLAGS_lex.zconf.o := -I$(top_srcdir)$(src) +$(obj)/dochecklxdialog: CONFIG_SHELL:=cd $(obj) && $(CONFIG_SHELL) +HOSTCFLAGS_zconf.lex.o := -I$(top_srcdir)$(src) HOSTCFLAGS_zconf.tab.o := -I$(top_srcdir)$(src) conf-objs := $(addprefix $(obj)/,$(conf-objs)) mconf-objs := $(addprefix $(obj)/,$(mconf-objs)) +nconf-objs := $(addprefix $(obj)/,$(nconf-objs)) kxgettext-objs := $(addprefix $(obj)/,$(kxgettext-objs)) ifeq ($(findstring mconf,$(MAKECMDGOALS)),mconf) hostprogs-y += mconf endif - -#BUILD_CFLAGS-config = -W -Wall -pedantic -#BUILD_CFLAGS-lxdialog = -W -Wall -pedantic +ifeq ($(findstring nconf,$(MAKECMDGOALS)),nconf) +hostprogs-y += nconf +endif __hostprogs := $(sort $(hostprogs-y) $(hostprogs-m)) host-csingle:= $(foreach m,$(__hostprogs),$(if $($(m)-objs),,$(m))) @@ -50,16 +43,18 @@ host-cmulti := $(foreach m,$(__hostprogs),\ $(if $($(m)-cxxobjs),,$(if $($(m)-objs),$(m)))) host-cobjs := $(sort $(foreach m,$(__hostprogs),$($(m)-objs))) -conf mconf kxgettext: %: $(obj)/% -$(obj)/conf $(obj)/mconf $(obj)/kxgettext: BUILD_LDFLAGS=$(HOST_LOADLIBES) +conf mconf nconf kxgettext: %: $(obj)/% +$(obj)/conf $(obj)/mconf $(obj)/nconf $(obj)/kxgettext: BUILD_LDFLAGS=$(HOSTLOADLIBES_$(@F)) $(obj)/conf: $(conf-objs) $(hcompile.u) $(obj)/mconf: $(mconf-objs) $(hcompile.u) +$(obj)/nconf: $(nconf-objs) + $(hcompile.u) $(obj)/kxgettext: $(kxgettext-objs) $(hcompile.u) -$(host-csingle) $(host-cmulti) $(host-cobjs): BUILD_CFLAGS=$(HOST_EXTRACFLAGS) \ +$(host-csingle) $(host-cmulti) $(host-cobjs): BUILD_CFLAGS+=$(HOST_EXTRACFLAGS) \ $(HOSTCFLAGS) $(HOSTCFLAGS_$(@F)) host-cobjs.nogen := $(filter-out $(generated),$(host-cobjs)) @@ -70,19 +65,18 @@ $(host-cobjs.nogen): $(obj)/%.o: $(top_srcdir)$(src)/%.c $(host-cobjs.generated): $(obj)/%.o: $(obj)/%.c $(hcompile.o) -ifndef LKC_GENPARSER +# we use the pre-generated always $(obj)/%:: $(top_srcdir)$(src)/%_shipped @$(disp_gen) $(Q)cat $< > $@ -endif + CLEAN_extra/config menuconfig_clean: $(do_rm) $(clean-files) $(lxdialog) conf $(wildcard *.o) distclean: CLEAN_extra/config - $(Q)$(RM) -r $(lxdialog) $(conf-objs) $(mconf-objs) \ + $(Q)$(RM) -r $(lxdialog) $(conf-objs) $(mconf-objs) $(nconf-objs) \ $(kxgettext-objs) \ $(hostprogs-y) $(qconf-cxxobjs) $(qconf-objs) $(gconf-objs) \ .depend \ - $(top_builddir)include/config + $(top_builddir)include/config $(top_builddir)include/generated -FORCE: -.PHONY: FORCE clean distclean $(always) +.PHONY: clean distclean $(PHONY) |