kbuild: scripts/kconfig/Makefile cleanup and fixes
PATCH 1/1 kbuild: scripts/kconfig/Makefile cleanup and fixes
This patch:
Changes the update-po-config target to work when make is run from KBUILD_OUTDIR. Adds a check to only build kxgettext when needed.
Changes the qconf and gconf targets to change hostprogs-y when they are being built
like nconfig and menuconfig instead of defining *-objs.
Cleans up the clean-files definitions.
--- scripts/kconfig/Makefile | 35 +++++++++++++++++++++-------------- 1 files changed, 21 insertions(+), 14 deletions(-)
scripts/kconfig/Makefile +8 -7
@@ -77,14 +77,15 @@ localyesconfig: $(obj)/streamline_config.pl $(obj)/conf # The symlink is used to repair a deficiency in arch/um update-po-config: $(obj)/kxgettext $(obj)/gconf.glade.h $(Q)echo " GEN config" - $(Q)xgettext --default-domain=linux \ - --add-comments --keyword=_ --keyword=N_ \ - --from-code=UTF-8 \ - --files-from=scripts/kconfig/POTFILES.in \ + $(Q)xgettext --default-domain=linux \ + --add-comments --keyword=_ --keyword=N_ \ + --from-code=UTF-8 \ + --files-from=$(srctree)/scripts/kconfig/POTFILES.in \ + --directory=$(srctree) --directory=$(objtree) \ --output $(obj)/config.pot $(Q)sed -i s/CHARSET/UTF-8/ $(obj)/config.pot - $(Q)ln -fs Kconfig.i386 arch/um/Kconfig.arch - $(Q)(for i in `ls arch/*/Kconfig`; \ + $(Q)ln -fs Kconfig.x86 $(srctree)/arch/um/Kconfig + $(Q)(for i in `ls $(srctree)/arch/*/Kconfig`; \ do \ echo " GEN $$i"; \ $(obj)/kxgettext $$i \
@@ -92,7 +93,7 @@ update-po-config: $(obj)/kxgettext $(obj)/gconf.glade.h done ) $(Q)msguniq --sort-by-file --to-code=UTF-8 $(obj)/config.pot \ --output $(obj)/linux.pot - $(Q)rm -f arch/um/Kconfig.arch + $(Q)rm -f $(srctree)/arch/um/Kconfig $(Q)rm -f $(obj)/config.pot PHONY += allnoconfig allyesconfig allmodconfig alldefconfig randconfig
@@ -167,9 +168,12 @@ lxdialog += lxdialog/textbox.o lxdialog/yesno.o
lxdialog/menubox.o
conf-objs := conf.o zconf.tab.o
mconf-objs := mconf.o zconf.tab.o $(lxdialog)
nconf-objs := nconf.o zconf.tab.o nconf.gui.o
+qconf-cxxobjs := qconf.o
+qconf-objs := kconfig_load.o zconf.tab.o
+gconf-objs := gconf.o kconfig_load.o zconf.tab.o
kxgettext-objs := kxgettext.o zconf.tab.o
-hostprogs-y := conf qconf gconf kxgettext
+hostprogs-y := conf
ifeq ($(MAKECMDGOALS),nconfig)
hostprogs-y += nconf
@@ -186,18 +190,20 @@ ifeq ($(MAKECMDGOALS),gconfig)
gconf-target := 1
endif
+ifeq ($(MAKECMDGOALS),update-po-config)
+ hostprogs-y += kxgettext
+endif
ifeq ($(qconf-target),1)
-qconf-cxxobjs := qconf.o
-qconf-objs := kconfig_load.o zconf.tab.o
+ hostprogs-y += qconf
endif
ifeq ($(gconf-target),1)
-gconf-objs := gconf.o kconfig_load.o zconf.tab.o
+ hostprogs-y += gconf
endif
-clean-files := lkc_defs.h qconf.moc .tmp_qtcheck \
- .tmp_gtkcheck zconf.tab.c lex.zconf.c zconf.hash.c gconf.glade.h
+clean-files := lkc_defs.h qconf.moc .tmp_qtcheck .tmp_gtkcheck
+clean-files += zconf.tab.c lex.zconf.c zconf.hash.c gconf.glade.h clean-files += mconf qconf gconf nconf clean-files += config.pot linux.pot
@@ -325,7 +331,8 @@ $(obj)/lkc_defs.h: $(src)/lkc_proto.h
# Extract gconf menu items for I18N support
$(obj)/gconf.glade.h: $(obj)/gconf.glade
- intltool-extract --type=gettext/glade $(obj)/gconf.glade
+ $(Q)intltool-extract --type=gettext/glade --srcdir $(srctree) \
+ $(src)/gconf.glade
###
# The following requires flex/bison/gperf
Signature · 1 line
1.7.5.rc1
Hi,
Quoted 7 lines · Peter Foley
This patch:
Changes the update-po-config target to work when make is run fromKBUILD_OUTDIR. Adds a check to only build kxgettext when needed.
Changes the qconf and gconf targets to change hostprogs-y when they are being built like nconfig and menuconfig instead of defining *-objs.
Cleans up the clean-files definitions.
Would it be possible to split that one into several patches, one for each change ? Associating the diff and to log is pretty much impossible. From the commit message, that should be 4 patches.
Thanks,
- Arnaud
Quoted 99 lines
Signed-off-by Peter Foley <[email protected]>---
scripts/kconfig/Makefile | 35 +++++++++++++++++++++--------------1 files changed, 21 insertions(+), 14 deletions(-)scripts/kconfig/Makefile +0
-0@@ -77,14 +77,15 @@ localyesconfig: $(obj)/streamline_config.pl $(obj)/conf # The symlink is used to repair a deficiency in arch/umupdate-po-config: $(obj)/kxgettext $(obj)/gconf.glade.h $(Q)echo " GEN config"
- $(Q)xgettext --default-domain=linux \
- --add-comments --keyword=_ --keyword=N_ \
- --from-code=UTF-8 \
- --files-from=scripts/kconfig/POTFILES.in \
+ $(Q)xgettext --default-domain=linux \
+ --add-comments --keyword=_ --keyword=N_ \
+ --from-code=UTF-8 \
+ --files-from=$(srctree)/scripts/kconfig/POTFILES.in \
+ --directory=$(srctree) --directory=$(objtree) \
--output $(obj)/config.pot
$(Q)sed -i s/CHARSET/UTF-8/ $(obj)/config.pot
- $(Q)ln -fsKconfig.i386arch/um/Kconfig.arch
- $(Q)(for i inls arch/*/Kconfig; \
+ $(Q)ln -fsKconfig.x86$(srctree)/arch/um/Kconfig
+ $(Q)(for i inls $(srctree)/arch/*/Kconfig; \
do \
echo " GEN $$i"; \
$(obj)/kxgettext $$i \scripts/kconfig/Makefile +0
-0@@ -92,7 +93,7 @@ update-po-config: $(obj)/kxgettext $(obj)/gconf.glade.h done ) $(Q)msguniq --sort-by-file --to-code=UTF-8 $(obj)/config.pot \--output $(obj)/linux.pot
- $(Q)rm -farch/um/Kconfig.arch
+ $(Q)rm -f $(srctree)/arch/um/Kconfig
$(Q)rm -f $(obj)/config.potPHONY += allnoconfig allyesconfig allmodconfig alldefconfig randconfig
scripts/kconfig/Makefile +0
-0@@ -167,9 +168,12 @@ lxdialog += lxdialog/textbox.o lxdialog/yesno.o
lxdialog/menubox.o
conf-objs := conf.o zconf.tab.o mconf-objs := mconf.o zconf.tab.o $(lxdialog) nconf-objs := nconf.o zconf.tab.o nconf.gui.oscripts/kconfig/Makefile +3
-0+qconf-cxxobjs := qconf.o +qconf-objs := kconfig_load.o zconf.tab.o +gconf-objs := gconf.o kconfig_load.o zconf.tab.okxgettext-objs := kxgettext.o zconf.tab.o
scripts/kconfig/Makefile +1
-1-hostprogs-y := conf qconf gconf kxgettext +hostprogs-y := confifeq ($(MAKECMDGOALS),nconfig)
hostprogs-y += nconfscripts/kconfig/Makefile +0
-0@@ -186,18 +190,20 @@ ifeq ($(MAKECMDGOALS),gconfig)gconf-target := 1
endifscripts/kconfig/Makefile +3
-0+ifeq ($(MAKECMDGOALS),update-po-config) + hostprogs-y += kxgettext +endififeq ($(qconf-target),1)
scripts/kconfig/Makefile +1
-2-qconf-cxxobjs := qconf.o -qconf-objs := kconfig_load.o zconf.tab.o + hostprogs-y += qconfendif
ifeq ($(gconf-target),1)
-gconf-objs := gconf.o kconfig_load.o zconf.tab.o
+ hostprogs-y += gconf
endifscripts/kconfig/Makefile +2
-2-clean-files := lkc_defs.h qconf.moc .tmp_qtcheck \ - .tmp_gtkcheck zconf.tab.c lex.zconf.c zconf.hash.c gconf.glade.h +clean-files := lkc_defs.h qconf.moc .tmp_qtcheck .tmp_gtkcheck +clean-files += zconf.tab.c lex.zconf.c zconf.hash.c gconf.glade.hclean-files += mconf qconf gconf nconf
clean-files += config.pot linux.potscripts/kconfig/Makefile +0
-0@@ -325,7 +331,8 @@ $(obj)/lkc_defs.h: $(src)/lkc_proto.h # Extract gconf menu items for I18N support$(obj)/gconf.glade.h: $(obj)/gconf.glade
- intltool-extract --type=gettext/glade $(obj)/gconf.glade
+ $(Q)intltool-extract --type=gettext/glade --srcdir $(srctree) \
+ $(src)/gconf.glade###
# The following requires flex/bison/gperf
--
1.7.5.rc1--
To unsubscribe from this list: send the line "unsubscribe linux-kbuild" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Quoted 10 lines · Arnaud Lacombe
Hi,
Quoted 7 lines · Peter Foley
This patch:
Changes the update-po-config target to work when make is run fromKBUILD_OUTDIR. Adds a check to only build kxgettext when needed.
Changes the qconf and gconf targets to change hostprogs-y when they are being built
like nconfig and menuconfig instead of defining *-objs.
Cleans up the clean-files definitions.
Quoted 7 lines
Would it be possible to split that one into several patches, one for each change ? Associating the diff and to log is pretty much impossible. From the commit message, that should be 4 patches.
Thanks,
- Arnaud
Ok, I'll do that.
Thanks,
Peter Foley