From 048346b66aa880fd7867bff99406e287451f17e1 Mon Sep 17 00:00:00 2001 From: dbs Date: Tue, 4 Nov 2008 03:02:47 +0000 Subject: [PATCH] Replace in-place modification with built files; enables one to re-run configure multiple times git-svn-id: svn://svn.open-ils.org/OpenSRF/trunk@1487 9efc2488-bf62-4759-914b-345cdb29e865 --- configure.ac | 6 +++++- examples/{math_bench.pl => math_bench.pl.in} | 2 +- examples/{math_client.py => math_client.py.in} | 2 +- examples/{multisession-test.pl => multisession-test.pl.in} | 2 +- src/Makefile.am | 4 ---- 5 files changed, 8 insertions(+), 8 deletions(-) rename examples/{math_bench.pl => math_bench.pl.in} (95%) rename examples/{math_client.py => math_client.py.in} (94%) rename examples/{multisession-test.pl => multisession-test.pl.in} (98%) diff --git a/configure.ac b/configure.ac index a7a1180..6aacae5 100644 --- a/configure.ac +++ b/configure.ac @@ -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 diff --git a/examples/math_bench.pl b/examples/math_bench.pl.in similarity index 95% rename from examples/math_bench.pl rename to examples/math_bench.pl.in index 6dd94ac..5831e71 100755 --- a/examples/math_bench.pl +++ b/examples/math_bench.pl.in @@ -13,7 +13,7 @@ my $count = $ARGV[0]; print "usage: $0 \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 diff --git a/examples/math_client.py b/examples/math_client.py.in similarity index 94% rename from examples/math_client.py rename to examples/math_client.py.in index 8e3587a..77d5885 100644 --- a/examples/math_client.py +++ b/examples/math_client.py.in @@ -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 diff --git a/examples/multisession-test.pl b/examples/multisession-test.pl.in similarity index 98% rename from examples/multisession-test.pl rename to examples/multisession-test.pl.in index 01ad495..e571d96 100755 --- a/examples/multisession-test.pl +++ b/examples/multisession-test.pl.in @@ -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; diff --git a/src/Makefile.am b/src/Makefile.am index 4dd2d9e..7a75064 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -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)/ -- 2.43.2