blob: 7c9ca8f8cae9af7c7bc3bb31b3975e12a550bbe7 (
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
|
--- ksh-openbsd_cvs/Makefile 2010-02-23 12:49:12.000000000 +0100
+++ ksh-openbsd_cvs.new/Makefile 2010-04-01 21:21:23.498239164 +0200
@@ -1,28 +1,43 @@
-# $OpenBSD: Makefile,v 1.27 2009/03/03 20:01:01 millert Exp $
+ifdef ${PREFIX}
+PREFIX=${PREFIX}
+else
+PREFIX=/usr
+endif
+BINDIR=${DESTDIR}/bin
+MANDIR=${DESTDIR}${PREFIX}/man
PROG= ksh
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 mknod.c \
misc.c path.c shf.c syn.c table.c trap.c tree.c tty.c var.c \
- version.c vi.c
-
-DEFS= -Wall
-CFLAGS+=${DEFS} -I. -I${.CURDIR} -I${.CURDIR}/../../lib/libc/gen
-MAN= ksh.1 sh.1
+ version.c vi.c strlcpy.c strlcat.c
+OBJS= 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 mknod.o \
+ misc.o path.o shf.o syn.o table.o trap.o tree.o tty.o var.o \
+ version.o vi.o strlcpy.o strlcat.o
CLEANFILES+= emacs.out
-LINKS= ${BINDIR}/ksh ${BINDIR}/rksh
-LINKS+= ${BINDIR}/ksh ${BINDIR}/sh
-MLINKS= ksh.1 rksh.1
+all: $(PROG)
+
+CFLAGS+=-Wall
+$(PROG): $(OBJS)
+ gcc $(OBJS) -o ksh
+
+install:
+ install -m755 -d $(BINDIR)
+ install -m755 --strip --no-target-directory ksh $(BINDIR)/pdksh
+ install -m755 -d $(MANDIR)/man1
+ install -m644 --no-target-directory ksh.1 $(MANDIR)/man1/pdksh.1
+
+clean:
+ rm -f $(OBJS) $(PROG) emacs.out
.depend emacs.o: emacs.out
emacs.out: emacs.c
- /bin/sh ${.CURDIR}/emacs-gen.sh ${.CURDIR}/emacs.c > emacs.out
+ /bin/sh emacs-gen.sh emacs.c > emacs.out
check test:
/usr/bin/perl ${.CURDIR}/tests/th -s ${.CURDIR}/tests -p ./ksh -C \
pdksh,sh,ksh,posix,posix-upu
-
-.include <bsd.prog.mk>
|