blob: bbddf41fa272e1efb64a41cb14d95708c118675a (
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
|
--- ksh-openbsd_cvs/Makefile.orig 2012-09-07 10:54:21.889840298 +0200
+++ ksh-openbsd_cvs.new/Makefile 2012-09-07 10:54:51.915839691 +0200
@@ -1,21 +1,36 @@
-# $OpenBSD: Makefile,v 1.28 2012/04/30 03:51:29 djm 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
+ 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
-DEFS= -Wall
-CFLAGS+=${DEFS} -I. -I${.CURDIR} -I${.CURDIR}/../../lib/libc/gen
-MAN= ksh.1 sh.1
-
-LINKS= ${BINDIR}/ksh ${BINDIR}/rksh
-LINKS+= ${BINDIR}/ksh ${BINDIR}/sh
-MLINKS= ksh.1 rksh.1
+all: $(PROG)
+
+CFLAGS+=-Wall
+$(PROG): $(OBJS)
+ gcc $(OBJS) -lbsd -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)
check test:
/usr/bin/perl ${.CURDIR}/tests/th -s ${.CURDIR}/tests -p ./ksh -C \
pdksh,sh,ksh,posix,posix-upu
-
-.include <bsd.prog.mk>
|