Using the new contrib rev mechanism, bring cvs up to 1.12.8. Add patch files
[dragonfly.git] / gnu / usr.bin / cvs / cvs / Makefile
1 # $FreeBSD: src/gnu/usr.bin/cvs/cvs/Makefile,v 1.32.2.6 2003/01/21 23:06:51 peter Exp $
2 # $DragonFly: src/gnu/usr.bin/cvs/cvs/Makefile,v 1.6 2004/05/20 02:27:56 dillon Exp $
3
4 .include "${.CURDIR}/../Makefile.inc"
5
6 .PATH:  ${CVSDIR}/src
7 .PATH:  ${CVSDIR}/lib
8 .PATH:  ${CVSDIR}/man
9 .PATH:  ${CVSDIR}/doc
10 .PATH:  ${CVSDIR}
11
12 PROG=   cvs
13 MAN=    ${.OBJDIR}/cvs.1 cvs.5
14
15 SRCS=   add.c admin.c annotate.c buffer.c \
16         checkin.c checkout.c classify.c client.c \
17         commit.c create_adm.c cvsrc.c edit.c entries.c error.c \
18         exithandle.c expand_path.c fileattr.c filesubr.c find_names.c \
19         hardlink.c hash.c history.c ignore.c import.c lock.c log.c \
20         log-buffer.c login.c logmsg.c mkmodules.c \
21         modules.c myndbm.c no_diff.c parseinfo.c patch.c prepend_args.c \
22         rcs.c rcscmds.c \
23         recurse.c release.c remove.c repos.c root.c rsh-client.c run.c \
24         scramble.c server.c socket-client.c status.c subr.c tag.c update.c \
25         vers_ts.c version.c watch.c wrapper.c zlib.c \
26         ${.OBJDIR}/main.c ${.OBJDIR}/diff.c
27
28 ${.OBJDIR}/main.c: main.c.patch
29         patch -o ${.TARGET} -i ${.ALLSRC} ${CONTRIBDIR}/src/main.c
30
31 ${.OBJDIR}/diff.c: diff.c.patch
32         patch -o ${.TARGET} -i ${.ALLSRC} ${CONTRIBDIR}/src/diff.c
33
34 ${.OBJDIR}/cvs.1: cvs.1.patch
35         patch -o ${.TARGET} -i ${.ALLSRC} ${CONTRIBDIR}/doc/cvs.1
36
37 CLEANFILES+= ${.OBJDIR}/main.c ${.OBJDIR}/diff.c ${.OBJDIR}/cvs.1
38
39 CFLAGS+= -I${.CURDIR} -I../lib -DHAVE_CONFIG_H \
40          -I${CVSDIR}/src -I${CVSDIR}/lib -I${CVSDIR}/diff -I.
41
42 DPADD+= ${LIBCVS} ${LIBDIFF} ${LIBGNUREGEX} ${LIBMD} ${LIBCRYPT} ${LIBZ}
43 LDADD+= ${LIBCVS} ${LIBDIFF} -lgnuregex -lmd -lcrypt -lz
44
45 #
46 # Regression test support
47 #
48 CLEANDIRS+=cvs-sanity
49 .ifmake regress
50 USERID!=id -u
51 regress:
52         mkdir -p ${.OBJDIR}/cvs-sanity/tmp ${.OBJDIR}/cvs-sanity/work
53 .if ${USERID} == "0"
54         chown -R nobody ${.OBJDIR}/cvs-sanity
55         (TESTDIR=`sh -c 'cd ${.OBJDIR}/cvs-sanity/tmp && /bin/pwd'`;\
56                 export TESTDIR;\
57                 cd ${.OBJDIR}/cvs-sanity/work;\
58                 su -m nobody -c "sh ${CVSDIR}/src/sanity.sh ${.OBJDIR}/cvs")
59 .else
60         (TESTDIR=`sh -c 'cd ${.OBJDIR}/cvs-sanity/tmp && /bin/pwd'`;\
61                 export TESTDIR;\
62                 cd ${.OBJDIR}/cvs-sanity/work;\
63                 sh ${CVSDIR}/src/sanity.sh ${.OBJDIR}/cvs)
64 .endif
65 .endif
66
67 .include <bsd.prog.mk>