From 94e9de894400cd10f16fb34af58e82a154e77b78 Mon Sep 17 00:00:00 2001 From: "Yann E. MORIN\"" Date: Sun, 3 Jun 2012 22:06:04 +0200 Subject: [PATCH] utils/tweak: use ./configured config prefix Signed-off-by: "Yann E. MORIN" --- .hgignore | 1 + scripts/ksync.list | 2 +- utils/Makefile.am | 11 ++++- utils/{tweak => tweak.in} | 28 ++++++------ utils/tweak.in.patch | 90 +++++++++++++++++++++++++++++++++++++++ utils/tweak.patch | 11 ----- 6 files changed, 116 insertions(+), 27 deletions(-) rename utils/{tweak => tweak.in} (79%) mode change 100755 => 100644 create mode 100644 utils/tweak.in.patch delete mode 100644 utils/tweak.patch diff --git a/.hgignore b/.hgignore index b2a8e12..66f8316 100644 --- a/.hgignore +++ b/.hgignore @@ -25,6 +25,7 @@ libs/images/images.h libs/parser/?conf.c libs/*/.libs +utils/tweak utils/gettext utils/*-gettext utils/.libs diff --git a/scripts/ksync.list b/scripts/ksync.list index 4908efe..45f19dc 100644 --- a/scripts/ksync.list +++ b/scripts/ksync.list @@ -27,7 +27,7 @@ scripts/kconfig/menu.c --> libs/parser/menu.c scripts/kconfig/symbol.c --> libs/parser/symbol.c scripts/kconfig/util.c --> libs/parser/util.c scripts/kconfig/zconf.y --> libs/parser/yconf.y -scripts/config --> utils/tweak +scripts/config --> utils/tweak.in scripts/diffconfig --> utils/diff scripts/kconfig/merge_config.sh --> utils/merge scripts/kconfig/streamline_config.pl --> utils/streamline diff --git a/utils/Makefile.am b/utils/Makefile.am index 843c696..b5cab00 100644 --- a/utils/Makefile.am +++ b/utils/Makefile.am @@ -1,5 +1,5 @@ -dist_bin_SCRIPTS = tweak diff merge -dist_bin_SCRIPTS += streamline +bin_SCRIPTS = tweak +dist_bin_SCRIPTS = diff merge streamline if COND_utils_gettext MAYBE_utils_gettext = gettext @@ -12,3 +12,10 @@ gettext_CPPFLAGS = $(AM_CPPFLAGS) \ gettext_CFLAGS = $(AM_CFLAGS) $(kf_CFLAGS) gettext_LDADD = $(top_builddir)/libs/parser/libkconfig-parser.la \ $(intl_LIBS) +CLEANFILES = tweak +EXTRA_DIST = tweak.in tweak.in.patch + +tweak: tweak.in + $(AM_V_GEN)$(SED) -r -e "s/@CONFIG_@/$(config_prefix)/g" \ + $< >$@ + @chmod +x $@ diff --git a/utils/tweak b/utils/tweak.in old mode 100755 new mode 100644 similarity index 79% rename from utils/tweak rename to utils/tweak.in index 80d29a1..ef7a64a --- a/utils/tweak +++ b/utils/tweak.in @@ -1,6 +1,8 @@ #!/bin/bash # Manipulate options in a .config file from the command line +CONFIG_="@CONFIG_@" + usage() { cat >&2 <&2 <