- Move csup away from contrib/ and into usr.bin/. Software is no longer

contributed, and main development is happening in the FreeBSD repo.

Suggested by:	joel
This commit is contained in:
Ulf Lilleengen 2010-03-02 07:26:07 +00:00
parent f32419adfb
commit 4b6675a6f8
65 changed files with 13 additions and 145 deletions

View File

@ -1,64 +0,0 @@
# A simple gmake Makefile, to be used on Linux and Darwin. It shouldn't
# be used elsewhere because it assumes that the target system doesn't
# support BSD extended file flags.
#
# $FreeBSD$
#
PREFIX?=/usr/local
OWNER?= 0
GROUP?= 0
UNAME= $(shell uname -s)
SRCS= attrstack.c config.c detailer.c diff.c fattr.c fixups.c fnmatch.c \
globtree.c idcache.c keyword.c lex.rcs.c lister.c main.c misc.c mux.c \
pathcomp.c parse.c proto.c rcsfile.c rcsparse.c rsyncfile.c status.c \
stream.c threads.c token.c updater.c
OBJS= $(SRCS:.c=.o)
WARNS= -Wall -W -Wno-unused-parameter -Wmissing-prototypes -Wpointer-arith \
-Wreturn-type -Wcast-qual -Wwrite-strings -Wswitch -Wshadow \
-Wcast-align -Wunused-parameter -Wchar-subscripts -Winline \
-Wnested-externs -Wredundant-decls -Wno-format-y2k
CFLAGS+= -g -O -pipe -DNDEBUG -I$(PREFIX)/include
ifeq ($(UNAME), Linux)
CFLAGS+= -D_XOPEN_SOURCE -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64
endif
ifeq ($(UNAME), Darwin)
CFLAGS+= -DHAVE_FFLAGS
endif
CFLAGS+= $(WARNS)
LDFLAGS= -L$(PREFIX)/lib -lcrypto -lz -lpthread
.PHONY: all clean install
all: csup csup.1.gz
csup: $(OBJS)
$(CC) $(CFLAGS) -o $@ $^ $(LDFLAGS)
config.c: parse.h
token.c: token.l
parse.c: parse.y
parse.h: parse.c
clean:
rm -f csup $(OBJS) parse.c parse.h token.c csup.1.gz
%.o: %.c
$(CC) $(CFLAGS) -c -o $@ $<
%.c: %.y
$(YACC) -d -o $@ $<
csup.1.gz: csup.1
gzip -cn $< > $@
install: csup csup.1.gz
install -s -o $(OWNER) -g $(GROUP) csup $(PREFIX)/bin
install -s -o $(OWNER) -g $(GROUP) csup.1.gz $(PREFIX)/share/man/man1

View File

@ -1,48 +0,0 @@
# $FreeBSD$
PREFIX?= /usr/local
BINDIR?= ${PREFIX}/bin
MANDIR?= ${PREFIX}/man/man
UNAME!= /usr/bin/uname -s
PROG= csup
SRCS= attrstack.c auth.c config.c detailer.c diff.c fattr.c fixups.c fnmatch.c \
globtree.c idcache.c keyword.c lister.c main.c misc.c mux.c parse.y \
pathcomp.c proto.c status.c stream.c threads.c token.l updater.c \
rcsfile.c rcsparse.c lex.rcs.c rsyncfile.c
CFLAGS+= -I. -I${.CURDIR} -g -pthread -DHAVE_FFLAGS -DNDEBUG
WARNS?= 1
# A bit of tweaking is needed to get this Makefile working
# with the bsd.prog.mk of all the *BSD OSes...
.if (${UNAME} == "NetBSD")
LDFLAGS+= -pthread
YHEADER= yes
.elif (${UNAME} == "OpenBSD")
# I bet there's a better way to do this with the OpenBSD mk
# framework but well, this works and I got bored.
LDFLAGS+= -pthread
YFLAGS= -d
CLEANFILES+= parse.c parse.h y.tab.h
config.c: parse.h
token.l: parse.h
y.tab.h: parse.c
parse.h: y.tab.h
cp ${.ALLSRC} ${.TARGET}
.endif
DPADD= ${LIBCRYPTO} ${LIBZ}
LDADD= -lcrypto -lz
SCRIPTS= cpasswd.sh
MAN= csup.1 cpasswd.1
.include <bsd.prog.mk>

View File

@ -1,42 +1,22 @@
# $FreeBSD$
.PATH: ${.CURDIR}/../../contrib/csup
PREFIX?= /usr/local
BINDIR?= ${PREFIX}/bin
MANDIR?= ${PREFIX}/man/man
UNAME!= /usr/bin/uname -s
PROG= csup
SRCS= attrstack.c \
auth.c \
config.c \
detailer.c \
diff.c \
fattr.c \
fixups.c \
fnmatch.c \
globtree.c \
idcache.c \
keyword.c \
lex.rcs.c \
lister.c \
main.c \
misc.c \
mux.c \
parse.y \
pathcomp.c \
proto.c \
rcsfile.c \
rcsparse.c \
rsyncfile.c \
status.c \
stream.c \
threads.c \
token.l \
updater.c
SRCS= attrstack.c auth.c config.c detailer.c diff.c fattr.c fixups.c fnmatch.c \
globtree.c idcache.c keyword.c lister.c main.c misc.c mux.c parse.y \
pathcomp.c proto.c status.c stream.c threads.c token.l updater.c \
rcsfile.c rcsparse.c lex.rcs.c rsyncfile.c
CFLAGS+= -I. -I${.CURDIR}/../../contrib/csup
CFLAGS+= -DHAVE_FFLAGS -DNDEBUG
WARNS?= 1
CFLAGS+= -I. -I${.CURDIR} -g -pthread -DHAVE_FFLAGS -DNDEBUG
WARNS?= 1
DPADD= ${LIBCRYPTO} ${LIBZ} ${LIBPTHREAD}
LDADD= -lcrypto -lz -lpthread
DPADD= ${LIBCRYPTO} ${LIBZ}
LDADD= -lcrypto -lz
SCRIPTS= cpasswd.sh
MAN= csup.1 cpasswd.1