Commit | Line | Data |
---|---|---|
959f3c4c JH |
1 | ?RCS: $Id: Unix.U,v 3.0.1.1 1997/02/28 15:20:06 ram Exp $ |
2 | ?RCS: | |
3 | ?RCS: Copyright (c) 1991-1993, Raphael Manfredi | |
4 | ?RCS: | |
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. | |
10 | ?RCS: | |
11 | ?RCS: $Log: Unix.U,v $ | |
12 | ?RCS: Revision 3.0.1.1 1997/02/28 15:20:06 ram | |
13 | ?RCS: patch61: created | |
14 | ?RCS: | |
15 | ?X: | |
16 | ?X: The purpose of this unit is to define things that are common accross all | |
17 | ?X: known UNIX platforms. If Configure is ported/used on a non-UNIX | |
18 | ?X: environment, then some of the following variables can be redefined in hint | |
19 | ?X: files. | |
20 | ?X: | |
21 | ?MAKE:Unix _exe _a _o exe_ext lib_ext obj_ext path_sep \ | |
22 | firstmakefile archobjs: Oldconfig | |
23 | ?MAKE: -pick add $@ %< | |
24 | ?S:_exe: | |
25 | ?S: This variable defines the extension used for executable files. | |
7fdfc47f JH |
26 | ?S: DJGPP, Cygwin and OS/2 use '.exe'. Stratus VOS uses '.pm'. |
27 | ?S: No other operating systems require an extension for executable | |
28 | ?S: files, so it is empty for all others. | |
959f3c4c JH |
29 | ?S:. |
30 | ?S:_a: | |
7fdfc47f | 31 | ?S: This variable defines the extension used for ordinary library files. |
959f3c4c JH |
32 | ?S: For unix, it is '.a'. The '.' is included. Other possible |
33 | ?S: values include '.lib'. | |
34 | ?S:. | |
35 | ?S:_o: | |
36 | ?S: This variable defines the extension used for object files. | |
37 | ?S: For unix, it is '.o'. The '.' is included. Other possible | |
38 | ?S: values include '.obj'. | |
39 | ?S:. | |
40 | ?S:firstmakefile: | |
41 | ?S: This variable defines the first file searched by make. On unix, | |
42 | ?S: it is makefile (then Makefile). On case-insensitive systems, | |
43 | ?S: it might be something else. This is only used to deal with | |
44 | ?S: convoluted make depend tricks. | |
45 | ?S:. | |
46 | ?S:archobjs: | |
47 | ?S: This variable defines any additional objects that must be linked | |
48 | ?S: in with the program on this architecture. On unix, it is usually | |
49 | ?S: empty. It is typically used to include emulations of unix calls | |
50 | ?S: or other facilities. For perl on OS/2, for example, this would | |
51 | ?S: include os2/os2.obj. | |
52 | ?S:. | |
53 | ?X: Metaconfig's Obsolete symbol stuff is too over-eager. In the | |
54 | ?X: perl sources, it picks up things like "P" and "FLOCK" that are | |
55 | ?X: not used in the way Metaconfig thinks they are. Thus I can't | |
56 | ?X: just declare these obsolete and then run metaconfig -o. | |
57 | ?X: Instead, I'll just handle them here. | |
58 | ?X: Sadly, history has conspired to give us a web of definitions; | |
59 | ?X: this could have been much simpler. | |
60 | ?S:lib_ext: | |
61 | ?S: This is an old synonym for _a. | |
62 | ?S:. | |
63 | ?S:exe_ext: | |
64 | ?S: This is an old synonym for _exe. | |
65 | ?S:. | |
66 | ?S:obj_ext: | |
67 | ?S: This is an old synonym for _o. | |
68 | ?S:. | |
69 | ?S:path_sep: | |
70 | ?S: This is an old synonym for p_ in Head.U, the character | |
71 | ?S: used to separate elements in the command shell search PATH. | |
72 | ?S:. | |
73 | ?LINT: change _a _exe _o p_ | |
74 | ?INIT:: Trailing extension. Override this in a hint file, if needed. | |
959f3c4c JH |
75 | ?INIT:: Extra object files, if any, needed on this platform. |
76 | ?INIT:archobjs='' | |
77 | : Define several unixisms. | |
78 | : Hints files or command line option can be used to override them. | |
79 | : The convoluted testing is in case hints files set either the old | |
80 | : or the new name. | |
81 | case "$_exe" in | |
82 | '') case "$exe_ext" in | |
f12ad395 | 83 | '') ;; |
959f3c4c JH |
84 | *) _exe="$exe_ext" ;; |
85 | esac | |
86 | ;; | |
87 | esac | |
88 | case "$_a" in | |
89 | '') case "$lib_ext" in | |
90 | '') _a='.a';; | |
91 | *) _a="$lib_ext" ;; | |
92 | esac | |
93 | ;; | |
94 | esac | |
95 | case "$_o" in | |
96 | '') case "$obj_ext" in | |
97 | '') _o='.o';; | |
98 | *) _o="$obj_ext";; | |
99 | esac | |
100 | ;; | |
101 | esac | |
102 | case "$p_" in | |
103 | '') case "$path_sep" in | |
104 | '') p_=':';; | |
105 | *) p_="$path_sep";; | |
106 | esac | |
107 | ;; | |
108 | esac | |
109 | exe_ext=$_exe | |
110 | lib_ext=$_a | |
111 | obj_ext=$_o | |
112 | path_sep=$p_ | |
113 | ||
114 | @if firstmakefile | |
115 | : Which makefile gets called first. This is used by make depend. | |
116 | case "$firstmakefile" in | |
117 | '') firstmakefile='makefile';; | |
118 | esac | |
119 | ||
120 | @end |