head	1.5;
access;
symbols
	REL7_0_PATCHES:1.3.0.2
	REL7_0:1.3;
locks; strict;
comment	@# @;


1.5
date	2000.06.19.13.53.08;	author momjian;	state dead;
branches;
next	1.4;

1.4
date	2000.06.15.18.54.35;	author momjian;	state Exp;
branches;
next	1.3;

1.3
date	2000.04.07.13.28.37;	author thomas;	state Exp;
branches;
next	1.2;

1.2
date	2000.04.03.20.56.40;	author momjian;	state Exp;
branches;
next	1.1;

1.1
date	99.11.29.22.34.36;	author momjian;	state Exp;
branches;
next	;


desc
@@


1.5
log
@Update to /contrib from Karel.
@
text
@@


1.4
log
@/contrib patch from Karel.
@
text
@@


1.3
log
@Clean up directory to compile and run on my Linux box at least.
Note that there is some trouble with inconsistant input/output formats.
@
text
@a0 45
# Makefile
# For the bit/varbit data types

SRCDIR= ../../src

include $(SRCDIR)/Makefile.global

INSTALLDIR= $(LIBDIR)
MODDIR= $(INSTALLDIR)/modules
SQLDIR= $(INSTALLDIR)/sql

TARGETS= varbit.sql varbit$(DLSUFFIX)
# vartest
SOURCE= varbit.c varbit_glue.c
OBJ= $(SOURCE:.c=.o)
CFLAGS += -g

all:	$(TARGETS)

vartest: varbit.o vartest.o
	$(CC) -o $@@ varbit.o vartest.o

install:
	$(MAKE) all
	-test -d $(INSTALLDIR) || $(INSTALL) -d $(INSTALLDIR)
	-test -d ${MODDIR} || $(INSTALL) -d ${MODDIR}
	-test -d ${SQLDIR} || $(INSTALL) -d ${SQLDIR}
	$(INSTALL) -m 555 $(filter %$(DLSUFFIX), $(TARGETS)) $(MODDIR)
	$(INSTALL) -m 664 $(filter %.sql, $(TARGETS)) $(SQLDIR)

%.sql: %.source
	if [ -z "$$USER" ]; then USER=$$LOGNAME; fi; \
	if [ -z "$$USER" ]; then USER=`whoami`; fi; \
	if [ -z "$$USER" ]; then echo 'Cannot deduce $$USER.'; exit 1; fi; \
	rm -f $@@; \
	C=`pwd`; \
	O=${MODDIR}; \
	sed -e "s:_CWD_:$$C:g" \
	    -e "s:_OBJWD_:$$O:g" \
	    -e "s:_DLSUFFIX_:$(DLSUFFIX):g" \
	    -e "s/_USER_/$$USER/g" < $< > $@@

clean: 
	rm -f $(TARGETS) varbit.o

@


1.2
log
@Hi,

    here is an updated version of the bit type with a bugfix and all the necessa
ry
SQL functions defined. This should replace what is currently in contrib. I'd
appreciate any comments on what is there.

Kind regards,

Adriaan
@
text
@d1 2
a2 4
ifndef PGDIR
PGDIR= ../..
PGDIR=/data/build/postgresql-7.0beta3
endif
d4 1
a4 1
SRCDIR= $(PGDIR)/src
d8 4
a19 3
varbit$(DLSUFFIX):	$(OBJ)
	$(CC) $(CFLAGS) -shared -o varbit$(DLSUFFIX) $(SOURCE) $(CLIBS)

d25 5
a29 2
	cp -p varbit$(DLSUFFIX) $(LIBDIR)/contrib
	chmod 555 $(LIBDIR)/contrib/varbit$(DLSUFFIX)
a31 1
	echo $(SRCDIR)
d37 1
a37 3
	O=$C; \
	if [ -d ${LIBDIR}/contrib ]; then O=${LIBDIR}/contrib; else \
	echo "contrib directory does not exist."; fi; \
@


1.1
log
@Attached are the C-routines that implement a BIT and BIT VARYING type.

Adriaan Joubert
@
text
@d1 4
a4 1
CFLAGS = -g
d6 1
a6 2
varbit: vartest.o varbit.o
	$(CC) $(CFLAGS) -o $@@ $^
d8 38
a45 2
varbit.o: varbit.c varbit.h
vartest.o: vartest.c varbit.h
a46 2
clean:
	rm -f *.o varbit
@

