?RCS: $Id$ ?RCS: ?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi ?RCS: ?RCS: You may redistribute only under the terms of the Artistic License, ?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 License; a copy of which may be found at the root ?RCS: of the source tree for dist 4.0. ?RCS: ?RCS: $Log: scriptdir.U,v $ ?RCS: Revision 3.0.1.3 1995/09/25 09:17:15 ram ?RCS: patch59: unit is now forced to the top of Configure, if possible ?RCS: ?RCS: Revision 3.0.1.2 1995/01/30 14:46:13 ram ?RCS: patch49: can now handle installation prefix changes (from WED) ?RCS: ?RCS: Revision 3.0.1.1 1994/08/29 16:32:04 ram ?RCS: patch32: now uses installation prefix ?RCS: ?RCS: Revision 3.0 1993/08/18 12:09:45 ram ?RCS: Baseline for dist 3.0 netwide release. ?RCS: ?MAKE:scriptdir scriptdirexp installscript: afs cat test Getfile Loc \ Oldconfig +bin Prefixit prefixexp Prefixup ?MAKE: -pick add $@ %< ?Y:TOP ?S:scriptdir: ?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:. ?S:scriptdirexp: ?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:. ?S:installscript: ?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. ?S:. ?C:SCRIPTDIR: ?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:. ?C:SCRIPTDIR_EXP: ?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. ?C:. ?H:#define SCRIPTDIR "$scriptdir" /**/ ?H:#define SCRIPTDIR_EXP "$scriptdirexp" /**/ ?H:. : determine where public executable scripts go set scriptdir scriptdir eval $prefixit case "$scriptdir" in '') dflt="$bin" : 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 ;; *) dflt="$scriptdir" ;; esac $cat <