blob: dfa66b4fd80d980e29dcdfe5cd16c712823ce15d (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
|
# Makefile for OS/2. Generated from Makefile.in when CVS is
# configured for a dist-build. Configure never gets run on OS/2, so
# we must include the generated Makefile in the distribution. See the
# `dist-dir' rule.
project: cvs.exe
# .SUFFIXES .c .obj .exe
# path slash
# Maintainers: always leave this set to "/", because `make dist' has
# to work on Unix systems. See os2/README to find out why we have
# this var.
SL = /
# Directory in which to install executables.
install_dir = s:${SL}gnu${SL}util
# srcdir is usually "."
srcdir = @srcdir@
# top_srcdir is usually ".."
top_srcdir = @top_srcdir@
lib_dir = @top_srcdir@${SL}lib
cvs_srcdir = @top_srcdir@${SL}src
# Do we need these?
# prefix = /usr/local
# exec_prefix = ${prefix}
# taken straight from the example project
LIB = s:${SL}ibmcpp${SL}lib;s:${SL}toolkt21${SL}os2lib;
CINC = -Is:${SL}ibmcpp${SL}include -Is:${SL}toolkt21${SL}c${SL}os2h
# This says we are building an object file, not a full executable.
OBJ_CFLAGS = -C+
CFLAGS = -W3 -Wpro+rea+tru+use+ -Ti+ -Ss+ -Gd+ -Gm+ -G4 -Q+ -Sm ${CINC} \
-I${srcdir} -I${lib_dir} -I${cvs_srcdir} \
-DIBM_CPP -DHAVE_CONFIG_H \
-DTCPIP_IBM -Is:${SL}ibmtcpip${SL}include
# needed to make command-line wildcard expansion work right. That's
# right, DOS-descendants handle this from the program, not the shell.
ARGVLIB = s:${SL}ibmcpp${SL}lib${SL}setargv.obj
# TCP/IP stuff
TCPIPLIB = s:${SL}ibmtcpip${SL}lib${SL}tcp32dll.lib s:${SL}ibmtcpip${SL}lib${SL}so32dll.lib
# headers specific to OS/2
# We list OS2_HEADERS so we know what to include when we make dist-dir
# here.
OS2_HEADERS = \
${srcdir}${SL}tcpip.h \
${srcdir}${SL}config.h \
${srcdir}${SL}options.h \
${srcdir}${SL}pwd.h \
${srcdir}${SL}dirent.h \
${srcdir}${SL}rcmd.h \
${srcdir}${SL}popen.h
# headers we use from the common src dir, ..${SL}src
COMMON_HEADERS = \
${cvs_srcdir}${SL}client.h \
${cvs_srcdir}${SL}cvs.h \
${cvs_srcdir}${SL}rcs.h \
${cvs_srcdir}${SL}hash.h \
${cvs_srcdir}${SL}myndbm.h \
${cvs_srcdir}${SL}patchlevel.h \
${cvs_srcdir}${SL}update.h \
${cvs_srcdir}${SL}server.h \
${cvs_srcdir}${SL}error.h
# sources specific to OS/2
OS2_SOURCES = \
${srcdir}${SL}mkdir.c \
${srcdir}${SL}pwd.c \
${srcdir}${SL}filesubr.c \
${srcdir}${SL}dirent.c \
${srcdir}${SL}run.c \
${srcdir}${SL}stripslash.c \
${srcdir}${SL}rcmd.c \
${srcdir}${SL}waitpid.c \
${srcdir}${SL}popen.c \
${srcdir}${SL}porttcp.c \
${srcdir}${SL}strippath.c \
${srcdir}${SL}getdate.c \
${srcdir}${SL}getpass.c
# sources we use from the common src dir, ..${SL}src
COMMON_SOURCES = \
${cvs_srcdir}${SL}add.c \
${cvs_srcdir}${SL}admin.c \
${cvs_srcdir}${SL}checkin.c \
${cvs_srcdir}${SL}checkout.c \
${cvs_srcdir}${SL}classify.c \
${cvs_srcdir}${SL}client.c \
${cvs_srcdir}${SL}commit.c \
${cvs_srcdir}${SL}create_adm.c \
${cvs_srcdir}${SL}cvsrc.c \
${cvs_srcdir}${SL}diff.c \
${cvs_srcdir}${SL}edit.c \
${cvs_srcdir}${SL}entries.c \
${cvs_srcdir}${SL}error.c \
${cvs_srcdir}${SL}expand_path.c \
${cvs_srcdir}${SL}fileattr.c \
${cvs_srcdir}${SL}find_names.c \
${cvs_srcdir}${SL}hash.c \
${cvs_srcdir}${SL}history.c \
${cvs_srcdir}${SL}ignore.c \
${cvs_srcdir}${SL}import.c \
${cvs_srcdir}${SL}lock.c \
${cvs_srcdir}${SL}log.c \
${cvs_srcdir}${SL}login.c \
${cvs_srcdir}${SL}logmsg.c \
${cvs_srcdir}${SL}main.c \
${cvs_srcdir}${SL}modules.c \
${cvs_srcdir}${SL}myndbm.c \
${cvs_srcdir}${SL}no_diff.c \
${cvs_srcdir}${SL}parseinfo.c \
${cvs_srcdir}${SL}patch.c \
${cvs_srcdir}${SL}rcs.c \
${cvs_srcdir}${SL}rcscmds.c \
${cvs_srcdir}${SL}recurse.c \
${cvs_srcdir}${SL}release.c \
${cvs_srcdir}${SL}remove.c \
${cvs_srcdir}${SL}repos.c \
${cvs_srcdir}${SL}root.c \
${cvs_srcdir}${SL}rtag.c \
${cvs_srcdir}${SL}scramble.c \
${cvs_srcdir}${SL}server.c \
${cvs_srcdir}${SL}status.c \
${cvs_srcdir}${SL}subr.c \
${cvs_srcdir}${SL}tag.c \
${cvs_srcdir}${SL}update.c \
${cvs_srcdir}${SL}watch.c \
${cvs_srcdir}${SL}wrapper.c \
${cvs_srcdir}${SL}vers_ts.c \
${cvs_srcdir}${SL}version.c
# end of $COMMON_SOURCES
# sources from ..${SL}lib
LIB_SOURCES = \
${lib_dir}${SL}getopt.c \
${lib_dir}${SL}getopt1.c \
${lib_dir}${SL}getline.c \
${lib_dir}${SL}getwd.c \
${lib_dir}${SL}save-cwd.c \
${lib_dir}${SL}sighandle.c \
${lib_dir}${SL}yesno.c \
${lib_dir}${SL}xgetwd.c \
${lib_dir}${SL}md5.c \
${lib_dir}${SL}fnmatch.c \
${lib_dir}${SL}regex.c
# object files from OS/2 sources
OS2_OBJECTS = \
${srcdir}${SL}mkdir.obj \
${srcdir}${SL}pwd.obj \
${srcdir}${SL}filesubr.obj \
${srcdir}${SL}dirent.obj \
${srcdir}${SL}run.obj \
${srcdir}${SL}stripslash.obj \
${srcdir}${SL}rcmd.obj \
${srcdir}${SL}waitpid.obj \
${srcdir}${SL}popen.obj \
${srcdir}${SL}porttcp.obj \
${srcdir}${SL}strippath.obj \
${srcdir}${SL}getdate.obj \
${srcdir}${SL}getpass.obj
# object files from ..${SL}src
COMMON_OBJECTS = \
${cvs_srcdir}${SL}add.obj \
${cvs_srcdir}${SL}admin.obj \
${cvs_srcdir}${SL}checkin.obj \
${cvs_srcdir}${SL}checkout.obj \
${cvs_srcdir}${SL}classify.obj \
${cvs_srcdir}${SL}client.obj \
${cvs_srcdir}${SL}commit.obj \
${cvs_srcdir}${SL}create_adm.obj \
${cvs_srcdir}${SL}cvsrc.obj \
${cvs_srcdir}${SL}diff.obj \
${cvs_srcdir}${SL}edit.obj \
${cvs_srcdir}${SL}entries.obj \
${cvs_srcdir}${SL}error.obj \
${cvs_srcdir}${SL}expand_path.obj \
${cvs_srcdir}${SL}fileattr.obj \
${cvs_srcdir}${SL}find_names.obj \
${cvs_srcdir}${SL}hash.obj \
${cvs_srcdir}${SL}history.obj \
${cvs_srcdir}${SL}ignore.obj \
${cvs_srcdir}${SL}import.obj \
${cvs_srcdir}${SL}lock.obj \
${cvs_srcdir}${SL}log.obj \
${cvs_srcdir}${SL}login.obj \
${cvs_srcdir}${SL}logmsg.obj \
${cvs_srcdir}${SL}main.obj \
${cvs_srcdir}${SL}modules.obj \
${cvs_srcdir}${SL}myndbm.obj \
${cvs_srcdir}${SL}no_diff.obj \
${cvs_srcdir}${SL}parseinfo.obj \
${cvs_srcdir}${SL}patch.obj \
${cvs_srcdir}${SL}rcs.obj \
${cvs_srcdir}${SL}rcscmds.obj \
${cvs_srcdir}${SL}recurse.obj \
${cvs_srcdir}${SL}release.obj \
${cvs_srcdir}${SL}remove.obj \
${cvs_srcdir}${SL}repos.obj \
${cvs_srcdir}${SL}root.obj \
${cvs_srcdir}${SL}rtag.obj \
${cvs_srcdir}${SL}scramble.obj \
${cvs_srcdir}${SL}server.obj \
${cvs_srcdir}${SL}status.obj \
${cvs_srcdir}${SL}subr.obj \
${cvs_srcdir}${SL}tag.obj \
${cvs_srcdir}${SL}update.obj \
${cvs_srcdir}${SL}watch.obj \
${cvs_srcdir}${SL}wrapper.obj \
${cvs_srcdir}${SL}vers_ts.obj \
${cvs_srcdir}${SL}version.obj
# end of $COMMON_OBJECTS
# objects from ..${SL}lib
LIB_OBJECTS = \
${lib_dir}${SL}getopt.obj \
${lib_dir}${SL}getopt1.obj \
${lib_dir}${SL}getline.obj \
${lib_dir}${SL}getwd.obj \
${lib_dir}${SL}save-cwd.obj \
${lib_dir}${SL}sighandle.obj \
${lib_dir}${SL}yesno.obj \
${lib_dir}${SL}xgetwd.obj \
${lib_dir}${SL}md5.obj \
${lib_dir}${SL}fnmatch.obj \
${lib_dir}${SL}regex.obj
SOURCES = ${COMMON_SOURCES} ${LIB_SOURCES} ${OS2_SOURCES}
HEADERS = ${COMMON_HEADERS} ${OS2_HEADERS}
OBJECTS = ${COMMON_OBJECTS} ${LIB_OBJECTS} ${OS2_OBJECTS}
DISTFILES = ${OS2_HEADERS} ${OS2_SOURCES} \
${srcdir}${SL}README ${srcdir}${SL}ChangeLog \
${srcdir}${SL}Makefile.in ${srcdir}${SL}.cvsignore \
${srcdir}${SL}test-makefile Makefile
all:
.PHONY: all install uninstall
all install uninstall:
.PHONY: tags TAGS
tags TAGS:
.PHONY: ls
ls:
@echo ${DISTFILES}
.PHONY: clean distclean realclean mostlyclean
clean distclean realclean mostlyclean:
.PHONY: lint
lint:
.PHONY: dist-dir
dist-dir:
mkdir ${DISTDIR}
for i in ${DISTFILES}; do \
ln $${i} ${DISTDIR}; \
done
# We don't have a real distclean or anything like that, but at least
# we can get rid of the obj files and cvs.exe.
clean:
rm -f cvs.exe
rm -f ${srcdir}${SL}*.obj
rm -f ${lib_dir}${SL}*.obj
rm -f ${cvs_srcdir}${SL}*.obj
install-cvs: cvs.exe
cp ${srcdir}${SL}cvs.exe ${install_dir}${SL}cvs.exe
%.obj: %.c
icc ${OBJ_CFLAGS} ${CFLAGS} /Fo$@ $*.c
# There seems to be no ICC option for specifying library locations, so
# we must `set' the path in the compilation environment. Urgkle.
cvs.exe: ${OBJECTS}
echo Creating icc.in...
echo -Q+ -Ti+ -Fe$@ -B"/batch" -B"/NOE" > icc.in
echo ${OS2_OBJECTS} >> icc.in
echo ${LIB_OBJECTS} >> icc.in
echo ${COMMON_OBJECTS} >> icc.in
echo ${TCPIPLIB} >> icc.in
echo ${ARGVLIB} >> icc.in
echo Creating icc.in... done.
set LIB=${LIB} & icc @icc.in
# cvs.obj: ${OBJECTS} ${SOURCES} ${HEADERS}
subdir = os2
Makefile: ../config.status $(srcdir)/Makefile.in
cd .. && CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= ./config.status
|