From 4dbe27108bb2ac6f84386c341a0355352b23fe78 Mon Sep 17 00:00:00 2001 From: Noah Slater Date: Sat, 7 Jun 2008 16:26:43 +0000 Subject: fixed double slash problems in configuration files git-svn-id: https://svn.apache.org/repos/asf/incubator/couchdb/trunk@664363 13f79535-47bb-0310-9956-ffa450edef68 --- etc/Makefile.am | 20 +++++++++++++------- etc/couchdb/Makefile.am | 16 +++++++++++----- 2 files changed, 24 insertions(+), 12 deletions(-) (limited to 'etc') diff --git a/etc/Makefile.am b/etc/Makefile.am index 13052665..e7373320 100644 --- a/etc/Makefile.am +++ b/etc/Makefile.am @@ -32,6 +32,12 @@ CLEANFILES = $(init_DATA) $(nobase_sysconf_DATA) $(launchd_DATA) transform = @program_transform_name@ couchdb_command_name = `echo couchdb | sed '$(transform)'` +abs_bindir = $(abspath $(bindir)) +abs_localstatedir = $(abspath $(localstatedir)) +abs_sysconfdir = $(abspath $(sysconfdir)) +abs_pkgconfdir = $(abspath $(pkgconfdir)) +abs_erlangbindir = $(abspath $(erlangbindir)) + default/couchdb: default/couchdb.tpl if test "$(mkdir_p)"; then \ $(mkdir_p) default; \ @@ -41,9 +47,9 @@ default/couchdb: default/couchdb.tpl fi \ fi sed -e "s|%configure_input%|$@. Generated from $< by configure.|" \ - -e "s|%pkgconfdir%|@pkgconfdir@|g" \ - -e "s|%sysconfdir%|@sysconfdir@|" \ - -e "s|%localstatedir%|@localstatedir@|" \ + -e "s|%pkgconfdir%|$(abs_pkgconfdir)|g" \ + -e "s|%sysconfdir%|$(abs_sysconfdir)|" \ + -e "s|%localstatedir%|$(abs_localstatedir)|" \ < $< > $@ init/couchdb: init/couchdb.tpl @@ -55,9 +61,9 @@ init/couchdb: init/couchdb.tpl fi \ fi sed -e "s|%configure_input%|$@. Generated from $< by configure.|" \ - -e "s|%bindir%|@bindir@|" \ - -e "s|%sysconfdir%|@sysconfdir@|" \ - -e "s|%erlangbindir%|@erlangbindir@|" \ + -e "s|%bindir%|$(abs_bindir)|" \ + -e "s|%sysconfdir%|$(abs_sysconfdir)|" \ + -e "s|%erlangbindir%|$(abs_erlangbindir)|" \ -e "s|%couchdb_command_name%|$(couchdb_command_name)|" \ < $< > $@ @@ -73,7 +79,7 @@ launchd/org.apache.couchdb.plist: launchd/org.apache.couchdb.plist.tpl fi \ fi sed -e "s|%configure_input%|$@. Generated from $< by configure.|" \ - -e "s|%bindir%|@bindir@|" \ + -e "s|%bindir%|$(abs_bindir)|" \ -e "s|%couchdb_command_name%|$(couchdb_command_name)|" \ < $< > $@ diff --git a/etc/couchdb/Makefile.am b/etc/couchdb/Makefile.am index 690bbb01..ed0d2faa 100644 --- a/etc/couchdb/Makefile.am +++ b/etc/couchdb/Makefile.am @@ -21,12 +21,18 @@ couchjs_command_name = `echo couchjs | sed '$(transform)'` couchprivlibdir = $(erlanglibdir)/couch-$(version)/priv/lib +abs_bindir = $(abspath $(bindir)) +abs_pkgdatadir = $(abspath $(pkgdatadir)) +abs_pkgconfdir = $(abspath $(pkgconfdir)) +abs_pkgstatelibdir = $(abspath $(pkgstatelibdir)) +abs_pkgstatelogdir = $(abspath $(pkgstatelogdir)) + couch.ini: couch.ini.tpl - sed -e "s|%bindir%|@bindir@|g" \ - -e "s|%pkgconfdir%|@pkgconfdir@|g" \ - -e "s|%pkgdatadir%|@pkgdatadir@|g" \ - -e "s|%pkgstatelibdir%|@pkgstatelibdir@|g" \ - -e "s|%pkgstatelogdir%|@pkgstatelogdir@|g" \ + sed -e "s|%bindir%|$(abs_bindir)|g" \ + -e "s|%pkgconfdir%|$(abs_pkgconfdir)|g" \ + -e "s|%pkgdatadir%|$(abs_pkgdatadir)|g" \ + -e "s|%pkgstatelibdir%|$(abs_pkgstatelibdir)|g" \ + -e "s|%pkgstatelogdir%|$(abs_pkgstatelogdir)|g" \ -e "s|%couchprivlibdir%|$(couchprivlibdir)|g" \ -e "s|%couchjs_command_name%|$(couchjs_command_name)|g" \ < $< > $@ -- cgit v1.2.3