head	11.14;
access;
symbols
	ansi-20040405-merged:11.13
	premerge-autoconf:11.13
	ansi-20040316-freeze:11.13
	postmerge-20040315-windows:11.13
	premerge-20040315-windows:11.13
	windows-20040315-freeze:11.13
	phong-branch:11.13.0.10
	photonmap-branch:11.13.0.8
	rel-6-1-DP:11.13
	windows-branch:11.13.0.6
	rel-6-0-2:11.13
	ansi-branch:11.13.0.4
	rel-6-0-1-branch:11.13.0.2
	hartley-6-0-post:11.13
	hartley-6-0-pre:11.13
	rel-6-0-1:11.13
	rel-6-0:11.13
	rel-5-4:11.11
	offsite-5-3-pre:11.11
	rel-5-3:11.11
	rel-5-2:11.11
	rel-5-1-branch:11.11.0.2
	rel-5-1:11.11
	rel-5-0:11.10
	rel-5-0-beta:11.9
	rel-4-5:11.3
	ctj-4-5-post:11.3
	ctj-4-5-pre:11.3
	rel-4-4:8.13
	rel-4-0:8.5
	rel-3-5:8.2
	rel-3-0:1.4
	AUTOCONF:11.13.0.12;
locks; strict;
comment	@# @;


11.14
date	2004.03.18.18.15.14;	author erikg;	state dead;
branches;
next	11.13;

11.13
date	2001.09.24.23.58.03;	author morrison;	state Exp;
branches
	11.13.12.1;
next	11.12;

11.12
date	2001.08.10.21.19.50;	author morrison;	state Exp;
branches;
next	11.11;

11.11
date	2000.03.16.03.15.26;	author mike;	state Exp;
branches;
next	11.10;

11.10
date	99.06.03.00.15.34;	author mike;	state Exp;
branches;
next	11.9;

11.9
date	99.01.15.03.52.11;	author butler;	state Exp;
branches;
next	11.8;

11.8
date	98.11.16.16.40.16;	author jra;	state Exp;
branches;
next	11.7;

11.7
date	98.08.21.21.47.30;	author mike;	state Exp;
branches;
next	11.6;

11.6
date	98.07.01.23.44.45;	author butler;	state Exp;
branches;
next	11.5;

11.5
date	98.07.01.20.55.01;	author butler;	state Exp;
branches;
next	11.4;

11.4
date	98.07.01.14.33.59;	author butler;	state Exp;
branches;
next	11.3;

11.3
date	97.12.02.04.42.13;	author mike;	state Exp;
branches;
next	11.2;

11.2
date	97.03.20.13.35.45;	author jra;	state Exp;
branches;
next	11.1;

11.1
date	95.01.05.05.59.56;	author mike;	state Rel4_4;
branches;
next	8.14;

8.14
date	95.01.05.05.58.49;	author mike;	state Exp;
branches;
next	8.13;

8.13
date	95.01.04.08.44.50;	author gdurf;	state Exp;
branches;
next	8.12;

8.12
date	95.01.04.08.00.19;	author gdurf;	state Exp;
branches;
next	8.11;

8.11
date	95.01.03.22.30.21;	author mike;	state Exp;
branches;
next	8.10;

8.10
date	94.10.19.09.11.33;	author butler;	state Exp;
branches;
next	8.9;

8.9
date	94.10.18.02.42.11;	author mike;	state Exp;
branches;
next	8.8;

8.8
date	94.09.22.01.46.55;	author mike;	state Exp;
branches;
next	8.7;

8.7
date	94.09.01.05.15.50;	author gdurf;	state Exp;
branches;
next	8.6;

8.6
date	93.11.04.18.45.51;	author mike;	state Exp;
branches;
next	8.5;

8.5
date	91.07.06.02.09.17;	author mike;	state Exp;
branches;
next	8.4;

8.4
date	91.06.21.23.24.33;	author mike;	state Exp;
branches;
next	8.3;

8.3
date	89.07.28.03.45.06;	author mike;	state Exp;
branches;
next	8.2;

8.2
date	88.12.13.02.05.53;	author phil;	state Exp;
branches;
next	8.1;

8.1
date	88.10.06.06.41.29;	author mike;	state Rel3_0;
branches;
next	1.4;

1.4
date	88.09.17.04.00.04;	author mike;	state Exp;
branches;
next	1.3;

1.3
date	88.06.11.01.19.22;	author mike;	state Exp;
branches;
next	1.2;

1.2
date	88.06.11.00.59.26;	author mike;	state Exp;
branches;
next	1.1;

1.1
date	88.06.11.00.55.34;	author mike;	state Original;
branches;
next	;

11.13.12.1
date	2003.11.07.16.41.41;	author erikg;	state dead;
branches;
next	11.13.12.2;

11.13.12.2
date	2004.02.12.19.40.41;	author erikg;	state Exp;
branches;
next	11.13.12.3;

11.13.12.3
date	2004.02.25.15.24.40;	author erikg;	state dead;
branches;
next	;


desc
@cake
@


11.14
log
@merge of AUTOCONF branch in to HEAD
@
text
@#	Makefile for Cake
#
#$Header: /cvs/brlcad/cake/Makefile,v 11.13 2001/09/24 23:58:03 morrison Exp $
SHELL=/bin/sh

# -DATT for SystemV, -DBSD for Berkeley, done by machinetype.sh
#
# For Apollo, may need to add -Tbsd4.3
#
# For gnu compiler use the following two lines:
# CC = gcc
# COPTS = -DCAKEDEBUG=1 `machinetype.sh -d` -fwritable-strings
#
COPTS = -DCAKEDEBUG `machinetype.sh -d`

# for gnu or Linux use "flex" instead of "lex"
LEX = lex -n

# Some systems (such as NetBSD 0.9a), need to add -l to get yylineno.
LEXOPTS=
# LEXOPTS= -l

#LDFLAGS=-k 64k

HDR   =	cake.h conf.h port.h
SRC   =	act.c chase.c entry.c error.c expand.c file.c \
	list.c main.c make.c mem.c pat.c print.c proc.c \
	sym.c sys.c table.c test.c trail.c
OBJ   =	act.o chase.o entry.o error.o expand.o file.o \
	list.o main.o make.o mem.o pat.o print.o proc.o \
	sym.o sys.o table.o test.o trail.o
GEN   =	cake_g.y cake_s.l
GHDR  =	cake_g.h
GSRC  =	cake_g.c cake_s.c
GOBJ  =	cake_g.o cake_s.o

CFLAGS= $(COPTS)

cake:		$(OBJ) $(GOBJ)
		$(CC) $(LDFLAGS) $(CFLAGS) -o cake $(OBJ) $(GOBJ)
#		-/bin/rm fake
#		ln cake fake

all:		cake lint tags

# This needs to be run all as one line, so variables are not lost.
install:	cake
		eval `machinetype.sh -v` ; \
		BRLCAD_BINDIR=$${BASEDIR}/bin; \
		BRLCAD_MANDIR=$${BASEDIR}/man/man1; \
		if test -f $${BRLCAD_BINDIR}/cake; then \
			mv -f $${BRLCAD_BINDIR}/cake $${BRLCAD_BINDIR}/cake.bak; fi; \
		mv cake $${BRLCAD_BINDIR}/cake; \
		chmod 555  $${BRLCAD_BINDIR}/cake; \
		rm -f $${BRLCAD_BINDIR}/fake; \
		ln -s $${BRLCAD_BINDIR}/cake $${BRLCAD_BINDIR}/fake; \
		rm -f $${BRLCAD_MANDIR}/cake.1 $${BRLCAD_MANDIR}/fake.1; \
		cp cake.1 $${BRLCAD_MANDIR}; \
		chmod 444 $${BRLCAD_MANDIR}/cake.1; \
		ln -s $${BRLCAD_MANDIR}/cake.1 $${BRLCAD_MANDIR}/fake.1

$(OBJ):		$(HDR)
$(GOBJ):	$(HDR)

cake_g.c:	cake_g.y
# for bison instead of yacc, use the following line, you may need to remove the "void" declaration for
# yyerror() in "cake_g.y"
#		bison -ydv cake_g.y
		yacc -dv cake_g.y
		mv -f y.tab.h cake_g.h
		mv -f y.tab.c cake_g.c
		mv -f y.output cake_g.t

cake_s.c:	cake_s.l
		$(LEX) $(LEXOPTS) cake_s.l
		sed -e 's/#.*define.*YYLMAX.*/#define YYLMAX 32768/'  <lex.yy.c >cake_s.c
		rm -f lex.yy.c

var:		$(SRC) $(GSRC)
		var -DATT $(COPTS) $(SRC) $(GSRC) > Var

plint:		$(SRC) $(GSRC)
		lint -acpx $(COPTS) $(SRC) $(GSRC) > Lint_errs

ulint:		$(SRC) $(GSRC)
		lint -v $(COPTS) $(SRC) $(GSRC) > Lint_errs

lint:		$(SRC) $(GSRC)
		lint -v $(COPTS) $(SRC) $(GSRC) > Lint_errs
		@@gred yy Lint_errs
		@@gred malloc Lint_errs
		@@gred strcpy Lint_errs
		@@gred strcat Lint_errs
		@@gred printf Lint_errs
		@@gred flsbuf Lint_errs
		@@gred setbuf Lint_errs
		@@gred rcs_id Lint_errs
		@@gred longjmp Lint_errs
		@@gred sbrk Lint_errs

cchk:		$(SRC)
		cchk $(SRC) > Cchk_errs

tags:		$(SRC) $(GSRC)
		ctags $(SRC) $(GSRC)

cxref:		$(SRC)
		cxref -C $(SRC) > Cxref

ssize:
		ssize $(SRC) $(GEN)

asize:
		ssize $(SRC) $(GEN) $(GSRC)

clean:		
		/bin/rm -f cake_g.h cake_g.t \
			Make_errs Lint_errs Cchk_errs core \
			$(OBJ) $(GOBJ) $(GSRC)

gclean:		
		/bin/rm -f $(GSRC) $(GHDR)

clobber: clean
		/bin/rm -f cake fake
@


11.13
log
@removed brlcad_bindir echo to be quiet on setup
@
text
@d3 1
a3 1
#$Header: /c/CVS/brlcad/cake/Makefile,v 11.12 2001/08/10 21:19:50 morrison Exp $
@


11.13.12.1
log
@generated now
@
text
@d3 1
a3 1
#$Header: /c/CVS/brlcad/cake/Makefile,v 11.13 2001/09/24 23:58:03 morrison Exp $
@


11.13.12.2
log
@merge from HEAD
@
text
@@


11.13.12.3
log
@makefiles should be generated
@
text
@d3 1
a3 1
#$Header: /c/CVS/brlcad/cake/Makefile,v 11.13.12.2 2004/02/12 19:40:41 erikg Exp $
@


11.12
log
@no change
@
text
@d3 1
a3 1
#$Header: /c/CVS/brlcad/cake/Makefile,v 11.11 2000/03/16 03:15:26 mike Exp $
a50 1
		echo BRLCAD_BINDIR=$${BRLCAD_BINDIR}; \
@


11.11
log
@
Fixes for Solaris.
YYLMAX is defined as BUFSIZ and used to declare yytext[YYLMAX]
before cake_s.l has the opportunity to override the definition.
We depend on a SED script in the Makefile to correct this
after lex has generated the code and before it goes to the compiler.
@
text
@d3 1
a3 1
#$Header: /c/CVS/brlcad/cake/Makefile,v 11.10 1999/06/03 00:15:34 mike Exp $
a46 2
#		echo BINDIR=$${BINDIR};

d49 13
a61 12
		BINDIR=$${BASEDIR}/bin; \
		MANDIR=$${BASEDIR}/man/man1; \
		if test -f $${BINDIR}/cake; then \
			mv -f $${BINDIR}/cake $${BINDIR}/cake.bak; fi; \
		mv cake $${BINDIR}/cake; \
		chmod 555  $${BINDIR}/cake; \
		rm -f $${BINDIR}/fake; \
		ln -s $${BINDIR}/cake $${BINDIR}/fake; \
		rm -f $${MANDIR}/cake.1 $${MANDIR}/fake.1; \
		cp cake.1 $${MANDIR}; \
		chmod 444 $${MANDIR}/cake.1; \
		ln -s $${MANDIR}/cake.1 $${MANDIR}/fake.1
@


11.10
log
@
Lee wants more careful modes on installed binaries
@
text
@d3 1
a3 1
#$Header: /c/CVS/brlcad/cake/Makefile,v 11.9 1999/01/15 03:52:11 butler Exp $
d78 2
a79 1
		mv -f lex.yy.c cake_s.c
@


11.9
log
@Changed to avoid gratuitous printing (to support silent builds for regression)
@
text
@d3 1
a3 1
#$Header: /c/CVS/brlcad/cake/Makefile,v 11.8 1998/11/16 16:40:16 jra Exp $
d56 1
d61 1
@


11.8
log
@Added a note for bison users.
@
text
@d3 1
a3 1
#$Header: /c/CVS/brlcad/cake/Makefile,v 11.7 1998/08/21 21:47:30 mike Exp $
d17 1
a17 1
LEX = lex
d47 2
a52 1
		echo BINDIR=$${BINDIR}; \
@


11.7
log
@Makefile modified to obtain BINDIR from machinetype.sh
CAKE program itself modified to pass BRLCAD_BASEDIR_STRING through to cpp.
@
text
@d3 1
a3 1
#$Header: /c/CVS/brlcad/cake/Makefile,v 11.6 1998/07/01 23:44:45 butler Exp $
d65 3
@


11.6
log
@Fixing the makefile I broke
@
text
@d3 1
a3 1
#$Header: /c/CVS/brlcad/cake/Makefile,v 11.5 1998/07/01 20:55:01 butler Exp $
a22 3
BINDIR=/usr/brlcad/bin
MANDIR=/usr/brlcad/man/man1

d46 1
d48 12
a59 8
		-if test -f $(BINDIR)/cake; then \
			mv -f $(BINDIR)/cake $(BINDIR)/cake.bak; fi
		mv cake $(BINDIR)/cake
		rm -f $(BINDIR)/fake
		ln -s $(BINDIR)/cake $(BINDIR)/fake
		rm -f $(MANDIR)/cake.1 $(MANDIR)/fake.1
		cp cake.1 $(MANDIR)
		ln -s $(MANDIR)/cake.1 $(MANDIR)/fake.1
@


11.5
log
@Re-asserted default path
@
text
@d3 1
a3 1
#$Header: /c/CVS/brlcad/cake/Makefile,v 11.4 1998/07/01 14:33:59 butler Exp $
d23 2
a24 2
BINDIR=/usr/brlcad/bin/bin
MANDIR=/usr/brlcad/bin/man/man1
@


11.4
log
@Removed jpeg from distribution per Mike's direction
@
text
@d3 1
a3 1
#$Header: /c/CVS/brlcad/cake/Makefile,v 11.3 1997/12/02 04:42:13 mike Exp $
d23 2
a24 2
BINDIR=/vld/butler/brlcad/.m4i64/bin/bin
MANDIR=/vld/butler/brlcad/.m4i64/bin/man/man1
@


11.3
log
@Use symlink for "fake" command.
@
text
@d3 1
a3 1
#$Header: /m/cad/cake/RCS/Makefile,v 11.2 1997/03/20 13:35:45 jra Exp mike $
d23 2
a24 2
BINDIR=/usr/brlcad/bin
MANDIR=/usr/brlcad/man/man1
@


11.2
log
@Added notes for using gcc and flex.
@
text
@d3 1
a3 1
#$Header: /m/cad/cake/RCS/Makefile,v 11.1 1995/01/05 05:59:56 mike Rel4_4 jra $
d54 1
a54 1
		ln $(BINDIR)/cake $(BINDIR)/fake
d57 1
a57 1
		ln $(MANDIR)/cake.1 $(MANDIR)/fake.1
@


11.1
log
@Release_4_4
@
text
@d3 1
a3 1
#$Header: /m/cad/cake/RCS/Makefile,v 8.14 95/01/05 05:58:49 mike Exp $
d9 5
d16 3
d69 1
a69 1
		lex $(LEXOPTS) cake_s.l
@


8.14
log
@Need to remove fake.1
@
text
@d3 1
a3 1
#$Header: /m/cad/cake/RCS/Makefile,v 8.13 95/01/04 08:44:50 gdurf Exp Locker: mike $
@


8.13
log
@reworded comment
@
text
@d3 1
a3 1
#$Header: /m/cad/cake/RCS/Makefile,v 8.12 95/01/04 08:00:19 gdurf Exp Locker: gdurf $
a8 1
# For SunOS 5 (Solaris 2), need to add -Xc
d47 1
a47 1
		rm -f $(MANDIR)/cake.1
@


8.12
log
@Corrected notice to NetBSD users
@
text
@d3 1
a3 1
#$Header: /m/cad/cake/RCS/Makefile,v 8.11 95/01/03 22:30:21 mike Exp Locker: gdurf $
d12 1
a12 1
# For NetBSD 0.9a (but not 1.0), need to add -l to get yylineno.
@


8.11
log
@Added code for manual page.
@
text
@d3 1
a3 1
#$Header: /m/cad/cake/RCS/Makefile,v 8.10 94/10/19 09:11:33 butler Exp Locker: mike $
d12 1
a12 1
# For Netbsd, need to add -l to get yylineno
@


8.10
log
@Removed -f option from ln in install target.  -f option is not ubiquitous.
@
text
@d3 1
a3 1
#$Header: /m/cad/cake/RCS/Makefile,v 8.9 1994/10/18 02:42:11 mike Exp butler $
d17 1
d48 3
@


8.9
log
@Changed to run "machinetype.sh -d" to get necessary symbols defined.
@
text
@d3 1
a3 1
#$Header: /m/cad/cake/RCS/Makefile,v 8.8 94/09/22 01:46:55 mike Exp Locker: mike $
d46 1
a46 1
		ln -f $(BINDIR)/cake $(BINDIR)/fake
@


8.8
log
@Eliminated -DCAREFUL, so that it won't keep tossing junk in /tmp.
@
text
@d3 1
a3 1
#$Header: /m/cad/cake/RCS/Makefile,v 8.7 94/09/01 05:15:50 gdurf Exp Locker: mike $
d10 1
a10 1
COPTS = -DCAKEDEBUG -DYYDEBUG -D`machinetype.sh -a`
@


8.7
log
@Added LEXOPTS variable
@
text
@d3 1
a3 1
#$Header: /m/cad/cake/RCS/Makefile,v 8.6 1993/11/04 18:45:51 mike Exp gdurf $
d10 1
a10 1
COPTS = -DCAKEDEBUG -DYYDEBUG -DCAREFUL -D`machinetype.sh -a`
@


8.6
log
@SunOS 5
@
text
@d3 1
a3 1
#$Header: /m/cad/cake/RCS/Makefile,v 8.5 91/07/06 02:09:17 mike Exp Locker: mike $
d12 4
d58 1
a58 1
		lex cake_s.l
@


8.5
log
@forced link to fake
@
text
@d3 1
a3 1
#$Header: /m/cad/cake/RCS/Makefile,v 8.4 91/06/21 23:24:33 mike Exp $
d9 1
@


8.4
log
@Added "fake" entry.
@
text
@d3 1
a3 1
#$Header: /m/cad/cake/RCS/Makefile,v 8.3 89/07/28 03:45:06 mike Exp $
d40 2
a41 1
		ln $(BINDIR)/cake $(BINDIR)/fake
@


8.3
log
@Added Apollo note
@
text
@d3 1
a3 1
#$Header: Makefile,v 8.2 88/12/13 02:05:53 mike Locked $
d40 1
@


8.2
log
@missing -f on test, reported by Ken Van Camp
@
text
@d3 1
a3 1
#$Header: Makefile,v 8.1 88/10/06 06:41:29 phil Locked $
d8 1
@


8.1
log
@Release 3.0
@
text
@d3 1
a3 1
#$Header: Makefile,v 1.4 88/09/17 04:00:04 mike Locked $
d36 1
a36 1
		-if test $(BINDIR)/cake; then \
@


1.4
log
@Added SHELL
@
text
@d3 1
a3 1
#$Header: Makefile,v 1.3 88/06/11 01:19:22 mike Locked $
d36 2
a37 1
		-mv -f $(BINDIR)/cake $(BINDIR)/cake.bak
@


1.3
log
@added -f to MV commands
@
text
@d3 2
a4 1
#$Header: Makefile,v 1.2 88/06/11 00:59:26 mike Locked $
d10 1
a10 1
DEST  = /usr/brlcad/bin
d36 2
a37 2
		-mv -f $(DEST)/cake $(DEST)/cake.bak
		mv cake $(DEST)/cake
@


1.2
log
@BRL mods
@
text
@d3 1
a3 1
#$Header: /mip/zs/src/sys/cake/RCS/Makefile,v 1.15 87/10/05 20:13:19 zs Exp $
d43 3
a45 3
		mv y.tab.h cake_g.h
		mv y.tab.c cake_g.c
		mv y.output cake_g.t
d49 1
a49 1
		mv lex.yy.c cake_s.c
@


1.1
log
@Original CAKE version from net.sources
@
text
@d3 1
a3 1
#	$Header: /mip/zs/src/sys/cake/RCS/Makefile,v 1.15 87/10/05 20:13:19 zs Exp $
d5 8
d24 1
a24 2
DEST  = /mip/usr/bin
COPTS = -DCAKEDEBUG -DYYDEBUG -DCAREFUL
a25 1
LDFLAGS=-k 64k
d29 2
a30 2
		-/bin/rm fake
		ln cake fake
d32 1
a32 1
all:		cake lint tags defs
d35 2
a36 3
		mv $(DEST)/cake /tmp/Oldcake
		cp cake $(DEST)/cake
		strip $(DEST)/cake
d43 3
a45 3
		@@mv y.tab.h cake_g.h
		@@mv y.tab.c cake_g.c
		@@mv y.output cake_g.t
d49 1
a49 1
		@@mv lex.yy.c cake_s.c
a78 3
defs:		$(SRC) $(GSRC)
		defn $(SRC) $(GSRC) > defs

d89 1
a89 1
		/bin/rm	cake_g.h cake_g.t \
d94 4
a97 1
		/bin/rm $(GSRC) $(GHDR)
@
