Switch to CVS 1.12.11
[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.9 2005/03/13 11:43:07 corecode 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 ls.c mkmodules.c \
21         modules.c ms-buffer.c myndbm.c no_diff.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 stack.c status.c subr.c tag.c \
25         update.c vers_ts.c version.c watch.c wrapper.c zlib.c \
26         main.c diff.c ${PATCHES}
27
28 PATCHES=main.c.patch diff.c.patch root.c.patch rcs.c.patch \
29         parseinfo.c.patch cvs.h.patch
30 CONTRIBDIR=     ${CVSDIR}/src
31
32 ${.OBJDIR}/cvs.1: cvs.1.patch
33         patch -o ${.TARGET} -i ${.ALLSRC} ${CVSDIR}/doc/cvs.1
34
35 CLEANFILES+= ${.OBJDIR}/cvs.1
36
37 CFLAGS+= -I${.CURDIR} -I../lib -DHAVE_CONFIG_H \
38          -I${CVSDIR}/src -I${CVSDIR}/lib -I${CVSDIR}/diff -I.
39
40 DPADD+= ${LIBCVS} ${LIBDIFF} ${LIBGNUREGEX} ${LIBMD} ${LIBCRYPT} ${LIBZ}
41 LDADD+= ${LIBCVS} ${LIBDIFF} -lgnuregex -lmd -lcrypt -lz
42
43 #
44 # Regression test support
45 #
46 CLEANDIRS+=cvs-sanity
47 .ifmake regress
48 USERID!=id -u
49 regress:
50         mkdir -p ${.OBJDIR}/cvs-sanity/tmp ${.OBJDIR}/cvs-sanity/work
51 .if ${USERID} == "0"
52         chown -R nobody ${.OBJDIR}/cvs-sanity
53         (TESTDIR=`sh -c 'cd ${.OBJDIR}/cvs-sanity/tmp && /bin/pwd'`;\
54                 export TESTDIR;\
55                 cd ${.OBJDIR}/cvs-sanity/work;\
56                 su -m nobody -c "sh ${CVSDIR}/src/sanity.sh ${.OBJDIR}/cvs")
57 .else
58         (TESTDIR=`sh -c 'cd ${.OBJDIR}/cvs-sanity/tmp && /bin/pwd'`;\
59                 export TESTDIR;\
60                 cd ${.OBJDIR}/cvs-sanity/work;\
61                 sh ${CVSDIR}/src/sanity.sh ${.OBJDIR}/cvs)
62 .endif
63 .endif
64
65 .include <bsd.prog.mk>