Replace in-place modification with built files; enables one to re-run configure multi...
authordbs <dbs@9efc2488-bf62-4759-914b-345cdb29e865>
Tue, 4 Nov 2008 03:02:47 +0000 (03:02 +0000)
committerdbs <dbs@9efc2488-bf62-4759-914b-345cdb29e865>
Tue, 4 Nov 2008 03:02:47 +0000 (03:02 +0000)
git-svn-id: svn://svn.open-ils.org/OpenSRF/trunk@1487 9efc2488-bf62-4759-914b-345cdb29e865

configure.ac
examples/math_bench.pl.in [moved from examples/math_bench.pl with 95% similarity]
examples/math_client.py.in [moved from examples/math_client.py with 94% similarity]
examples/multisession-test.pl.in [moved from examples/multisession-test.pl with 98% similarity]
src/Makefile.am

index a7a1180..6aacae5 100644 (file)
@@ -246,7 +246,11 @@ AC_CHECK_FUNCS([bzero dup2 gethostbyname gethostname gettimeofday memset select
 #------------------------------------
 
 AC_CONFIG_FILES([Makefile
+                 doc/dokuwiki-doc-stubber.pl
                  examples/math_xul_client/Makefile
+                 examples/math_bench.pl
+                 examples/math_client.py
+                 examples/multisession-test.pl
                  src/Makefile
                  src/c-apps/Makefile
                  src/gateway/Makefile
@@ -257,7 +261,7 @@ AC_CONFIG_FILES([Makefile
                  src/python/Makefile
                  src/router/Makefile
                  src/srfsh/Makefile
-                bin/osrf_config], [if test -e "./bin/osrf_config"; then chmod 755 bin/osrf_config; fi])
+                 bin/osrf_config], [if test -e "./bin/osrf_config"; then chmod 755 bin/osrf_config; fi])
 
 
 AC_OUTPUT
similarity index 95%
rename from examples/math_bench.pl
rename to examples/math_bench.pl.in
index 6dd94ac..5831e71 100755 (executable)
@@ -13,7 +13,7 @@ my $count = $ARGV[0];
 print "usage: $0 <num_requests>\n" and exit unless $count;
 
 # * connect to the Jabber network
-OpenSRF::System->bootstrap_client( config_file => "SYSCONFDIR/opensrf_core.xml" );
+OpenSRF::System->bootstrap_client( config_file => "@sysconfdir@/opensrf_core.xml" );
 $log->set_service('math_bench');
 
 # * create a new application session for the opensrf.math service
similarity index 94%
rename from examples/math_client.py
rename to examples/math_client.py.in
index 8e3587a..77d5885 100644 (file)
@@ -3,7 +3,7 @@ import osrf.system
 import osrf.ses
 
 # XXX: Replace with command line arguments
-file = '/openils/conf/opensrf_core.xml'
+file = '@sysconfdir@/opensrf_core.xml'
 operator = 'add'
 operand1 = 5
 operand2 = 7
similarity index 98%
rename from examples/multisession-test.pl
rename to examples/multisession-test.pl.in
index 01ad495..e571d96 100755 (executable)
@@ -1,5 +1,5 @@
 #!/usr/bin/perl
-use lib 'LIBDIR/perl5/';
+use lib '@libdir@/perl5/';
 use OpenSRF::System;
 use OpenILS::Application::AppUtils;
 use OpenILS::Event;
index 4dd2d9e..7a75064 100644 (file)
@@ -55,10 +55,6 @@ install-exec-hook:
        sed -i 's|SYSCONFDIR|$(ETCDIR)|g' '$(DESTDIR)@sysconfdir@/opensrf_core.xml.example'
        sed -i 's|LOCALSTATEDIR|$(VAR)|g' '$(DESTDIR)@sysconfdir@/srfsh.xml.example'
        sed -i 's|SYSCONFDIR|$(ETCDIR)|g' '$(DESTDIR)@sysconfdir@/srfsh.xml.example'
-       sed -i 's|SYSCONFDIR|$(ETCDIR)|g' '@abs_top_srcdir@/examples/math_bench.pl'
-       sed -i 's|SYSCONFDIR|$(ETCDIR)|g' '@abs_top_srcdir@/examples/math_client.py'
-       sed -i 's|LIBDIR|$(LIBDIR)|g' '@abs_top_srcdir@/examples/multisession-test.pl'
-       sed -i 's|SYSCONFDIR|$(ETCDIR)|g' '@abs_top_srcdir@/doc/dokuwiki-doc-stubber.pl'
        cp -r @srcdir@/javascript/* $(jsdir)/