Re: [PATCH] kbuild: scripts/kconfig/Makefile cleanup and fixes

From: Arnaud Lacombe
Date: Tue Apr 26 2011 - 02:38:44 EST


Hi,

On Mon, Apr 25, 2011 at 8:12 PM, Peter Foley <pefoley2@xxxxxxxxxxx> wrote:
> 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.
>
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

> Signed-off-by: Peter Foley <pefoley2@xxxxxxxxxxx>
> ---
>  scripts/kconfig/Makefile |   35 +++++++++++++++++++++--------------
>  1 files changed, 21 insertions(+), 14 deletions(-)
>
> diff --git a/scripts/kconfig/Makefile b/scripts/kconfig/Makefile
> index 368ae30..c4206ce 100644
> --- a/scripts/kconfig/Makefile
> +++ b/scripts/kconfig/Makefile
> @@ -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
> --
> 1.7.5.rc1
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-kbuild" in
> the body of a message to majordomo@xxxxxxxxxxxxxxx
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
>
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/