Changed copyright notice, made installation less dependent on ACK
This commit is contained in:
@@ -1,7 +1,5 @@
|
||||
/*
|
||||
* (c) copyright 1987 by the Vrije Universiteit, Amsterdam, The Netherlands.
|
||||
* See the copyright notice in the ACK home directory, in the file "Copyright".
|
||||
*
|
||||
/* Copyright (c) 1991 by the Vrije Universiteit, Amsterdam, the Netherlands.
|
||||
* All rights reserved.
|
||||
*/
|
||||
|
||||
/*
|
||||
|
||||
@@ -1,25 +1,27 @@
|
||||
# $Header$
|
||||
EMHOME=../../..
|
||||
PROF=
|
||||
LLOPT= # -vvv -x
|
||||
INCLUDES = -I$(EMHOME)/h
|
||||
CFLAGS=-O -DNDEBUG $(INCLUDES) $(PROF)
|
||||
INCLUDES =
|
||||
DEFINES = -DNDEBUG
|
||||
CFLAGS=-O $(DEFINES) $(INCLUDES) $(PROF)
|
||||
LDFLAGS=
|
||||
OBJECTS = main.o gencode.o compute.o LLgen.o tokens.o check.o reach.o global.o name.o sets.o Lpars.o alloc.o machdep.o cclass.o
|
||||
CFILES = main.c gencode.c compute.c LLgen.c tokens.c check.c reach.c global.c name.c sets.c Lpars.c alloc.c machdep.c cclass.c
|
||||
FILES =types.h tunable.h extern.h io.h sets.h tokens.g LLgen.g main.c name.c compute.c sets.c gencode.c global.c check.c reach.c alloc.c machdep.c Makefile cclass.c
|
||||
FILES =types.h extern.h io.h sets.h tokens.g LLgen.g main.c name.c compute.c sets.c gencode.c global.c check.c reach.c alloc.c machdep.c Makefile cclass.c
|
||||
GFILES = tokens.g LLgen.g
|
||||
LINT = lint -b -DNDEBUG -DNORCSID
|
||||
LINT = lint -b $(DEFINES) -DNORCSID
|
||||
|
||||
LIBDIRSTR = \"$(LIBDIR)\"
|
||||
|
||||
all: parser
|
||||
@make LLgen "LDFLAGS=$(LDFLAGS)" "CC=$(CC)" "CFLAGS=$(CFLAGS)" "PROF=$(PROF)"
|
||||
@make LLgen "LDFLAGS=$(LDFLAGS)" "CC=$(CC)" "CFLAGS=$(CFLAGS)" "PROF=$(PROF)" "LIBDIR=$(LIBDIR)"
|
||||
|
||||
parser: $(GFILES)
|
||||
LLgen $(LLOPT) $(GFILES)
|
||||
@touch parser
|
||||
|
||||
first: firstparser
|
||||
@make LLgen "LDFLAGS=$(LDFLAGS)" "CC=$(CC)" "CFLAGS=$(CFLAGS)" "PROF=$(PROF)"
|
||||
@make LLgen "LDFLAGS=$(LDFLAGS)" "CC=$(CC)" "CFLAGS=$(CFLAGS)" "PROF=$(PROF)" "LIBDIR=$(LIBDIR)"
|
||||
|
||||
firstparser:
|
||||
cp LLgen.c.dist LLgen.c
|
||||
@@ -29,7 +31,7 @@ firstparser:
|
||||
@touch parser
|
||||
|
||||
LLgen: $(OBJECTS)
|
||||
$(CC) $(PROF) $(LDFLAGS) $(OBJECTS) $(EMHOME)/modules/lib/libsystem.a -o LLgen
|
||||
$(CC) $(PROF) $(LDFLAGS) $(OBJECTS) -o LLgen
|
||||
@size LLgen
|
||||
|
||||
pr :
|
||||
@@ -49,6 +51,9 @@ distr:
|
||||
cp LLgen.c LLgen.c.dist
|
||||
cp tokens.c tokens.c.dist
|
||||
|
||||
machdep.o: machdep.c
|
||||
$(CC) -c $(CFLAGS) -DLIBDIR=$(LIBDIRSTR) machdep.c
|
||||
|
||||
# The next lines are generated automatically
|
||||
# AUTOAUTOAUTOAUTOAUTOAUTOAUTOAUTOAUTOAUTOAUTOAUTOAUTOAUTO
|
||||
LLgen.o: Lpars.h
|
||||
@@ -76,7 +81,6 @@ gencode.o: types.h
|
||||
global.o: extern.h
|
||||
global.o: io.h
|
||||
global.o: types.h
|
||||
machdep.o: $(EMHOME)/h/em_path.h
|
||||
machdep.o: types.h
|
||||
main.o: extern.h
|
||||
main.o: io.h
|
||||
|
||||
@@ -1,7 +1,5 @@
|
||||
/*
|
||||
* (c) copyright 1987 by the Vrije Universiteit, Amsterdam, The Netherlands.
|
||||
* See the copyright notice in the ACK home directory, in the file "Copyright".
|
||||
*
|
||||
/* Copyright (c) 1991 by the Vrije Universiteit, Amsterdam, the Netherlands.
|
||||
* All rights reserved.
|
||||
*/
|
||||
|
||||
/*
|
||||
@@ -19,7 +17,6 @@
|
||||
|
||||
# include "types.h"
|
||||
# include "extern.h"
|
||||
# include <local.h>
|
||||
|
||||
# ifndef NORCSID
|
||||
static string rcsid = "$Header$";
|
||||
@@ -68,19 +65,20 @@ new_mem(p) register p_info p; {
|
||||
|
||||
if (p->i_max >= p->i_top) { /* No more free elements */
|
||||
sz = p->i_size;
|
||||
#if BIGMACHINE
|
||||
/*
|
||||
Do not worry about size. Just double it.
|
||||
*/
|
||||
p->i_size += p->i_size;
|
||||
if (! p->i_size)
|
||||
if (sizeof(char *) > 2) {
|
||||
/*
|
||||
Do not worry about size. Just double it.
|
||||
*/
|
||||
p->i_size += p->i_size;
|
||||
if (! p->i_size)
|
||||
p->i_size += p->i_incr * p->i_esize;
|
||||
}
|
||||
else {
|
||||
/*
|
||||
Worry about size, so only increment in chunks of i_incr.
|
||||
*/
|
||||
p->i_size += p->i_incr * p->i_esize;
|
||||
#else
|
||||
/*
|
||||
Worry about size, so only increment in chunks of i_incr.
|
||||
*/
|
||||
p->i_size += p->i_incr * p->i_esize;
|
||||
#endif
|
||||
}
|
||||
p->i_ptr = !p->i_ptr ?
|
||||
alloc(p->i_size) :
|
||||
ralloc(p->i_ptr, p->i_size);
|
||||
|
||||
@@ -1,8 +1,9 @@
|
||||
/* $Header$ */
|
||||
/*
|
||||
* (c) copyright 1987 by the Vrije Universiteit, Amsterdam, The Netherlands.
|
||||
* See the copyright notice in the ACK home directory, in the file "Copyright".
|
||||
/* Copyright (c) 1991 by the Vrije Universiteit, Amsterdam, the Netherlands.
|
||||
* All rights reserved.
|
||||
*/
|
||||
|
||||
/* $Header$ */
|
||||
|
||||
#include "cclass.h"
|
||||
char c_class[] = {
|
||||
0, /* 00 */
|
||||
|
||||
@@ -1,8 +1,9 @@
|
||||
/* $Header$ */
|
||||
/*
|
||||
* (c) copyright 1987 by the Vrije Universiteit, Amsterdam, The Netherlands.
|
||||
* See the copyright notice in the ACK home directory, in the file "Copyright".
|
||||
/* Copyright (c) 1991 by the Vrije Universiteit, Amsterdam, the Netherlands.
|
||||
* All rights reserved.
|
||||
*/
|
||||
|
||||
/* $Header$ */
|
||||
|
||||
extern char c_class[];
|
||||
|
||||
#define ISLET 1
|
||||
|
||||
@@ -1,7 +1,5 @@
|
||||
/*
|
||||
* (c) copyright 1987 by the Vrije Universiteit, Amsterdam, The Netherlands.
|
||||
* See the copyright notice in the ACK home directory, in the file "Copyright".
|
||||
*
|
||||
/* Copyright (c) 1991 by the Vrije Universiteit, Amsterdam, the Netherlands.
|
||||
* All rights reserved.
|
||||
*/
|
||||
|
||||
/*
|
||||
|
||||
@@ -1,7 +1,5 @@
|
||||
/*
|
||||
* (c) copyright 1987 by the Vrije Universiteit, Amsterdam, The Netherlands.
|
||||
* See the copyright notice in the ACK home directory, in the file "Copyright".
|
||||
*
|
||||
/* Copyright (c) 1991 by the Vrije Universiteit, Amsterdam, the Netherlands.
|
||||
* All rights reserved.
|
||||
*/
|
||||
|
||||
/*
|
||||
|
||||
@@ -1,7 +1,5 @@
|
||||
/*
|
||||
* (c) copyright 1987 by the Vrije Universiteit, Amsterdam, The Netherlands.
|
||||
* See the copyright notice in the ACK home directory, in the file "Copyright".
|
||||
*
|
||||
/* Copyright (c) 1991 by the Vrije Universiteit, Amsterdam, the Netherlands.
|
||||
* All rights reserved.
|
||||
*/
|
||||
|
||||
/*
|
||||
@@ -13,12 +11,12 @@
|
||||
*/
|
||||
|
||||
/*
|
||||
* extern.h $Header$
|
||||
* $Header$
|
||||
* Miscellanious constants and
|
||||
* some variables that are visible in more than one file
|
||||
*/
|
||||
|
||||
# define LTEXTSZ 51 /* Size of longest token */
|
||||
# define LTEXTSZ 256 /* Size of longest token */
|
||||
|
||||
/*
|
||||
* options for the identifier search routine
|
||||
|
||||
@@ -1,7 +1,5 @@
|
||||
/*
|
||||
* (c) copyright 1987 by the Vrije Universiteit, Amsterdam, The Netherlands.
|
||||
* See the copyright notice in the ACK home directory, in the file "Copyright".
|
||||
*
|
||||
/* Copyright (c) 1991 by the Vrije Universiteit, Amsterdam, the Netherlands.
|
||||
* All rights reserved.
|
||||
*/
|
||||
|
||||
/*
|
||||
|
||||
@@ -1,7 +1,5 @@
|
||||
/*
|
||||
* (c) copyright 1987 by the Vrije Universiteit, Amsterdam, The Netherlands.
|
||||
* See the copyright notice in the ACK home directory, in the file "Copyright".
|
||||
*
|
||||
/* Copyright (c) 1991 by the Vrije Universiteit, Amsterdam, the Netherlands.
|
||||
* All rights reserved.
|
||||
*/
|
||||
|
||||
/*
|
||||
|
||||
@@ -1,7 +1,5 @@
|
||||
/*
|
||||
* (c) copyright 1987 by the Vrije Universiteit, Amsterdam, The Netherlands.
|
||||
* See the copyright notice in the ACK home directory, in the file "Copyright".
|
||||
*
|
||||
/* Copyright (c) 1991 by the Vrije Universiteit, Amsterdam, the Netherlands.
|
||||
* All rights reserved.
|
||||
*/
|
||||
|
||||
/*
|
||||
@@ -13,7 +11,7 @@
|
||||
*/
|
||||
|
||||
/*
|
||||
* io.h $Header$
|
||||
* $Header$
|
||||
* Some important file names and variables
|
||||
*/
|
||||
|
||||
|
||||
@@ -1,7 +1,5 @@
|
||||
/*
|
||||
* (c) copyright 1987 by the Vrije Universiteit, Amsterdam, The Netherlands.
|
||||
* See the copyright notice in the ACK home directory, in the file "Copyright".
|
||||
*
|
||||
/* Copyright (c) 1991 by the Vrije Universiteit, Amsterdam, the Netherlands.
|
||||
* All rights reserved.
|
||||
*/
|
||||
|
||||
/*
|
||||
@@ -17,8 +15,6 @@
|
||||
* Machine dependant things
|
||||
*/
|
||||
|
||||
|
||||
# include <em_path.h>
|
||||
# include "types.h"
|
||||
|
||||
# ifndef NORCSID
|
||||
@@ -33,17 +29,27 @@ extern string libpath();
|
||||
UNLINK(x) string x; {
|
||||
/* Must remove the file "x" */
|
||||
|
||||
#ifdef USE_SYS
|
||||
sys_remove(x); /* systemcall to remove file */
|
||||
#else
|
||||
unlink(x);
|
||||
#endif
|
||||
}
|
||||
|
||||
RENAME(x,y) string x,y; {
|
||||
/* Must move the file "x" to the file "y" */
|
||||
|
||||
#ifdef USE_SYS
|
||||
if(! sys_rename(x,y)) fatal(1,"Cannot rename to %s",y);
|
||||
#else
|
||||
unlink(y);
|
||||
if (link(x,y) != 0) fatal(1,"Cannot rename to %s",y);
|
||||
unlink(x);
|
||||
#endif
|
||||
}
|
||||
|
||||
/* to make it easier to patch ... */
|
||||
char emdir[64] = EM_DIR;
|
||||
char libdir[256] = LIBDIR;
|
||||
|
||||
string
|
||||
libpath(s) string s; {
|
||||
@@ -53,12 +59,11 @@ libpath(s) string s; {
|
||||
register length;
|
||||
p_mem alloc();
|
||||
string strcpy(), strcat();
|
||||
static string subdir = "/lib/LLgen/";
|
||||
|
||||
length = strlen(emdir) + strlen(subdir) + strlen(s) + 1;
|
||||
length = strlen(libdir) + strlen(s) + 2;
|
||||
p = (string) alloc((unsigned) length);
|
||||
strcpy(p,emdir);
|
||||
strcat(p,subdir);
|
||||
strcpy(p,libdir);
|
||||
strcat(p,"/");
|
||||
strcat(p,s);
|
||||
return p;
|
||||
}
|
||||
|
||||
@@ -1,7 +1,5 @@
|
||||
/*
|
||||
* (c) copyright 1987 by the Vrije Universiteit, Amsterdam, The Netherlands.
|
||||
* See the copyright notice in the ACK home directory, in the file "Copyright".
|
||||
*
|
||||
/* Copyright (c) 1991 by the Vrije Universiteit, Amsterdam, the Netherlands.
|
||||
* All rights reserved.
|
||||
*/
|
||||
|
||||
/*
|
||||
|
||||
@@ -1,7 +1,5 @@
|
||||
/*
|
||||
* (c) copyright 1987 by the Vrije Universiteit, Amsterdam, The Netherlands.
|
||||
* See the copyright notice in the ACK home directory, in the file "Copyright".
|
||||
*
|
||||
/* Copyright (c) 1991 by the Vrije Universiteit, Amsterdam, the Netherlands.
|
||||
* All rights reserved.
|
||||
*/
|
||||
|
||||
/*
|
||||
|
||||
@@ -3,8 +3,11 @@
|
||||
#PARAMS do not remove this line
|
||||
|
||||
SRC_DIR = $(SRC_HOME)/util/LLgen/src
|
||||
INCLUDES = -I$(TARGET_HOME)/h -I$(TARGET_HOME)/config -I$(SRC_DIR) -I.
|
||||
CFLAGS = -DNDEBUG $(INCLUDES) $(COPTIONS)
|
||||
LIBDIR = $(TARGET_HOME)/lib/LLgen
|
||||
INCLUDES = -I$(SRC_DIR) -I.
|
||||
LIBDIRSTR = \"$(LIBDIR)\"
|
||||
DEFINES = -DNDEBUG
|
||||
CFLAGS = $(DEFINES) $(INCLUDES) $(COPTIONS)
|
||||
LDFLAGS=$(LDOPTIONS)
|
||||
|
||||
LLOPT= # -vvv -x
|
||||
@@ -18,19 +21,19 @@ CSRC = $(SRC_DIR)/main.c $(SRC_DIR)/gencode.c $(SRC_DIR)/compute.c \
|
||||
$(SRC_DIR)/machdep.c $(SRC_DIR)/cclass.c
|
||||
CFILES = LLgen.c tokens.c Lpars.c $(CSRC)
|
||||
GFILES = $(SRC_DIR)/tokens.g $(SRC_DIR)/LLgen.g
|
||||
FILES = $(SRC_DIR)/types.h $(SRC_DIR)/tunable.h $(SRC_DIR)/extern.h \
|
||||
FILES = $(SRC_DIR)/types.h $(SRC_DIR)/extern.h \
|
||||
$(SRC_DIR)/io.h $(SRC_DIR)/sets.h \
|
||||
$(GFILES) $(CSRC) $(SRC_DIR)/proto.make
|
||||
|
||||
all: parser
|
||||
@make LLgen "LDFLAGS=$(LDFLAGS)" "CC=$(CC)" "CFLAGS=$(CFLAGS)"
|
||||
@make LLgen "LDFLAGS=$(LDFLAGS)" "CC=$(CC)" "CFLAGS=$(CFLAGS)" "LIBDIR=$(LIBDIR)"
|
||||
|
||||
parser: $(GFILES)
|
||||
LLgen $(LLOPT) $(GFILES)
|
||||
@touch parser
|
||||
|
||||
first: firstparser
|
||||
@make LLgen "LDFLAGS=$(LDFLAGS)" "CC=$(CC)" "CFLAGS=$(CFLAGS)"
|
||||
@make LLgen "LDFLAGS=$(LDFLAGS)" "CC=$(CC)" "CFLAGS=$(CFLAGS)" "LIBDIR=$(LIBDIR)"
|
||||
|
||||
firstparser:
|
||||
cp $(SRC_DIR)/LLgen.c.dist LLgen.c
|
||||
@@ -109,7 +112,7 @@ global.$(SUF): $(SRC_DIR)/io.h
|
||||
global.$(SUF): $(SRC_DIR)/types.h
|
||||
|
||||
machdep.$(SUF): $(SRC_DIR)/machdep.c
|
||||
$(CC) -c $(CFLAGS) $(SRC_DIR)/machdep.c
|
||||
$(CC) -c $(CFLAGS) -DUSE_SYS -DLIBDIR=$(LIBDIRSTR) $(SRC_DIR)/machdep.c
|
||||
machdep.$(SUF): $(SRC_DIR)/types.h
|
||||
|
||||
main.$(SUF): $(SRC_DIR)/main.c
|
||||
|
||||
@@ -1,7 +1,5 @@
|
||||
/*
|
||||
* (c) copyright 1987 by the Vrije Universiteit, Amsterdam, The Netherlands.
|
||||
* See the copyright notice in the ACK home directory, in the file "Copyright".
|
||||
*
|
||||
/* Copyright (c) 1991 by the Vrije Universiteit, Amsterdam, the Netherlands.
|
||||
* All rights reserved.
|
||||
*/
|
||||
|
||||
/*
|
||||
|
||||
@@ -1,7 +1,5 @@
|
||||
/*
|
||||
* (c) copyright 1987 by the Vrije Universiteit, Amsterdam, The Netherlands.
|
||||
* See the copyright notice in the ACK home directory, in the file "Copyright".
|
||||
*
|
||||
/* Copyright (c) 1991 by the Vrije Universiteit, Amsterdam, the Netherlands.
|
||||
* All rights reserved.
|
||||
*/
|
||||
|
||||
/*
|
||||
|
||||
@@ -1,7 +1,5 @@
|
||||
/*
|
||||
* (c) copyright 1987 by the Vrije Universiteit, Amsterdam, The Netherlands.
|
||||
* See the copyright notice in the ACK home directory, in the file "Copyright".
|
||||
*
|
||||
/* Copyright (c) 1991 by the Vrije Universiteit, Amsterdam, the Netherlands.
|
||||
* All rights reserved.
|
||||
*/
|
||||
|
||||
/*
|
||||
@@ -13,7 +11,7 @@
|
||||
*/
|
||||
|
||||
/*
|
||||
* sets.h $Header$
|
||||
* $Header$
|
||||
* Some macros that deal with bitsets and their size
|
||||
*/
|
||||
|
||||
|
||||
@@ -1,7 +1,5 @@
|
||||
/*
|
||||
* (c) copyright 1987 by the Vrije Universiteit, Amsterdam, The Netherlands.
|
||||
* See the copyright notice in the ACK home directory, in the file "Copyright".
|
||||
*
|
||||
/* Copyright (c) 1991 by the Vrije Universiteit, Amsterdam, the Netherlands.
|
||||
* All rights reserved.
|
||||
*/
|
||||
|
||||
/*
|
||||
|
||||
@@ -1,7 +1,5 @@
|
||||
/*
|
||||
* (c) copyright 1987 by the Vrije Universiteit, Amsterdam, The Netherlands.
|
||||
* See the copyright notice in the ACK home directory, in the file "Copyright".
|
||||
*
|
||||
/* Copyright (c) 1991 by the Vrije Universiteit, Amsterdam, the Netherlands.
|
||||
* All rights reserved.
|
||||
*/
|
||||
|
||||
/*
|
||||
@@ -13,7 +11,7 @@
|
||||
*/
|
||||
|
||||
/*
|
||||
* types.h $Header$
|
||||
* $Header$
|
||||
* Type and structure definitions
|
||||
*/
|
||||
|
||||
|
||||
Reference in New Issue
Block a user