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 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323
|
#
# OS2_Makefile
#
srcdir = .
VPATH = .
CC = gcc
CPP = cpp
INSTALL = /bin/install -c
INSTALL_PROGRAM = $(INSTALL)
INSTALL_DATA = $(INSTALL) -m 644
DEFS = -DHAVE_CONFIG_H
LIBS = -los2
CPPFLAGS =
CFLAGS = -O -DOS2
LDSTATIC =
LDFLAGS = -O -s $(LDSTATIC)
SHELL_PROG = ksh
prefix = c:/usr
exec_prefix = c:/usr
transform=@program_transform_name@
bindir = $(exec_prefix)/bin
mandir = $(prefix)/man/man$(manext)
manext = 1
# Suffix for executables: nothing for unix, .exe for os/2.
exe_suffix=.exe
SHELL = sh
SRCS = alloc.c c_ksh.c c_sh.c c_test.c c_ulimit.c edit.c emacs.c \
eval.c exec.c expr.c history.c io.c jobs.c lex.c mail.c \
main.c misc.c missing.c path.c shf.c sigact.c syn.c table.c trap.c \
tree.c tty.c var.c version.c vi.c
OBJS = os2.o alloc.o c_ksh.o c_sh.o c_test.o c_ulimit.o edit.o emacs.o \
eval.o exec.o expr.o history.o io.o jobs.o lex.o mail.o \
main.o misc.o missing.o path.o shf.o sigact.o syn.o table.o trap.o \
tree.o tty.o var.o version.o vi.o
HDRS = c_test.h edit.h expand.h ksh_dir.h ksh_limval.h ksh_stat.h ksh_time.h \
ksh_times.h ksh_wait.h lex.h proto.h sh.h shf.h sigact.h \
table.h tree.h tty.h
DISTFILES = $(SRCS) $(HDRS) ksh.Man Makefile.in configure.in \
config.h.in conf-end.h acconfig.h aclocal.m4 emacs-gen.sh \
mkinstalldirs install-sh new-version.sh siglist.in siglist.sh mkman \
check-fd.c check-pgrp.c check-sigs.c \
README NEWS CONTRIBUTORS LEGAL PROJECTS INSTALL NOTES BUG-REPORTS \
IAFA-PACKAGE ChangeLog ChangeLog.0 configure stamp-h.in
# ETCFILES also disted, but handled differently
ETCFILES = etc/ksh.kshrc etc/profile etc/sys_config.sh
# MISCFILES also disted, but handled differently
MISCFILES = misc/ChangeLog.sjg misc/Changes.jrm misc/Changes.mlj \
misc/Changes.pc misc/README.sjg misc/ReadMe.eg misc/ReadMe.emacs \
misc/ReadMe.jrm misc/Bugs
# TESTFILES also disted, but handled differently
TESTFILES = tests/README tests/th tests/th-sh tests/alias.t tests/arith.t \
tests/bksl-nl.t tests/brkcont.t tests/cdhist.t tests/eglob.t \
tests/glob.t tests/heredoc.t tests/history.t tests/ifs.t \
tests/integer.t tests/lineno.t tests/read.t tests/regress.t \
tests/syntax.t tests/unclass1.t tests/unclass2.t \
tests/version.t
# OS2FILES also disted, but handled differently
OS2FILES = os2/Makefile os2/config.h os2/config.status os2/configure.cmd \
os2/emacs.out os2/kshrc.ksh os2/make.sed os2/os2.c os2/os2siglist.out \
os2/README.os2 os2/NEWS.os2 os2/os2bugs os2/th.cmd os2/config.cache
all: $(SHELL_PROG)$(exe_suffix) $(SHELL_PROG).1
# This shouldn't be first - some makes don't know about PRECIOUS and assume it
# is the default target.
.PRECIOUS: configure config.h.in Makefile config.status
.c.o:
$(CC) -c $(CPPFLAGS) $(DEFS) -I. -I$(srcdir) $(CFLAGS) $<
install: installdirs all
$(INSTALL_PROGRAM) $(SHELL_PROG)$(exe_suffix) $(bindir)/$(SHELL_PROG)$(exe_suffix)
-$(INSTALL_DATA) $(SHELL_PROG).1 $(mandir)/$(SHELL_PROG).$(manext)
-@prog=$(bindir)/$(SHELL_PROG)$(exe_suffix);\
test -f /etc/shells \
&& (grep "^$$prog\$$" /etc/shells > /dev/null \
|| echo \
"NOTE: /etc/shells does not contain $$prog \
you should add it if you want to set your shell to $(SHELL_PROG)")
installdirs:
$(srcdir)/mkinstalldirs $(bindir) $(mandir)
uninstall:
rm -f $(bindir)/$(SHELL_PROG)$(exe_suffix)
rm -f $(mandir)/$(SHELL_PROG).$(manext)
check test:
th.cmd $(srcdir)/tests/th -s $(srcdir)/tests -p ./$(SHELL_PROG)$(exe_suffix) -C pdksh,sh,ksh,posix,posix-upu $(TESTARGS)
$(SHELL_PROG)$(exe_suffix): $(OBJS)
$(CC) $(LDFLAGS) -o $@ $(OBJS) $(LIBS)
# two steps to prevent the creation of a bogus tmpksh.1
$(SHELL_PROG).1: $(srcdir)/ksh.Man
$(srcdir)/mkman $(SHELL_PROG) $(srcdir)/ksh.Man > tmpksh.1
mv tmpksh.1 $(SHELL_PROG).1
info:
@echo "No info (yet)"
dvi:
$(srcdir)/configure: configure.in aclocal.m4
cd $(srcdir) && autoconf
$(srcdir)/config.h.in: stamp-h.in
$(srcdir)/stamp-h.in: configure.in aclocal.m4 acconfig.h
cd $(srcdir) && autoheader
date > $(srcdir)/stamp-h.in
config.h:
cmd /c copy $(srcdir)\os2\config.h config.h > nul
touch config.h
Makefile:
cmd /c copy $(srcdir)\os2\Makefile Makefile > nul
touch Makefile
# two steps to prevent the creation of a bogus siglist.out
siglist.out:
cmd /c copy $(srcdir)\os2\os2siglist.out siglist.out > nul
touch siglist.out
# two steps to prevent the creation of a bogus emacs.out
emacs.out:
cmd /c copy $(srcdir)\os2\emacs.out emacs.out > nul
touch emacs.out
debugtools: check-fd$(exe_suffix) check-sigs$(exe_suffix) \
check-pgrp$(exe_suffix)
check-fd.o check-pgrp.o check-sigs.o: config.h
check-fd$(exe_suffix): check-fd.o
$(CC) $(LDFLAGS) -o $@ check-fd.o $(LIBS)
check-pgrp$(exe_suffix): check-pgrp.o
$(CC) $(LDFLAGS) -o $@ check-pgrp.o $(LIBS)
check-sigs$(exe_suffix): check-sigs.o
$(CC) $(LDFLAGS) -o $@ check-sigs.o $(LIBS)
TAGS: $(SRCS) $(HDRS)
cd $(srcdir) && etags $(SRCS) $(HDRS)
tags: $(SRCS) $(HDRS)
cd $(srcdir) && ctags -wt $(SRCS) $(HDRS)
clean:
rm -f ksh$(exe_suffix) sh$(exe_suffix) ksh.1 sh.1 $(OBJS) siglist.out \
emacs.out core a.out mon.out gmon.out \
version.c.bak Makefile.bak Makefile.tmp check-fd$(exe_suffix) \
check-pgrp$(exe_suffix) check-sigs$(exe_suffix)
mostlyclean: clean
distclean: clean
rm -f Makefile config.h stamp-h config.status config.log config.cache \
tags TAGS *~
realclean: distclean
dist: $(DISTFILES) $(ETCFILES) $(MISCFILES) $(TESTFILES) $(OS2FILES)
cd $(srcdir) && \
{ \
./new-version.sh; \
FNAME=pdksh-`sed -e '/"@(.)/!d' \
-e 's/[^0-9]*\([0-9.]*\).*/\1/' -e q version.c`; \
if test `echo $$FNAME|tr . ' '|wc -w|sed 's/[ ]*//g'` -gt 3; \
then \
FNAME=`echo $$FNAME | sed 's/pdksh-/pdksh-unstable-/'`; \
fi; \
echo Creating version $$FNAME; \
rm -rf $$FNAME; \
mkdir $$FNAME $$FNAME/etc $$FNAME/misc $$FNAME/tests $$FNAME/os2; \
cp -p $(DISTFILES) $$FNAME; \
cp -p $(ETCFILES) $$FNAME/etc; \
cp -p $(MISCFILES) $$FNAME/misc; \
cp -p $(TESTFILES) $$FNAME/tests; \
cp -p $(OS2FILES) $$FNAME/os2; \
./emacs-gen.sh emacs.c > os2/emacs.out; \
test -x ./Dist-fixup && ./Dist-fixup $$FNAME; \
sed -f os2/make.sed < $$FNAME/Makefile.in > $$FNAME/os2/Makefile; \
chmod -R a+rX,u+w,og-w $$FNAME; \
tar chzf $$FNAME.tar.gz $$FNAME; \
find $$FNAME -print | xargs pathchk -p; \
}
depend: $(SRCS)
sed -n '1,/[ ]PUT ANYTHING BELOW THIS LINE/p' < Makefile > Makefile.tmp
srcs=; for i in $(SRCS) ; do srcs="$$srcs $(srcdir)/$$i"; done; \
$(CC) -M $(DEFS) -I. -I$(srcdir) $(CFLAGS) $$srcs | \
sed -e 's?[ ]/[^ ]*??g' -e 's?[ ]./? ?g' \
-e 's?[ ]$(srcdir)//*? ?g' -e 's?^$(srcdir)//*??' \
-e '/^[ ]*\\[ ]*$$/d' -e '/^[^:]*:[ ]*$$/d' \
-e 's/^\([ ]*\)$$/ sh.h/' \
>> Makefile.tmp
mv Makefile.tmp Makefile
@echo 'Make depend done (stopping make)'; false
# DON'T PUT ANYTHING BELOW THIS LINE (and don't delete it - its for make depend)
alloc.o: alloc.c sh.h config.h conf-end.h \
shf.h table.h tree.h expand.h lex.h \
proto.h
c_ksh.o: c_ksh.c sh.h config.h conf-end.h \
shf.h table.h tree.h expand.h lex.h \
proto.h ksh_stat.h \
sh.h
c_sh.o: c_sh.c sh.h config.h conf-end.h \
shf.h table.h tree.h expand.h lex.h \
proto.h ksh_stat.h ksh_time.h \
ksh_times.h \
sh.h
c_test.o: c_test.c sh.h config.h conf-end.h \
shf.h table.h tree.h expand.h lex.h \
proto.h ksh_stat.h c_test.h
c_ulimit.o: c_ulimit.c sh.h config.h conf-end.h \
shf.h table.h tree.h expand.h lex.h \
proto.h ksh_time.h \
sh.h
edit.o: edit.c config.h conf-end.h sh.h \
shf.h table.h tree.h expand.h lex.h \
proto.h tty.h \
edit.h \
ksh_stat.h
emacs.o: emacs.c config.h conf-end.h sh.h \
shf.h table.h tree.h expand.h lex.h \
proto.h ksh_stat.h ksh_dir.h \
edit.h emacs.out
eval.o: eval.c sh.h config.h conf-end.h \
shf.h table.h tree.h expand.h lex.h \
proto.h \
ksh_dir.h \
ksh_stat.h
exec.o: exec.c sh.h config.h conf-end.h \
shf.h table.h tree.h expand.h lex.h \
proto.h c_test.h \
ksh_stat.h
expr.o: expr.c sh.h config.h conf-end.h \
shf.h table.h tree.h expand.h lex.h \
proto.h \
sh.h
history.o: history.c sh.h config.h conf-end.h \
shf.h table.h tree.h expand.h lex.h \
proto.h ksh_stat.h
io.o: io.c \
sh.h config.h conf-end.h \
shf.h table.h tree.h expand.h lex.h \
proto.h ksh_stat.h
jobs.o: jobs.c sh.h config.h conf-end.h \
shf.h table.h tree.h expand.h lex.h \
proto.h ksh_stat.h ksh_wait.h \
ksh_times.h ksh_time.h \
tty.h \
sh.h
lex.o: lex.c sh.h config.h conf-end.h \
shf.h table.h tree.h expand.h lex.h \
proto.h \
sh.h
mail.o: mail.c config.h conf-end.h sh.h \
shf.h table.h tree.h expand.h lex.h \
proto.h ksh_stat.h ksh_time.h \
sh.h
main.o: main.c sh.h config.h conf-end.h \
shf.h table.h tree.h expand.h lex.h \
proto.h ksh_stat.h ksh_time.h \
sh.h
misc.o: misc.c sh.h config.h conf-end.h \
shf.h table.h tree.h expand.h lex.h \
proto.h \
sh.h
missing.o: missing.c sh.h config.h conf-end.h \
shf.h table.h tree.h expand.h lex.h \
proto.h ksh_stat.h ksh_dir.h \
ksh_time.h \
ksh_times.h \
sh.h
path.o: path.c sh.h config.h conf-end.h \
shf.h table.h tree.h expand.h lex.h \
proto.h ksh_stat.h
shf.o: shf.c sh.h config.h conf-end.h \
shf.h table.h tree.h expand.h lex.h \
proto.h ksh_stat.h ksh_limval.h \
sh.h
sigact.o: sigact.c sh.h config.h conf-end.h \
shf.h table.h tree.h expand.h lex.h \
proto.h
syn.o: syn.c sh.h config.h conf-end.h \
shf.h table.h tree.h expand.h lex.h \
proto.h c_test.h
table.o: table.c sh.h config.h conf-end.h \
shf.h table.h tree.h expand.h lex.h \
proto.h
trap.o: trap.c sh.h config.h conf-end.h \
shf.h table.h tree.h expand.h lex.h \
proto.h siglist.out
tree.o: tree.c sh.h config.h conf-end.h \
shf.h table.h tree.h expand.h lex.h \
proto.h
tty.o: tty.c sh.h config.h conf-end.h \
shf.h table.h tree.h expand.h lex.h \
proto.h ksh_stat.h tty.h \
sh.h
var.o: var.c sh.h config.h conf-end.h \
shf.h table.h tree.h expand.h lex.h \
proto.h ksh_time.h \
ksh_limval.h \
ksh_stat.h \
sh.h
version.o: version.c sh.h config.h conf-end.h \
shf.h table.h tree.h expand.h lex.h \
proto.h
vi.o: vi.c config.h conf-end.h sh.h \
shf.h table.h tree.h expand.h lex.h \
proto.h \
ksh_stat.h edit.h
|