From 15b189c6e3d28d535ab37992349d7f8bf19694d5 Mon Sep 17 00:00:00 2001 From: "Yann E. MORIN\"" Date: Wed, 18 Apr 2012 18:56:12 +0200 Subject: [PATCH] configure: allow user to override program-prefix By default, use the current 'kconfig-' prefix, but allow a user to change it, or even disable it. Reported-by: Peter Kjellerstedt Signed-off-by: "Yann E. MORIN" --- .hgignore | 18 +++++++++----- configure.ac | 10 ++++++++ frontends/conf/Makefile.am | 16 ++++++------- frontends/gconf/Makefile.am | 30 ++++++++++++------------ frontends/mconf/Makefile.am | 24 +++++++++---------- frontends/nconf/Makefile.am | 20 ++++++++-------- frontends/qconf/Makefile.am | 24 +++++++++---------- utils/Makefile.am | 16 ++++++------- utils/{kconfig-diff => diff} | 0 utils/{kconfig-gettext.c => gettext.c} | 0 utils/{kconfig-merge => merge} | 0 utils/{kconfig-streamline => streamline} | 0 utils/{kconfig-tweak => tweak} | 0 13 files changed, 87 insertions(+), 71 deletions(-) rename utils/{kconfig-diff => diff} (100%) rename utils/{kconfig-gettext.c => gettext.c} (100%) rename utils/{kconfig-merge => merge} (100%) rename utils/{kconfig-streamline => streamline} (100%) rename utils/{kconfig-tweak => tweak} (100%) diff --git a/.hgignore b/.hgignore index 11bb574..b2a8e12 100644 --- a/.hgignore +++ b/.hgignore @@ -7,11 +7,16 @@ syntax: glob *.la *.lai -frontends/conf/kconfig-conf -frontends/gconf/kconfig-gconf -frontends/mconf/kconfig-mconf -frontends/nconf/kconfig-nconf -frontends/qconf/kconfig-qconf +frontends/conf/conf +frontends/conf/*-conf +frontends/gconf/gconf +frontends/gconf/*-gconf +frontends/mconf/mconf +frontends/mconf/*-mconf +frontends/nconf/nconf +frontends/nconf/*-nconf +frontends/qconf/qconf +frontends/qconf/*-qconf frontends/qconf/qconf.moc frontends/*/.libs @@ -20,7 +25,8 @@ libs/images/images.h libs/parser/?conf.c libs/*/.libs -utils/kconfig-gettext +utils/gettext +utils/*-gettext utils/.libs aclocal.m4 diff --git a/configure.ac b/configure.ac index f5d613b..f286155 100644 --- a/configure.ac +++ b/configure.ac @@ -19,6 +19,15 @@ AC_CONFIG_MACRO_DIR([scripts/.autostuff/m4]) #---------------------------------------- # Prepare automake + +# We want to allow the user to override our default program-prefix, +# so we must set-it now, before automake has a chance to interpret +# it, but after the options are parsed, so as not to overwrite the +# value (if any) set by the user +AS_IF( + [test "$program_prefix" = NONE], + [program_prefix=kconfig-]) + AM_INIT_AUTOMAKE #---------------------------------------- @@ -445,5 +454,6 @@ AC_MSG_NOTICE([- parser library :$lib_list]) AC_MSG_NOTICE([ - root-menu prompt : $root_menu]) AC_MSG_NOTICE([ - config prefix : $config_prefix]) AC_MSG_NOTICE([- frontends :$fe_list]) +AC_MSG_NOTICE([ - transform name : $program_transform_name]) AC_MSG_NOTICE([- install utilities : $enable_utils]) AC_MSG_NOTICE([- CFLAGS CXXFLAGS : $wall_CFLAGS $werror_CFLAGS]) diff --git a/frontends/conf/Makefile.am b/frontends/conf/Makefile.am index 502fd76..12f7b6a 100644 --- a/frontends/conf/Makefile.am +++ b/frontends/conf/Makefile.am @@ -1,9 +1,9 @@ -bin_PROGRAMS = kconfig-conf +bin_PROGRAMS = conf -kconfig_conf_SOURCES = conf.c -kconfig_conf_CPPFLAGS = $(AM_CPPFLAGS) \ - $(GETTEXT) \ - -I$(top_srcdir)/libs/parser -kconfig_conf_CFLAGS = $(AM_CFLAGS) $(kf_CFLAGS) -kconfig_conf_LDADD = $(top_builddir)/libs/parser/libkconfig-parser.la \ - $(conf_EXTRA_LIBS) +conf_SOURCES = conf.c +conf_CPPFLAGS = $(AM_CPPFLAGS) \ + $(GETTEXT) \ + -I$(top_srcdir)/libs/parser +conf_CFLAGS = $(AM_CFLAGS) $(kf_CFLAGS) +conf_LDADD = $(top_builddir)/libs/parser/libkconfig-parser.la \ + $(conf_EXTRA_LIBS) diff --git a/frontends/gconf/Makefile.am b/frontends/gconf/Makefile.am index aa4186a..8d9cded 100644 --- a/frontends/gconf/Makefile.am +++ b/frontends/gconf/Makefile.am @@ -1,16 +1,16 @@ -bin_PROGRAMS = kconfig-gconf +bin_PROGRAMS = gconf -kconfig_gconf_SOURCES = gconf.c gconf.glade -kconfig_gconf_CPPFLAGS = $(AM_CPPFLAGS) \ - $(GETTEXT) \ - -I$(top_srcdir)/libs/parser \ - -I$(top_builddir)/libs/images \ - -DGUI_PATH='"$(pkgdatadir)/gconf.glade"' -kconfig_gconf_CFLAGS = $(AM_CFLAGS) \ - $(kf_CFLAGS) \ - $(gtk_CFLAGS) -kconfig_gconf_LDADD = $(top_builddir)/libs/parser/libkconfig-parser.la \ - $(top_builddir)/libs/images/libkconfig-images.a \ - $(gtk_LIBS) $(gconf_EXTRA_LIBS) -kconfig_gconfdir = $(pkgdatadir) -kconfig_gconf_DATA = gconf.glade +gconf_SOURCES = gconf.c gconf.glade +gconf_CPPFLAGS = $(AM_CPPFLAGS) \ + $(GETTEXT) \ + -I$(top_srcdir)/libs/parser \ + -I$(top_builddir)/libs/images \ + -DGUI_PATH='"$(pkgdatadir)/gconf.glade"' +gconf_CFLAGS = $(AM_CFLAGS) \ + $(kf_CFLAGS) \ + $(gtk_CFLAGS) +gconf_LDADD = $(top_builddir)/libs/parser/libkconfig-parser.la \ + $(top_builddir)/libs/images/libkconfig-images.a \ + $(gtk_LIBS) $(gconf_EXTRA_LIBS) +gconfdir = $(pkgdatadir) +gconf_DATA = gconf.glade diff --git a/frontends/mconf/Makefile.am b/frontends/mconf/Makefile.am index e5ce1b3..566fbe3 100644 --- a/frontends/mconf/Makefile.am +++ b/frontends/mconf/Makefile.am @@ -1,13 +1,13 @@ -bin_PROGRAMS = kconfig-mconf +bin_PROGRAMS = mconf -kconfig_mconf_SOURCES = mconf.c -kconfig_mconf_CPPFLAGS = $(AM_CPPFLAGS) \ - -DCURSES_LOC='"$(CURSES_LOC)"' \ - $(GETTEXT) \ - -I$(top_srcdir)/libs \ - -I$(top_srcdir)/libs/parser -kconfig_mconf_CFLAGS = $(AM_CFLAGS) \ - $(kf_CFLAGS) -kconfig_mconf_LDADD = $(top_builddir)/libs/parser/libkconfig-parser.la \ - $(top_builddir)/libs/lxdialog/libkconfig-lxdialog.a \ - $(ncurses_LIBS) $(mconf_EXTRA_LIBS) +mconf_SOURCES = mconf.c +mconf_CPPFLAGS = $(AM_CPPFLAGS) \ + -DCURSES_LOC='"$(CURSES_LOC)"' \ + $(GETTEXT) \ + -I$(top_srcdir)/libs \ + -I$(top_srcdir)/libs/parser +mconf_CFLAGS = $(AM_CFLAGS) \ + $(kf_CFLAGS) +mconf_LDADD = $(top_builddir)/libs/parser/libkconfig-parser.la \ + $(top_builddir)/libs/lxdialog/libkconfig-lxdialog.a \ + $(ncurses_LIBS) $(mconf_EXTRA_LIBS) diff --git a/frontends/nconf/Makefile.am b/frontends/nconf/Makefile.am index 9127dd9..00c9ca7 100644 --- a/frontends/nconf/Makefile.am +++ b/frontends/nconf/Makefile.am @@ -1,11 +1,11 @@ -bin_PROGRAMS = kconfig-nconf +bin_PROGRAMS = nconf -kconfig_nconf_SOURCES = nconf.c nconf.gui.c nconf.h -kconfig_nconf_CPPFLAGS = $(AM_CPPFLAGS) \ - $(GETTEXT) \ - -I$(top_srcdir)/libs/parser -kconfig_nconf_CFLAGS = $(AM_CFLAGS) \ - $(kf_CFLAGS) -kconfig_nconf_LDADD = $(top_builddir)/libs/parser/libkconfig-parser.la \ - $(ncurses_extra_LIBS) $(ncurses_LIBS) \ - $(nconf_EXTRA_LIBS) +nconf_SOURCES = nconf.c nconf.gui.c nconf.h +nconf_CPPFLAGS = $(AM_CPPFLAGS) \ + $(GETTEXT) \ + -I$(top_srcdir)/libs/parser +nconf_CFLAGS = $(AM_CFLAGS) \ + $(kf_CFLAGS) +nconf_LDADD = $(top_builddir)/libs/parser/libkconfig-parser.la \ + $(ncurses_extra_LIBS) $(ncurses_LIBS) \ + $(nconf_EXTRA_LIBS) diff --git a/frontends/qconf/Makefile.am b/frontends/qconf/Makefile.am index 99809b7..f6a6687 100644 --- a/frontends/qconf/Makefile.am +++ b/frontends/qconf/Makefile.am @@ -1,17 +1,17 @@ -bin_PROGRAMS = kconfig-qconf +bin_PROGRAMS = qconf -kconfig_qconf_SOURCES = qconf.cc qconf.h +qconf_SOURCES = qconf.cc qconf.h BUILT_SOURCES = qconf.moc -kconfig_qconf_CPPFLAGS = $(AM_CPPFLAGS) \ - $(GETTEXT) \ - -I$(top_srcdir)/libs/parser \ - -I$(top_builddir)/libs/images -kconfig_qconf_CXXFLAGS = $(AM_CXXFLAGS) \ - $(kf_CFLAGS) \ - $(qt4_CFLAGS) -kconfig_qconf_LDADD = $(top_builddir)/libs/parser/libkconfig-parser.la \ - $(top_builddir)/libs/images/libkconfig-images.a \ - $(qt4_LIBS) $(qconf_EXTRA_LIBS) +qconf_CPPFLAGS = $(AM_CPPFLAGS) \ + $(GETTEXT) \ + -I$(top_srcdir)/libs/parser \ + -I$(top_builddir)/libs/images +qconf_CXXFLAGS = $(AM_CXXFLAGS) \ + $(kf_CFLAGS) \ + $(qt4_CFLAGS) +qconf_LDADD = $(top_builddir)/libs/parser/libkconfig-parser.la \ + $(top_builddir)/libs/images/libkconfig-images.a \ + $(qt4_LIBS) $(qconf_EXTRA_LIBS) CLEANFILES = qconf.moc .h.moc: diff --git a/utils/Makefile.am b/utils/Makefile.am index 0268bbb..990db30 100644 --- a/utils/Makefile.am +++ b/utils/Makefile.am @@ -1,9 +1,9 @@ -dist_bin_SCRIPTS = kconfig-tweak kconfig-diff kconfig-merge -dist_bin_SCRIPTS += kconfig-streamline -bin_PROGRAMS = kconfig-gettext +dist_bin_SCRIPTS = tweak diff merge +dist_bin_SCRIPTS += streamline +bin_PROGRAMS = gettext -kconfig_gettext_SOURCES = kconfig-gettext.c -kconfig_gettext_CPPFLAGS = $(AM_CPPFLAGS) \ - -I$(top_srcdir)/libs/parser -kconfig_gettext_CFLAGS = $(AM_CFLAGS) $(kf_CFLAGS) -kconfig_gettext_LDADD = $(top_builddir)/libs/parser/libkconfig-parser.la +gettext_SOURCES = gettext.c +gettext_CPPFLAGS = $(AM_CPPFLAGS) \ + -I$(top_srcdir)/libs/parser +gettext_CFLAGS = $(AM_CFLAGS) $(kf_CFLAGS) +gettext_LDADD = $(top_builddir)/libs/parser/libkconfig-parser.la diff --git a/utils/kconfig-diff b/utils/diff similarity index 100% rename from utils/kconfig-diff rename to utils/diff diff --git a/utils/kconfig-gettext.c b/utils/gettext.c similarity index 100% rename from utils/kconfig-gettext.c rename to utils/gettext.c diff --git a/utils/kconfig-merge b/utils/merge similarity index 100% rename from utils/kconfig-merge rename to utils/merge diff --git a/utils/kconfig-streamline b/utils/streamline similarity index 100% rename from utils/kconfig-streamline rename to utils/streamline diff --git a/utils/kconfig-tweak b/utils/tweak similarity index 100% rename from utils/kconfig-tweak rename to utils/tweak -- 2.39.5