head	1.9;
access;
symbols;
locks; strict;
comment	@# @;


1.9
date	2012.02.27.18.15.49;	author mux;	state dead;
branches;
next	1.8;

1.8
date	2006.03.13.22.16.27;	author mux;	state Exp;
branches;
next	1.7;

1.7
date	2006.03.06.00.36.23;	author mux;	state Exp;
branches;
next	1.6;

1.6
date	2006.03.01.03.11.50;	author mux;	state Exp;
branches;
next	1.5;

1.5
date	2006.02.27.19.40.01;	author mux;	state Exp;
branches;
next	1.4;

1.4
date	2006.02.24.05.14.55;	author mux;	state Exp;
branches;
next	1.3;

1.3
date	2006.02.24.05.05.32;	author mux;	state Exp;
branches;
next	1.2;

1.2
date	2006.02.18.12.02.03;	author mux;	state Exp;
branches;
next	1.1;

1.1
date	2006.02.18.11.56.27;	author mux;	state Exp;
branches;
next	;


desc
@@


1.9
log
@Retire the old csup code from the projcvs repository. A mercurial repository
with *full* development history (including the changes that happened since it
was imported in the tree) has been put online at the following URL, for those
who need it:

	https://bitbucket.org/mumux/csup

I'm not doing this because I intend to start working on csup again, but if
other people are willing to do so (csupd, anyone? :-P), this should be useful.
That being said, I'm committed to continue maintaining it in proper shape, so
don't hesitate to contact me when there are bugs that need fixing.
@
text
@# 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: projects/csup/GNUmakefile,v 1.8 2006-03-13 22:16:27 mux Exp $
#

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 lister.c main.c misc.c mux.c pathcomp.c \
	parse.c proto.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
@


1.8
log
@Fix the syntax, I'm apparently not supposed to enclose strings with ".
@
text
@d5 1
a5 1
# $FreeBSD: projects/csup/GNUmakefile,v 1.7 2006/03/06 00:36:23 mux Exp $
@


1.7
log
@- Connect idcache.c to the build.
- Initialize the cache in fattr_init() and release its resources in
  fattr_fini(), since the fattr API is the only consumer.
- Use the new thread-safe getuserbyid(), getgroupbyid(), getuidbyname(),
  getgidbyname() functions when encoding/decoding user names or group
  names in fattr_encode() and fattr_decode().
- Remove the associated task from the TODO list.
@
text
@d5 1
a5 1
# $FreeBSD: projects/csup/GNUmakefile,v 1.6 2006/03/01 03:11:50 mux Exp $
d25 1
a25 1
ifeq ($(UNAME), "Linux")
d28 1
a28 1
ifeq ($(UNAME), "Darwin")
@


1.6
log
@- Import the fnmatch.c and fnmatch.h from CVSup.  It implements some flags
  that aren't POSIX and that are necessary for the -i patterns to work.
- Now that we have it, use the FNM_PREFIX_DIRS flag as appropriate.

Now the -i option really works!
@
text
@d5 1
a5 1
# $FreeBSD: projects/csup/GNUmakefile,v 1.5 2006/02/27 19:40:01 mux Exp $
d15 2
a16 2
	globtree.c keyword.c lister.c main.c misc.c mux.c pathcomp.c parse.c \
	proto.c status.c stream.c threads.c token.c updater.c
@


1.5
log
@Add support for refuse files:
- Connect globtree.c to the build.
- Add a small pattlist API that is used to store pattern lists, such as
  the ones in the refuse files.
- Create the pattern lists in config_init().  While I'm here, move the
  creation of the keyword object to this same place.  Finally, parse the
  refuse files in config_init() after the pattern lists are created.
- Correctly set up the default ignored attributes.
- Implement coll_statussuffix(), that returns the suffix for a status
  file; we use the same suffix for per-release and per-tag refuse files.
- Rewrite coll_statuspath() in terms of coll_statussuffix().  Also, make
  coll_statuspath() and coll_statussuffix() work more similary to what
  is done in CVSup.  For instance, we we not handling the case where
  "collDir" is an absolute pathname correctly.
- List our accept and refuse patterns to the server in proto_xchgcoll().
  For now, we don't support the -i option so we don't have accepts but
  that will come soon now.
- Build two globtrees in proto_xchgcoll(), one to filter filenames and
  another one to filter directories.
- Use these filters in the lister thread to only list files that don't
  match the patterns in the refuse files.
@
text
@d5 1
a5 1
# $FreeBSD: projects/csup/GNUmakefile,v 1.4 2006/02/24 05:14:55 mux Exp $
d14 3
a16 3
SRCS=	attrstack.c config.c detailer.c diff.c fattr.c fixups.c globtree.c \
	keyword.c lister.c main.c misc.c mux.c pathcomp.c parse.c proto.c \
	status.c stream.c threads.c token.c updater.c
@


1.4
log
@Define $(OWNER) and $(GROUP) variables to be passed to install(1), in
the hope that will allow the Darwinport maintainer to remove his patch.
@
text
@d5 1
a5 1
# $FreeBSD: projects/csup/GNUmakefile,v 1.3 2006/02/24 05:05:32 mux Exp $
d14 3
a16 3
SRCS=	attrstack.c config.c detailer.c diff.c fattr.c fixups.c keyword.c \
	lister.c main.c misc.c mux.c pathcomp.c parse.c proto.c status.c \
	stream.c threads.c token.c updater.c
@


1.3
log
@Add $(PREFIX)/include to the includes directories, and $(PREFIX)/lib to
the library search path.
@
text
@d5 1
a5 1
# $FreeBSD: projects/csup/GNUmakefile,v 1.2 2006/02/18 12:02:03 mux Exp $
d9 2
d62 2
a63 2
	install -s -o 0 -g 0 csup $(PREFIX)/bin
	install -s -o 0 -g 0 csup.1.gz $(PREFIX)/share/man/man1
@


1.2
log
@Better comment.
@
text
@d5 1
a5 1
# $FreeBSD: projects/csup/GNUmakefile,v 1.1 2006/02/18 11:56:27 mux Exp $
d22 1
a22 1
CFLAGS+= -g -O -pipe -DNDEBUG
d30 1
a30 1
LDFLAGS= -lcrypto -lz -lpthread
@


1.1
log
@Rename the gmake Makefile to GNUmakefile so that it will get picked up
automagically by gmake if make is gmake (no repo-copy was done, but there
was not much history to save).  Update the instructions for building and
installing in README to reflect this change.
@
text
@d1 5
a5 2
# A simple gmake Makefile, to be used on Linux and Darwin.
# $FreeBSD$
@

