Forward-port r1908 + r1914 from rel_1_2 to improve portability without breaking
authordbs <dbs@9efc2488-bf62-4759-914b-345cdb29e865>
Tue, 2 Feb 2010 17:11:29 +0000 (17:11 +0000)
committerdbs <dbs@9efc2488-bf62-4759-914b-345cdb29e865>
Tue, 2 Feb 2010 17:11:29 +0000 (17:11 +0000)
git-svn-id: svn://svn.open-ils.org/OpenSRF/trunk@1915 9efc2488-bf62-4759-914b-345cdb29e865

src/gateway/Makefile.am

index 9552765..0eb5706 100644 (file)
@@ -20,9 +20,10 @@ AM_LDFLAGS = -L$(LIBDIR) -L@top_builddir@/src/libopensrf
 DISTCLEANFILES = Makefile.in Makefile
 
 install-exec-local: 
-       if [ ! "$$(grep mod_placeholder `$(APXS2) -q SYSCONFDIR`/httpd.conf)" ]; \
+       d=`$(APXS2) -q SYSCONFDIR` && \
+               if ! grep mod_placeholder $${d}/httpd.conf 2>&1 >/dev/null ; \
                then echo -e "#\n#LoadModule mod_placeholder /usr/lib/apache2/modules/mod_placeholder.so" \
-               >> `$(APXS2) -q SYSCONFDIR`/httpd.conf; \
+               >> $${d}/httpd.conf; \
        fi
        $(APXS2) -c $(DEF_LDLIBS) $(AM_CFLAGS) $(AM_LDFLAGS) @srcdir@/osrf_json_gateway.c apachetools.c apachetools.h libopensrf.so
        $(APXS2) -c $(DEF_LDLIBS) $(AM_CFLAGS) $(AM_LDFLAGS) @srcdir@/osrf_http_translator.c apachetools.c apachetools.h libopensrf.so