aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKay Sievers <kay.sievers@vrfy.org>2011-12-21 01:54:40 +0100
committerKay Sievers <kay.sievers@vrfy.org>2011-12-21 01:54:40 +0100
commit34c9205d5b3e95d0521c6e9b5b1137d090c83b9c (patch)
treebadb5afb9cf2f1c94e8c9f8e09f33911d18a9ba6
parentb45d75dcf7ad6b2633b61d862a8cafd4eaeb86b3 (diff)
downloadlibabc-34c9205d5b3e95d0521c6e9b5b1137d090c83b9c.tar.gz
do not (mis-)use the config file generator for non-autobuild stuff
"Similarly, you should not rely on AC_CONFIG_FILES to replace bindir and friends in your shell scripts and other files; instead, let make manage their replacement." http://www.gnu.org/software/autoconf/manual/autoconf.html#Makefile-Substitutions
-rw-r--r--Makefile.am14
-rw-r--r--configure.ac1
2 files changed, 14 insertions, 1 deletions
diff --git a/Makefile.am b/Makefile.am
index 032fafd..bb36c5a 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -18,6 +18,18 @@ AM_LDFLAGS = \
-Wl,--gc-sections \
-Wl,--as-needed
+SED_PROCESS = \
+ $(AM_V_GEN)$(SED) \
+ -e 's,@VERSION\@,$(VERSION),g' \
+ -e 's,@prefix\@,$(prefix),g' \
+ -e 's,@exec_prefix\@,$(exec_prefix),g' \
+ -e 's,@libdir\@,$(libdir),g' \
+ -e 's,@includedir\@,$(includedir),g' \
+ < $< > $@ || rm $@
+
+%.pc: %.pc.in Makefile
+ $(SED_PROCESS)
+
LIBABC_CURRENT=2
LIBABC_REVISION=0
LIBABC_AGE=2
@@ -38,6 +50,8 @@ libabc_libabc_la_DEPENDENCIES = ${top_srcdir}/libabc/libabc.sym
pkgconfigdir = $(libdir)/pkgconfig
pkgconfig_DATA = libabc/libabc.pc
+EXTRA_DIST += libabc/libabc.pc.in
+CLEANFILES += libabc/libabc.pc
TESTS = test-libabc
diff --git a/configure.ac b/configure.ac
index a3a8010..15594ea 100644
--- a/configure.ac
+++ b/configure.ac
@@ -40,7 +40,6 @@ AC_SUBST([my_CFLAGS])
AC_CONFIG_HEADERS(config.h)
AC_CONFIG_FILES([
Makefile
- libabc/libabc.pc
])
AC_OUTPUT