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. | |
26 | ?S: For unix it is empty. Other possible values include '.exe'. | |
27 | ?S:. | |
28 | ?S:_a: | |
29 | ?S: This variable defines the extension used for ordinary libraries. | |
30 | ?S: For unix, it is '.a'. The '.' is included. Other possible | |
31 | ?S: values include '.lib'. | |
32 | ?S:. | |
33 | ?S:_o: | |
34 | ?S: This variable defines the extension used for object files. | |
35 | ?S: For unix, it is '.o'. The '.' is included. Other possible | |
36 | ?S: values include '.obj'. | |
37 | ?S:. | |
38 | ?S:firstmakefile: | |
39 | ?S: This variable defines the first file searched by make. On unix, | |
40 | ?S: it is makefile (then Makefile). On case-insensitive systems, | |
41 | ?S: it might be something else. This is only used to deal with | |
42 | ?S: convoluted make depend tricks. | |
43 | ?S:. | |
44 | ?S:archobjs: | |
45 | ?S: This variable defines any additional objects that must be linked | |
46 | ?S: in with the program on this architecture. On unix, it is usually | |
47 | ?S: empty. It is typically used to include emulations of unix calls | |
48 | ?S: or other facilities. For perl on OS/2, for example, this would | |
49 | ?S: include os2/os2.obj. | |
50 | ?S:. | |
51 | ?X: Metaconfig's Obsolete symbol stuff is too over-eager. In the | |
52 | ?X: perl sources, it picks up things like "P" and "FLOCK" that are | |
53 | ?X: not used in the way Metaconfig thinks they are. Thus I can't | |
54 | ?X: just declare these obsolete and then run metaconfig -o. | |
55 | ?X: Instead, I'll just handle them here. | |
56 | ?X: Sadly, history has conspired to give us a web of definitions; | |
57 | ?X: this could have been much simpler. | |
58 | ?S:lib_ext: | |
59 | ?S: This is an old synonym for _a. | |
60 | ?S:. | |
61 | ?S:exe_ext: | |
62 | ?S: This is an old synonym for _exe. | |
63 | ?S:. | |
64 | ?S:obj_ext: | |
65 | ?S: This is an old synonym for _o. | |
66 | ?S:. | |
67 | ?S:path_sep: | |
68 | ?S: This is an old synonym for p_ in Head.U, the character | |
69 | ?S: used to separate elements in the command shell search PATH. | |
70 | ?S:. | |
71 | ?LINT: change _a _exe _o p_ | |
72 | ?INIT:: Trailing extension. Override this in a hint file, if needed. | |
959f3c4c JH |
73 | ?INIT:: Extra object files, if any, needed on this platform. |
74 | ?INIT:archobjs='' | |
75 | : Define several unixisms. | |
76 | : Hints files or command line option can be used to override them. | |
77 | : The convoluted testing is in case hints files set either the old | |
78 | : or the new name. | |
79 | case "$_exe" in | |
80 | '') case "$exe_ext" in | |
f12ad395 | 81 | '') ;; |
959f3c4c JH |
82 | *) _exe="$exe_ext" ;; |
83 | esac | |
84 | ;; | |
85 | esac | |
86 | case "$_a" in | |
87 | '') case "$lib_ext" in | |
88 | '') _a='.a';; | |
89 | *) _a="$lib_ext" ;; | |
90 | esac | |
91 | ;; | |
92 | esac | |
93 | case "$_o" in | |
94 | '') case "$obj_ext" in | |
95 | '') _o='.o';; | |
96 | *) _o="$obj_ext";; | |
97 | esac | |
98 | ;; | |
99 | esac | |
100 | case "$p_" in | |
101 | '') case "$path_sep" in | |
102 | '') p_=':';; | |
103 | *) p_="$path_sep";; | |
104 | esac | |
105 | ;; | |
106 | esac | |
107 | exe_ext=$_exe | |
108 | lib_ext=$_a | |
109 | obj_ext=$_o | |
110 | path_sep=$p_ | |
111 | ||
112 | @if firstmakefile | |
113 | : Which makefile gets called first. This is used by make depend. | |
114 | case "$firstmakefile" in | |
115 | '') firstmakefile='makefile';; | |
116 | esac | |
117 | ||
118 | @end |