Diffstat (limited to 'mcon/U/scriptdir.U')
1 files changed, 110 insertions, 0 deletions
diff --git a/mcon/U/scriptdir.U b/mcon/U/scriptdir.U
new file mode 100644
@@ -0,0 +1,110 @@
+?RCS: $Id: scriptdir.U,v 22.214.171.124 1995/09/25 09:17:15 ram Exp $
+?RCS: Copyright (c) 1991-1993, Raphael Manfredi
+?RCS: You may redistribute only under the terms of the Artistic Licence,
+?RCS: as specified in the README file that comes with the distribution.
+?RCS: You may reuse parts of this distribution only within the terms of
+?RCS: that same Artistic Licence; a copy of which may be found at the root
+?RCS: of the source tree for dist 3.0.
+?RCS: $Log: scriptdir.U,v $
+?RCS: Revision 126.96.36.199 1995/09/25 09:17:15 ram
+?RCS: patch59: unit is now forced to the top of Configure, if possible
+?RCS: Revision 188.8.131.52 1995/01/30 14:46:13 ram
+?RCS: patch49: can now handle installation prefix changes (from WED)
+?RCS: Revision 184.108.40.206 1994/08/29 16:32:04 ram
+?RCS: patch32: now uses installation prefix
+?RCS: Revision 3.0 1993/08/18 12:09:45 ram
+?RCS: Baseline for dist 3.0 netwide release.
+?MAKE:scriptdir scriptdirexp installscript: afs cat test Getfile Loc \
+ Oldconfig +bin Prefixit prefixexp Prefixup
+?MAKE: -pick add $@ %<
+?S: This variable holds the name of the directory in which the user wants
+?S: to put publicly scripts for the package in question. It is either
+?S: the same directory as for binaries, or a special one that can be
+?S: mounted across different architectures, like /usr/share. Programs
+?S: must be prepared to deal with ~name expansion.
+?S: This variable is the same as scriptdir, but is filename expanded
+?S: at configuration time, for programs not wanting to bother with it.
+?S: This variable is usually the same as scriptdirexp, unless you are on
+?S: a system running AFS, in which case they may differ slightly. You
+?S: should always use this variable within your makefiles for portability.
+?C: This symbol holds the name of the directory in which the user wants
+?C: to put publicly executable scripts for the package in question. It
+?C: is often a directory that is mounted across diverse architectures.
+?C: Programs must be prepared to deal with ~name expansion.
+?C: This is the same as SCRIPTDIR, but is filename expanded at
+?C: configuration time, for use in programs not prepared to do
+?C: ~name substitutions at run-time.
+?H:#define SCRIPTDIR "$scriptdir" /**/
+?H:#define SCRIPTDIR_EXP "$scriptdirexp" /**/
+: determine where public executable scripts go
+set scriptdir scriptdir
+case "$scriptdir" in
+ : guess some guesses
+ $test -d /usr/share/scripts && dflt=/usr/share/scripts
+ $test -d /usr/share/bin && dflt=/usr/share/bin
+ $test -d /usr/local/script && dflt=/usr/local/script
+ $test -d $prefixexp/script && dflt=$prefixexp/script
+ set dflt
+ eval $prefixup
+Some installations have a separate directory just for executable scripts so
+that they can mount it across multiple architectures but keep the scripts in
+one spot. You might, for example, have a subdirectory of /usr/share for this.
+Or you might just lump your scripts in with all your other executables.
+rp='Where do you keep publicly executable scripts?'
+if $test "X$ansexp" != "X$scriptdirexp"; then
+if $afs; then
+ $cat <<EOM
+Since you are running AFS, I need to distinguish the directory in which
+scripts reside from the directory in which they are installed (and from
+which they are presumably copied to the former directory by occult means).
+ case "$installscript" in
+ '') dflt=`echo $scriptdirexp | sed 's#^/afs/#/afs/.#'`;;
+ *) dflt="$installscript";;
+ rp='Where will public scripts be installed?'
+ . ./getfile