Add some "$(ROOT)" prefixes to variables in the install scripts to allow PBS packages, such as RPM, to build anywhere. --- pbs-2.3.12-pw/buildutils/mkincludes/head.mk.in | 6 +++--- pbs-2.3.12-pw/buildutils/pbs_mkdirs.in | 8 ++++---- pbs-2.3.12-pw/src/gui/Makefile.in | 5 +++-- pbs-2.3.12-pw/src/tools/xpbsmon/Makefile.in | 8 +++++--- 4 files changed, 15 insertions(+), 12 deletions(-) diff -puN buildutils/mkincludes/head.mk.in~rpm buildutils/mkincludes/head.mk.in --- pbs-2.3.12/buildutils/mkincludes/head.mk.in~rpm 2004-04-17 11:17:55.000000000 -0400 +++ pbs-2.3.12-pw/buildutils/mkincludes/head.mk.in 2004-04-17 11:17:55.000000000 -0400 @@ -14,7 +14,7 @@ LEXLIB = @LEXLIB@ HOST = @host@ HOST_OS = @host_os@ -prefix = @prefix@ +prefix = $(ROOT)@prefix@ exec_prefix = @exec_prefix@ bindir = @bindir@ sbindir = @sbindir@ @@ -60,7 +60,7 @@ IFF_PATH = $(sbindir)/pbs_iff DEMUX_PATH = $(sbindir)/pbs_demux # Absolute path of file holding default server name (for clients) -PBS_DEFAULT_FILE = @PBS_DEFAULT_FILE@ +PBS_DEFAULT_FILE = $(ROOT)@PBS_DEFAULT_FILE@ # Name of the default server, typically this is the same as the host name. # The name is written into PBS_DEFAULT_FILE for the clients. @@ -68,7 +68,7 @@ PBS_DEFAULT_SERVER = @PBS_DEFAULT_SERVER # Home working directory for the PBS Server (where it keeps it queues/jobs) # when it is running -PBS_SERVER_HOME = @PBS_SERVER_HOME@ +PBS_SERVER_HOME = $(ROOT)@PBS_SERVER_HOME@ # A section of machine dependent defines. diff -puN buildutils/pbs_mkdirs.in~rpm buildutils/pbs_mkdirs.in --- pbs-2.3.12/buildutils/pbs_mkdirs.in~rpm 2004-04-17 11:17:55.000000000 -0400 +++ pbs-2.3.12-pw/buildutils/pbs_mkdirs.in 2004-04-17 11:17:55.000000000 -0400 @@ -104,15 +104,15 @@ # check tree should not be called until it is installed since # only relative paths are used by autoconf. # -prefix=@prefix@ +prefix=${ROOT}@prefix@ exec_prefix=@exec_prefix@ CHK_TREE=@bindir@/chk_tree -PBS_SERVER_HOME=@PBS_SERVER_HOME@ -PBS_DEFAULT_FILE=@PBS_DEFAULT_FILE@ +PBS_SERVER_HOME=${ROOT}@PBS_SERVER_HOME@ +PBS_DEFAULT_FILE=${ROOT}@PBS_DEFAULT_FILE@ PBS_DEFAULT_SERVER=@PBS_DEFAULT_SERVER@ -PBS_ENVIRON=@PBS_ENVIRON@ +PBS_ENVIRON=${ROOT}@PBS_ENVIRON@ # # manual page directories are created by doc/ers/Makefile diff -puN src/gui/Makefile.in~rpm src/gui/Makefile.in --- pbs-2.3.12/src/gui/Makefile.in~rpm 2004-04-17 11:17:55.000000000 -0400 +++ pbs-2.3.12-pw/src/gui/Makefile.in 2004-04-17 11:17:55.000000000 -0400 @@ -97,6 +97,7 @@ INSTALL = @INSTALL@ XPBS_LIB = $(libdir)/xpbs XPBS_SCRIPTS = $(PBS_SRC)/gui +REAL_XPBS_LIB = $(XPBS_LIB:$(ROOT)%=%) TARGETS = xpbs xpbsrc buildindex @@ -156,8 +157,8 @@ install: build # install xpbs changing the location of libdir and appdefdir # @echo Install xpbs - @sed -e 's,set *libdir.*$$,set libdir ${XPBS_LIB},' \ - -e 's,set *appdefdir.*$$,set appdefdir ${XPBS_LIB},' \ + @sed -e 's,set *libdir.*$$,set libdir ${REAL_XPBS_LIB},' \ + -e 's,set *appdefdir.*$$,set appdefdir ${REAL_XPBS_LIB},' \ xpbs > $(bindir)/xpbs @chmod 755 $(bindir)/xpbs 2> /dev/null # diff -puN src/tools/xpbsmon/Makefile.in~rpm src/tools/xpbsmon/Makefile.in --- pbs-2.3.12/src/tools/xpbsmon/Makefile.in~rpm 2004-04-17 11:17:55.000000000 -0400 +++ pbs-2.3.12-pw/src/tools/xpbsmon/Makefile.in 2004-04-17 11:17:55.000000000 -0400 @@ -97,6 +97,8 @@ INSTALL = @INSTALL@ XPBSMON_LIB = $(libdir)/xpbsmon XPBSMON_SCRIPTS = $(PBS_SRC)/tools/xpbsmon +REAL_XPBSMON_LIB = $(XPBSMON_LIB:$(ROOT)%=%) +REAL_PBS_UBIN = $(PBS_UBIN:$(ROOT)%=%) TARGETS = xpbsmon xpbsmonrc buildindex @@ -151,9 +153,9 @@ install: build # # install xpbsmon changing the location of pbs_tclsh and libdir # - sed -e 's,#\!.*pbs_wish.*$$,#\!$(PBS_UBIN)/pbs_wish -f,' \ - -e 's,set *libdir.*$$,set libdir ${XPBSMON_LIB},' \ - -e 's,set *appdefdir.*$$,set appdefdir ${XPBSMON_LIB},' \ + sed -e 's,#\!.*pbs_wish.*$$,#\!$(REAL_PBS_UBIN)/pbs_wish -f,' \ + -e 's,set *libdir.*$$,set libdir ${REAL_XPBSMON_LIB},' \ + -e 's,set *appdefdir.*$$,set appdefdir ${REAL_XPBSMON_LIB},' \ xpbsmon > $(bindir)/xpbsmon chmod 755 $(bindir)/xpbsmon 2> /dev/null # _