1 ?RCS: $Id: scriptdir.U,v 3.1 1999/07/09 18:20:13 doughera Exp doughera $
3 ?RCS: Copyright (c) 1991-1993, Raphael Manfredi
5 ?RCS: You may redistribute only under the terms of the Artistic Licence,
6 ?RCS: as specified in the README file that comes with the distribution.
7 ?RCS: You may reuse parts of this distribution only within the terms of
8 ?RCS: that same Artistic Licence; a copy of which may be found at the root
9 ?RCS: of the source tree for dist 3.0.
11 ?RCS: $Log: scriptdir.U,v $
12 ?RCS: Revision 3.1 1999/07/09 18:20:13 doughera
13 ?RCS: Updated for installprefix
15 ?RCS: Revision 3.0.1.3 1995/09/25 09:17:15 ram
16 ?RCS: patch59: unit is now forced to the top of Configure, if possible
18 ?RCS: Revision 3.0.1.2 1995/01/30 14:46:13 ram
19 ?RCS: patch49: can now handle installation prefix changes (from WED)
21 ?RCS: Revision 3.0.1.1 1994/08/29 16:32:04 ram
22 ?RCS: patch32: now uses installation prefix
24 ?RCS: Revision 3.0 1993/08/18 12:09:45 ram
25 ?RCS: Baseline for dist 3.0 netwide release.
27 ?MAKE:scriptdir scriptdirexp installscript: cat test Getfile Loc \
28 Oldconfig +bin Prefixit Setprefixvar prefixexp Prefixup
29 ?MAKE: -pick add $@ %<
33 ?S: This variable holds the name of the directory in which the user wants
34 ?S: to put publicly scripts for the package in question. It is either
35 ?S: the same directory as for binaries, or a special one that can be
36 ?S: mounted across different architectures, like /usr/share. Programs
37 ?S: must be prepared to deal with ~name expansion.
41 ?S: This variable is the same as scriptdir, but is filename expanded
42 ?S: at configuration time, for programs not wanting to bother with it.
45 ?S: This variable is usually the same as scriptdirexp, unless you are on
46 ?S: a system running AFS, in which case they may differ slightly. You
47 ?S: should always use this variable within your makefiles for portability.
50 ?C: This symbol holds the name of the directory in which the user wants
51 ?C: to put publicly executable scripts for the package in question. It
52 ?C: is often a directory that is mounted across diverse architectures.
53 ?C: Programs must be prepared to deal with ~name expansion.
56 ?C: This is the same as SCRIPTDIR, but is filename expanded at
57 ?C: configuration time, for use in programs not prepared to do
58 ?C: ~name substitutions at run-time.
60 ?H:#define SCRIPTDIR "$scriptdir" /**/
61 ?H:#define SCRIPTDIR_EXP "$scriptdirexp" /**/
64 ?LINT:change prefixvar
66 ?LINT:set scriptdirexp
67 : determine where public executable scripts go
68 set scriptdir scriptdir
74 $test -d /usr/share/scripts && dflt=/usr/share/scripts
75 $test -d /usr/share/bin && dflt=/usr/share/bin
76 $test -d /usr/local/script && dflt=/usr/local/script
77 $test -d /usr/local/scripts && dflt=/usr/local/scripts
78 $test -d $prefixexp/script && dflt=$prefixexp/script
87 Some installations have a separate directory just for executable scripts so
88 that they can mount it across multiple architectures but keep the scripts in
89 one spot. You might, for example, have a subdirectory of /usr/share for this.
90 Or you might just lump your scripts in with all your other executables.
94 rp='Where do you keep publicly executable scripts?'
96 if $test "X$ansexp" != "X$scriptdirexp"; then
102 : A little fix up for an irregularly named variable.
103 installscript="$installscriptdir"