Index: /gsdl/trunk/runtime-src/packages/Makefile.in
===================================================================
--- /gsdl/trunk/runtime-src/packages/Makefile.in	(revision 19035)
+++ /gsdl/trunk/runtime-src/packages/Makefile.in	(revision 19036)
@@ -72,4 +72,30 @@
 PACKAGEDIRS =	$(YAZ) $(D2M) $(CORBA)  $(HTTPD)
 
+REPLACELIST = conf/extra/httpd-dav.conf \
+	conf/extra/httpd-manual.conf \
+	conf/extra/httpd-autoindex.conf \
+	conf/extra/httpd-vhosts.conf \
+	conf/extra/httpd-ssl.conf \
+	conf/extra/httpd-multilang-errordoc.conf \
+	conf/original/extra/httpd-dav.conf \
+	conf/original/extra/httpd-manual.conf \
+	conf/original/extra/httpd-autoindex.conf \
+	conf/original/extra/httpd-vhosts.conf \
+	conf/original/extra/httpd-ssl.conf \
+	conf/original/extra/httpd-multilang-errordoc.conf \
+	conf/original/httpd.conf\
+	lib/apr-util-1/apr_dbd_odbc.la \
+	lib/apr-util-1/apr_dbd_sqlite3.la \
+	lib/pkgconfig/apr-util-1.pc \
+	lib/pkgconfig/apr-1.pc \
+	lib/libaprutil-1.la \
+	lib/libapr-1.la \
+	build/config_vars.mk \
+	build/config.nice \
+	build/apr_rules.mk \
+	bin/apu-1-config \
+	bin/apr-1-config \
+	include/ap_config_auto.h \
+	include/ap_config_layout.h
 
 all:
@@ -133,6 +159,23 @@
 	  chmod 755 ../../apache-httpd/$(GSDLOS)/install-bindist.sh ; \
 	  gsdldir=`cd ../.. ; pwd` ; \
+	  pre="$$gsdldir/apache-httpd/$(GSDLOS)" ; \
 	  for one_file in apachectl envvars envvars-std; do \
-	    sed -e "s%$$gsdldir/apache-httpd/$(GSDLOS)%*\*\APACHE_HOME_OS\*\*%" ../../apache-httpd/$(GSDLOS)/bin/$$one_file > ../../apache-httpd/$(GSDLOS)/bin/$$one_file.tmp ; \
-	    mv ../../apache-httpd/$(GSDLOS)/bin/$$one_file.tmp ../../apache-httpd/$(GSDLOS)/bin/$$one_file ; \
-	  done ; )
+	    sed -e "s%$$pre%*\*\APACHE_HOME_OS\*\*%" $$pre/bin/$$one_file > $$pre/bin/$$one_file.tmp ; \
+	    mv $$pre/bin/$$one_file.tmp $$pre/bin/$$one_file ; \
+	  done ; \
+	  for one_file in $(REPLACELIST); do \
+	    sed -e "s%$$pre%*\*\APACHE_HOME_OS\*\*%" "$$pre/$$one_file" > "$$pre/$$one_file.tmp" ; \
+	    mv "$$pre/$$one_file.tmp" "$$pre/$$one_file" ; \
+	  done ; \
+	  cat "$$pre/bin/apr-1-config" \
+	    | sed -e "s%^APR_SOURCE_DIR=.*%APR_SOURCE_DIR=%" \
+	    | sed -e "s%^APR_BUILD_DIR=.*%APR_BUILD_DIR=%" \
+	    > "$$pre/bin/apr-1-config.tmp" ; \
+	  mv "$$pre/bin/apr-1-config.tmp" "$$pre/bin/apr-1-config" ; \
+	  cat "$$pre/bin/apu-1-config" \
+	    | sed -e "s%^APU_SOURCE_DIR=.*%APU_SOURCE_DIR=%" \
+	    | sed -e "s%^APU_BUILD_DIR=.*%APU_BUILD_DIR=%" \
+	    > "$$pre/bin/apu-1-config.tmp" ; \
+	  mv "$$pre/bin/apu-1-config.tmp" "$$pre/bin/apu-1-config" ; \
+	  sed -e "s%^EXTRA_INCLUDES\s*=.*%EXTRA_INCLUDES=%" "$$pre/build/config_vars.mk" > "$$pre/build/config_vars.mk.tmp" ; \
+	  mv "$$pre/build/config_vars.mk.tmp" "$$pre/build/config_vars.mk" ; )
Index: /gsdl/trunk/runtime-src/packages/apache-httpd/install-bindist.sh
===================================================================
--- /gsdl/trunk/runtime-src/packages/apache-httpd/install-bindist.sh	(revision 19035)
+++ /gsdl/trunk/runtime-src/packages/apache-httpd/install-bindist.sh	(revision 19036)
@@ -74,7 +74,7 @@
 
 # usually we're updating existing files, so need to copy them over into tmp files first
-PRE=`grep "^prefix = " build/config_vars.mk`
-PRE=`echo $PRE | sed -e "s;prefix = ;;"`
-sed -e "s;$PRE;\"$SR\";" build/config_vars.mk > "$SR/build/config_vars.mk.tmp"
+#PRE=`grep "^prefix = " build/config_vars.mk`
+#PRE=`echo $PRE | sed -e "s;prefix = ;;"`
+sed -e "s%\*\*APACHE_HOME_OS\*\*%\"$SR\"%" build/config_vars.mk > "$SR/build/config_vars.mk.tmp"
 mv "$SR/build/config_vars.mk.tmp" "$SR/build/config_vars.mk"
 chmod u+rwx "$SR/build/config_vars.mk"
@@ -102,49 +102,11 @@
 # Non-crucial files (replacements not essential)
 # but replacing the occurrences of $PRE in them with $SR anyway:
-cd "$currentdir/conf/extra/"
-for one_file in httpd-dav.conf httpd-manual.conf httpd-autoindex.conf httpd-vhosts.conf httpd-ssl.conf httpd-multilang-errordoc.conf; do
-    sed -e "s;$PRE;$SR;" "$one_file" > "$one_file.tmp"
+REPLACELIST="conf/extra/httpd-dav.conf conf/extra/httpd-manual.conf conf/extra/httpd-autoindex.conf conf/extra/httpd-vhosts.conf conf/extra/httpd-ssl.conf conf/extra/httpd-multilang-errordoc.conf conf/original/extra/httpd-dav.conf conf/original/extra/httpd-manual.conf conf/original/extra/httpd-autoindex.conf conf/original/extra/httpd-vhosts.conf conf/original/extra/httpd-ssl.conf conf/original/extra/httpd-multilang-errordoc.conf conf/original/httpd.conf lib/apr-util-1/apr_dbd_odbc.la lib/apr-util-1/apr_dbd_sqlite3.la lib/pkgconfig/apr-util-1.pc lib/pkgconfig/apr-1.pc lib/libaprutil-1.la lib/libapr-1.la build/config_vars.mk build/config.nice build/apr_rules.mk bin/apu-1-config bin/apr-1-config include/ap_config_auto.h include/ap_config_layout.h"
+
+for one_file in $REPLACELIST; do
+    sed -e "s%\*\*APACHE_HOME_OS\*\*%$SR%" "$one_file" > "$one_file.tmp"
     mv $one_file.tmp $one_file
     chmod u+w $one_file
 done
-
-cd "$currentdir/conf/original/extra/"
-for one_file in httpd-dav.conf httpd-manual.conf httpd-autoindex.conf httpd-vhosts.conf httpd-ssl.conf httpd-multilang-errordoc.conf; do
-    sed -e "s;$PRE;$SR;" "$one_file" > "$one_file.tmp"
-    mv $one_file.tmp $one_file
-    chmod u+w $one_file
-done
-
-cd "$currentdir/lib/"
-for one_file in "apr-util-1/apr_dbd_odbc.la" "apr-util-1/apr_dbd_sqlite3.la" "pkgconfig/apr-util-1.pc" "pkgconfig/apr-1.pc" libaprutil-1.la libapr-1.la; do
-    sed -e "s;$PRE;$SR;" "$one_file" > "$one_file.tmp"
-    mv $one_file.tmp $one_file
-    chmod u+w $one_file
-done
-
-cd "$currentdir/build/"
-for one_file in config_vars.mk config.nice apr_rules.mk; do
-    sed -e "s;$PRE;$SR;" "$one_file" > "$one_file.tmp"
-    mv $one_file.tmp $one_file
-    chmod u+w $one_file
-done
-
-cd "$currentdir/bin/"
-for one_file in apu-1-config apr-1-config; do
-    sed -e "s;$PRE;$SR;" "$one_file" > "$one_file.tmp"
-    mv $one_file.tmp $one_file
-    chmod u+w $one_file
-done
-
-cd "$currentdir/include/"
-for one_file in ap_config_auto.h ap_config_layout.h; do
-    sed -e "s;$PRE;$SR;" "$one_file" > "$one_file.tmp"
-    mv $one_file.tmp $one_file
-    chmod u+w $one_file
-done
-
-sed -e "s;$PRE;$SR;" "$currentdir/conf/original/httpd.conf" > "$currentdir/conf/original/httpd.conf.tmp"
-    mv "$currentdir/conf/original/httpd.conf.tmp" "$currentdir/conf/original/httpd.conf"
-    chmod u+w "$currentdir/conf/original/httpd.conf"
 
 echo "Ready."
