Index: /branches/eam_branches/ipp-20150326/psLib/Makefile.am
===================================================================
--- /branches/eam_branches/ipp-20150326/psLib/Makefile.am	(revision 38015)
+++ /branches/eam_branches/ipp-20150326/psLib/Makefile.am	(revision 38016)
@@ -1,5 +1,5 @@
 SUBDIRS = m4 $(SUBDIR)
 
-bin_SCRIPTS = pslib-config 
+bin_SCRIPTS = pslib-config
 pkgconfigdir = $(libdir)/pkgconfig
 pkgconfig_DATA= pslib.pc
Index: /branches/eam_branches/ipp-20150326/psLib/etc/Makefile.am
===================================================================
--- /branches/eam_branches/ipp-20150326/psLib/etc/Makefile.am	(revision 38015)
+++ /branches/eam_branches/ipp-20150326/psLib/etc/Makefile.am	(revision 38016)
@@ -1,4 +1,6 @@
 BUILT_SOURCES = pslib.config
 EXTRA_DIST = pslib.config.template
+
+bin_SCRIPTS = pslib-setsvnversion.pl
 
 # this is done instead of using autoconf to delay the expansion of datadir
Index: /branches/eam_branches/ipp-20150326/psLib/etc/pslib-setsvnversion.pl
===================================================================
--- /branches/eam_branches/ipp-20150326/psLib/etc/pslib-setsvnversion.pl	(revision 38016)
+++ /branches/eam_branches/ipp-20150326/psLib/etc/pslib-setsvnversion.pl	(revision 38016)
@@ -0,0 +1,108 @@
+#!/usr/bin/env perl
+$VERBOSE = 0;
+
+if (@ARGV != 3) { die "USAGE: setsvnversion.pl (prgname) (src) (tgt)\n"; }
+
+if (! -e $ARGV[1]) { die "setsvnversion.pl cannot find input version file\n"; }
+
+$prgname = $ARGV[0];
+
+$svnversion = `which svnversion`;
+chomp $svnversion;
+if ($?) {
+    $svnversion = "NONE";
+}
+if ($VERBOSE) { print "svnversion: $svnversion\n";}
+
+$svn = `which svn`;
+chomp $svn;
+if ($?) {
+    $svn = "NONE";
+}
+if ($VERBOSE) {print "svn: $svn\n";}
+
+if ($svnversion eq "NONE") {
+    $VERSION = "UNKNOWN";
+} else {
+    $VERSION = `$svnversion`;
+    chomp $VERSION;
+}
+if ($VERBOSE) {print "VERSION: $VERSION\n";}
+
+if ($svn eq "NONE") {
+    $BRANCH = "UNKNOWN";
+    $SOURCE = "UNKNOWN";
+} else {
+    $fullURL = "";
+    $reproot = "";
+    $UUID = "";
+    @lines = `$svn info ..`;
+    foreach $line (@lines) {
+	chomp $line;
+	($key, $value) = split (":", $line, 2);
+	if ($VERBOSE == 2) { print "key: $key\n";}
+	if ($VERBOSE == 2) { print "value: $value\n"; }
+	if ($key eq "URL")             { $fullURL = $value; }
+	if ($key eq "Repository UUID") { $UUID = $value;    }
+	if ($key eq "Repository Root") { $reproot = $value; }
+    }
+    if ($fullURL eq "") { die "failed to find URL\n"; }
+    if ($reproot eq "") { die "failed to find reproot\n"; }
+    if ($UUID    eq "") { die "failed to find UUID\n"; }
+
+    # remove surrounding whitespace
+    $fullURL =~ s/^\s+//;  $fullURL =~ s/\s+$//;
+    $reproot =~ s/^\s+//;  $reproot =~ s/\s+$//;
+    $UUID    =~ s/^\s+//;  $UUID    =~ s/\s+$//;
+
+    ($BRANCH) = $fullURL =~ m|$reproot/(.+)|;
+    if ($BRANCH eq "")  { die "failed to get branch from fullURL $fullURL\n"; }
+   
+    $SOURCE = $UUID;
+}
+
+if ($VERBOSE) { print "SOURCE: $SOURCE\n";}
+if ($VERBOSE) { print "BRANCH: $BRANCH\n";}
+
+open (FILE, "$ARGV[1]");
+@list = <FILE>;
+close (FILE);
+
+$version_field = sprintf "@%s_VERSION@", $prgname;
+$source_field = sprintf "@%s_SOURCE@", $prgname;
+$branch_field = sprintf "@%s_BRANCH@", $prgname;
+
+foreach $line (@list) {
+    $line =~ s|$version_field|"$VERSION"|;
+    $line =~ s|$source_field|"$SOURCE"|;
+    $line =~ s|$branch_field|"$BRANCH"|;
+}
+
+$output = sprintf "%s.tmp", $ARGV[2];
+
+open (FILE, ">$output");
+foreach $line (@list) {
+    print FILE $line;
+}
+close (FILE);
+
+if (! -e $ARGV[2]) {
+    if ($VERBOSE) { 
+	print "prior $ARGV[2] not found, replacing with $output\n";
+    }
+    rename $output, $ARGV[2];
+    exit 0;
+}
+
+$difflines = `diff $ARGV[2] $output`;
+if ($difflines eq "") {
+    print "  setsvnversion.pl: no change to $ARGV[2], keeping old version\n";
+} else {
+    if ($VERBOSE) { 
+	print "$ARGV[2] changed:\n";
+	print $difflines;
+    }
+    rename $output, $ARGV[2];
+}
+
+exit (0);
Index: /branches/eam_branches/ipp-20150326/psLib/src/sys/Makefile.am
===================================================================
--- /branches/eam_branches/ipp-20150326/psLib/src/sys/Makefile.am	(revision 38015)
+++ /branches/eam_branches/ipp-20150326/psLib/src/sys/Makefile.am	(revision 38016)
@@ -3,23 +3,8 @@
 noinst_LTLIBRARIES = libpslibsys.la
 
-if HAVE_SVNVERSION
-PSLIB_VERSION=`$(SVNVERSION) ../..`
-else
-PSLIB_VERSION="UNKNOWN"
-endif
-
-if HAVE_SVN
-PSLIB_BRANCH=`$(SVN) info ../.. | $(SED) -n -e '/URL:/ h' -e '/Repository Root:/ { x; H; x; s|Repository Root: \(.*\)\nURL: \1\(.*\)|\2| ; s|^/|| ; s|/[a-zA-Z]*/src.*|| ; p }'`
-PSLIB_SOURCE=`$(SVN) info | $(SED) -n -e 's/Repository UUID: // p'`
-else
-PSLIB_BRANCH="UNKNOWN"
-PSLIB_SOURCE="UNKNOWN"
-endif
-
 # Force recompilation of psConfigure.c, since it gets the version information
 psConfigure.c: psVersionDefinitions.h
 psVersionDefinitions.h: psVersionDefinitions.h.in FORCE
-	-$(RM) psVersionDefinitions.h
-	$(SED) -e "s|@PSLIB_VERSION@|\"$(PSLIB_VERSION)\"|" -e "s|@PSLIB_BRANCH@|\"$(PSLIB_BRANCH)\"|" -e "s|@PSLIB_SOURCE@|\"$(PSLIB_SOURCE)\"|" psVersionDefinitions.h.in > psVersionDefinitions.h
+	../../etc/pslib-setsvnversion.pl PSLIB psVersionDefinitions.h.in psVersionDefinitions.h
 FORCE: ;
 
Index: anches/eam_branches/ipp-20150326/psastro/src/setsvnversion.pl
===================================================================
--- /branches/eam_branches/ipp-20150326/psastro/src/setsvnversion.pl	(revision 38015)
+++ 	(revision )
@@ -1,100 +1,0 @@
-#!/usr/bin/env perl
-$VERBOSE = 0;
-
-if (@ARGV != 3) { die "USAGE: setsvnversion.pl (prgname) (src) (tgt)\n"; }
-
-if (! -e $ARGV[1]) { die "setsvnversion.pl cannot find input version file\n"; }
-
-$prgname = $ARGV[0];
-
-$svnversion = `which svnversion`;
-chomp $svnversion;
-if ($?) {
-    $svnversion = "NONE";
-}
-if ($VERBOSE) { print "svnversion: $svnversion\n";}
-
-$svn = `which svn`;
-chomp $svn;
-if ($?) {
-    $svn = "NONE";
-}
-if ($VERBOSE) {print "svn: $svn\n";}
-
-if ($svnversion eq "NONE") {
-    $VERSION = "UNKNOWN";
-} else {
-    $VERSION = `$svnversion`;
-    chomp $VERSION;
-}
-if ($VERBOSE) {print "VERSION: $VERSION\n";}
-
-if ($svn eq "NONE") {
-    $BRANCH = "UNKNOWN";
-    $SOURCE = "UNKNOWN";
-} else {
-    $fullURL = "";
-    $reproot = "";
-    $UUID = "";
-    @lines = `$svn info ..`;
-    foreach $line (@lines) {
-	chomp $line;
-	($key, $value) = split (":", $line, 2);
-	if ($VERBOSE == 2) { print "key: $key\n";}
-	if ($VERBOSE == 2) { print "value: $value\n"; }
-	if ($key eq "URL")             { $fullURL = $value; }
-	if ($key eq "Repository UUID") { $UUID = $value;    }
-	if ($key eq "Repository Root") { $reproot = $value; }
-    }
-    if ($fullURL eq "") { die "failed to find URL\n"; }
-    if ($reproot eq "") { die "failed to find reproot\n"; }
-    if ($UUID    eq "") { die "failed to find UUID\n"; }
-
-    # remove surrounding whitespace
-    $fullURL =~ s/^\s+//;  $fullURL =~ s/\s+$//;
-    $reproot =~ s/^\s+//;  $reproot =~ s/\s+$//;
-    $UUID    =~ s/^\s+//;  $UUID    =~ s/\s+$//;
-
-    ($BRANCH) = $fullURL =~ m|$reproot/(.+)|;
-    if ($BRANCH eq "")  { die "failed to get branch from fullURL $fullURL\n"; }
-   
-    $SOURCE = $UUID;
-}
-
-if ($VERBOSE) { print "SOURCE: $SOURCE\n";}
-if ($VERBOSE) { print "BRANCH: $BRANCH\n";}
-
-open (FILE, "$ARGV[1]");
-@list = <FILE>;
-close (FILE);
-
-$version_field = sprintf "@%s_VERSION@", $prgname;
-$source_field = sprintf "@%s_SOURCE@", $prgname;
-$branch_field = sprintf "@%s_BRANCH@", $prgname;
-
-foreach $line (@list) {
-    $line =~ s|$version_field|"$VERSION"|;
-    $line =~ s|$source_field|"$SOURCE"|;
-    $line =~ s|$branch_field|"$BRANCH"|;
-}
-
-$output = sprintf "%s.tmp", $ARGV[2];
-
-open (FILE, ">$output");
-foreach $line (@list) {
-    print FILE $line;
-}
-close (FILE);
-
-$difflines = `diff $ARGV[2] $output`;
-if ($difflines eq "") {
-    if ($VERBOSE) { print "no change to $ARGV[2], keeping old version\n"; }
-} else {
-    if ($VERBOSE) { 
-	print "$ARGV[2] changed:\n";
-	print $difflines;
-    }
-    rename $output, $ARGV[2];
-}
-
-exit (0);
