components/apr/patches/makefile-out.patch
author Mike Sullivan <Mike.Sullivan@Oracle.COM>
Mon, 11 Mar 2013 10:38:09 -0700
branchs11-update
changeset 2520 ceec631e74d1
parent 203 887f23af6934
permissions -rw-r--r--
Close of build 10.

--- Makefile.in.orig	Fri Apr 15 07:23:41 2011
+++ Makefile.in	Fri Apr 15 07:23:53 2011
@@ -62,11 +62,19 @@
 
 # Create apr-config script suitable for the install tree
 apr-config.out: $(APR_CONFIG)
-	sed 's,^\(location=\).*$$,\1installed,' < $(APR_CONFIG) > $@
+	sed -e 's,^\(location=\).*$$,\1installed,' \
+	    -e '/^CC=/s,/.*/,,' \
+	    -e '/^CPP=/s,/.*/,,' \
+	    -e '/^APR_SOURCE_DIR=/s,/.*",/usr/apr/1.3",' \
+	    -e '/^APR_BUILD_DIR=/s,/.*",/usr/apr/1.3",' \
+	    < $(APR_CONFIG) > $@
 
 # Create apr_rules.mk suitable for the install tree
 build/apr_rules.out: build/apr_rules.mk
-	sed 's,^\(apr_build.*=\).*$$,\1$(installbuilddir),' < build/apr_rules.mk > $@
+	sed -e 's,^\(apr_build.*=\).*$$,\1$(installbuilddir),' \
+	    -e '/^CC=/s,/.*/,,' \
+	    -e '/^MKDEP            = /s,/.*/,,' \
+	     < build/apr_rules.mk > $@
 
 install: $(TARGETS)
 	$(APR_MKDIR) $(DESTDIR)$(libdir) $(DESTDIR)$(bindir) $(DESTDIR)$(installbuilddir) \
@@ -79,7 +87,13 @@
 	$(INSTALL_DATA) apr.exp $(DESTDIR)$(libdir)/apr.exp
 	$(INSTALL_DATA) apr.pc $(DESTDIR)$(libdir)/pkgconfig/$(APR_PCFILE)
 	for f in libtool shlibtool; do \
-	    if test -f $${f}; then $(INSTALL) -m 755 $${f} $(DESTDIR)$(installbuilddir); fi; \
+	    if test -f $${f}; then \
+		sed -e '/^LTCC=/s,/.*/,,' \
+		    -e '/^CC=/s,/.*/,,' \
+		    < $${f} > $${f}.out; \
+		$(INSTALL) -m 755 $${f}.out $(DESTDIR)$(installbuilddir)/$${f}; \
+		rm $${f}.out; \
+	    fi; \
 	done
 	$(INSTALL) -m 755 $(top_srcdir)/build/mkdir.sh $(DESTDIR)$(installbuilddir)
 	for f in make_exports.awk make_var_export.awk; do \