From bfbb4eb4457f9be68386e352d366a173f09e5c71 Mon Sep 17 00:00:00 2001 From: Mike Frysinger Date: Fri, 24 Jun 2011 19:10:12 +0000 Subject: [PATCH] add a new AS_VAR_PREPEND helper to simplify prepending stuff to variables git-svn-id: https://urjtag.svn.sourceforge.net/svnroot/urjtag/trunk@1913 b68d4a1b-bc3d-0410-92ed-d4ac073336b7 --- urjtag/ChangeLog | 5 +++++ urjtag/acinclude.m4 | 10 ++++++++++ urjtag/configure.ac | 2 +- 3 files changed, 16 insertions(+), 1 deletion(-) diff --git a/urjtag/ChangeLog b/urjtag/ChangeLog index 68347582..a11e4e80 100644 --- a/urjtag/ChangeLog +++ b/urjtag/ChangeLog @@ -1,3 +1,8 @@ +2011-06-24 Mike Frysinger + + * acinclude.m4: Add a new AS_VAR_PREPEND helper. + * configure.ac: Use AS_VAR_PREPEND rather than touching the var directly. + 2011-06-23 Mike Frysinger * src/cmd/Makefile.am: Tweak dependencies so things work from a fresh diff --git a/urjtag/acinclude.m4 b/urjtag/acinclude.m4 index 70889db2..59fcc23d 100644 --- a/urjtag/acinclude.m4 +++ b/urjtag/acinclude.m4 @@ -139,6 +139,16 @@ AC_DEFUN([AC_PROG_SED], ])dnl +dnl AS_VAR_PREPEND +dnl ------------- +dnl +dnl this isn't in autoconf (yet?) +dnl +m4_ifndef([AS_VAR_PREPEND],[dnl +AC_DEFUN([AS_VAR_PREPEND], [$1=$2${$1}]) +])dnl + + dnl AS_VAR_APPEND dnl ------------- dnl diff --git a/urjtag/configure.ac b/urjtag/configure.ac index 52d5d4ca..90b167b9 100644 --- a/urjtag/configure.ac +++ b/urjtag/configure.ac @@ -344,7 +344,7 @@ AS_IF([test "x$enable_werror" = xyes], [ ]) AC_SUBST(WARNINGCFLAGS) -CPPFLAGS="-I\$(top_srcdir) -I\$(top_srcdir)/include $CPPFLAGS" +AS_VAR_PREPEND([CPPFLAGS], '-I$(top_srcdir) -I$(top_srcdir)/include ') AC_ARG_ENABLE([apps], [AS_HELP_STRING([--disable-apps],