Somewhat adapted for ACK

This commit is contained in:
ceriel 1988-08-18 11:00:02 +00:00
parent 775bda9da0
commit 7e6fe16448
8 changed files with 134 additions and 84 deletions

View file

@ -3,5 +3,5 @@ install_ceg
make_as
make_obj
make_own
preproc
update
Makefile

23
util/ceg/util/Makefile Normal file
View file

@ -0,0 +1,23 @@
EM = ../../..
CEGLIB = $(EM)/lib/ceg
UTIL = $(CEGLIB)/util
UtilList = create_ofiles make_as make_obj make_own update
all:
install:
-mkdir $(CEGLIB)
-mkdir $(UTIL)
cp $(UtilList) $(UTIL)
cp install_ceg $(EM)/bin
cmp:
for i in $(UtilList) ; do cmp $$i $(UTIL)/$$i ; done
clean:
pr:
@pr $(UtilList)
opr:
make pr | opr

View file

@ -1,4 +1,4 @@
CEG=/usr/star/kaashoek/em/ceg/util
CEG=../../../lib/ceg/util
case $# in
1) case $1 in

View file

@ -1,5 +1,5 @@
EM = /proj/em/Work
CEG = /usr/star/kaashoek/em/ceg
EM = ../../../..
CEG = $(EM)/lib/ceg
Em = $(CEG)/EM_parser/as_EM_pars
ASMAIN = $(CEG)/assemble/as_assemble
@ -9,6 +9,9 @@ EVAL = $(CEG)/as_parser/eval
DEF = $(CEG)/defaults
CC = cc
CFLAGS = -O
AR = ar
LEXLIB = -ll
IFILES = -I. -I.. -I$(AS) -I$(Em) -I$(EM)/h -I$(EM)/modules/h -I../back
@ -17,55 +20,61 @@ CEG_LIBS = $(EM)/modules/lib/liballoc.a\
$(EM)/modules/lib/libstring.a\
$(EM)/modules/lib/libsystem.a
.c.o : mach.h back/*h ; ( cd ce; $(CC) -c -O $(IFILES) ../$*.c)
.c.o : mach.h back/*h
( cd ce; $(CC) -c $(CFLAGS) $(IFILES) ../$*.c)
all: back ceg ce
make -f ce_makefile ce.a
install : back ceg ce
make ce.a
clean:
rm -rf ce back ceg *.a Out
dclean:
rm -rf ce back ceg Out
ce : ceg/ceg
mkdir ce
( cd ce; ../ceg/ceg -l < $(DEF)/not_impl/not_impl_table)
(cd ce; co $(DEF)/RCS/*.c,v)
(cd ce; co $(DEF)/*/RCS/*.c,v)
(cd ce; chmod +w *.c)
(cd ce; cp $(DEF)/*.c .)
(cd ce; cp $(DEF)/*/*.c .)
ln mach.c ce/mach.c
@make EM_instr
@make -f ce_makefile EM_instr
ceg :
mkdir ceg
(cd ceg; co $(ASMAIN)/RCS/*,v)
(cd ceg;$(CC) -c $(IFILES) *.c; ar r as_lib.a *.o; ranlib as_lib.a)
(cd ceg; cp $(ASMAIN)/* .)
(cd ceg;$(CC) -c $(IFILES) *.c; $(AR) r as_lib.a *.o )
-(cd ceg; ranlib as_lib.a)
back :
mkdir back
(cd back;co $(BACK)/as_back/RCS/*h,v )
(cd back;co $(BACK)/as_back/RCS/Makefile,v )
(cd back;cp $(BACK)/as_back/*h . )
(cd back;cp $(BACK)/as_back/Makefile .)
( cd back; make)
ar r back.a back/*o;
ranlib back.a
$(AR) r back.a back/*o
-ranlib back.a
ce.a : ce/*.o
ar r ce.a ce/*.o
ranlib ce.a
$(AR) r ce.a ce/*.o
-ranlib ce.a
ce/*.o : mach.h back/*.h
(cd ce;$(CC) -c -O $(IFILES) *.c)
(cd ce;$(CC) -c $(CFLAGS) $(IFILES) *.c)
EM_instr : ceg/ceg mach.h back/*.h EM_table
( cd ce; $(CEG)/util/preproc ../EM_table | ../ceg/ceg -l)
( cd ce; $(EM)/lib/cpp -P ../EM_table | ../ceg/ceg -l)
( cd ce; $(CEG)/util/create_ofiles)
@make ce.a
@make -f ce_makefile ce.a
ceg/ceg : $(Em)/em_parser ceg/as_lib.a ceg/eval_as.o
$(CC) -o ceg/ceg $(Em)/*.o ceg/eval_as.o ceg/as_lib.a $(CEG_LIBS) -ll
ceg/ceg : ceg/as_lib.a ceg/eval_as.o # $(Em)/em_parser
(cd ceg; $(CC) -o ceg $(Em)/*.o eval_as.o as_lib.a $(CEG_LIBS) $(LEXLIB) )
ceg/eval_as.o : ceg/eval_as.c as.h $(AS)/as_parser.h $(Em)/arg_type.h
ceg/eval_as.o : ceg/eval_as.c as.h # $(AS)/as_parser.h $(Em)/arg_type.h
(cd ceg;$(CC) -c $(IFILES) eval_as.c)
ceg/eval_as.c : as.c $(EVAL)/eval
$(EVAL)/eval < as.c > ceg/eval_as.c
ceg/eval_as.c : as.c # $(EVAL)/eval
(cd ceg ; $(EVAL)/eval < ../as.c > eval_as.c )

View file

@ -1,14 +1,17 @@
EM = /proj/em/Work
CEG = /usr/star/kaashoek/em/ceg
EM = ../../../..
CEG = $(EM)/lib/ceg
Em = $(CEG)/EM_parser/obj_EM_pars
AS = $(CEG)/as_parser
ASMAIN = $(CEG)/assemble/obj_assemble
EVAL = $(CEG)/as_parser/eval
BACK = $(CEG)/ce_back
AS = $(CEG)/as_parser
EVAL = $(CEG)/as_parser/eval
DEF = $(CEG)/defaults
AR = ar
CC = cc
CFLAGS = -O
LEXLIB = -ll
IFILES = -I. -I.. -I$(AS) -I$(Em) -I$(EM)/h -I$(EM)/modules/h -I../back
@ -17,61 +20,69 @@ CEG_LIBS = $(EM)/modules/lib/liballoc.a\
$(EM)/modules/lib/libstring.a\
$(EM)/modules/lib/libsystem.a
.c.o : mach.h back/*h ; ( cd ce; $(CC) -c -O $(IFILES) ../$*.c)
.c.o : mach.h back/*h
( cd ce; $(CC) -c $(CFLAGS) $(IFILES) ../$*.c)
all: back ceg ce
make -f ce_makefile ce.a
install : back ceg ce
clean:
rm -rf ce back ceg *.a Out
dclean:
rm -rf ce back ceg Out
ce : ceg/ceg
mkdir ce
( cd ce; ../ceg/ceg -l < $(DEF)/not_impl/not_impl_table)
(cd ce;co $(DEF)/RCS/*.c,v )
(cd ce;co $(DEF)/*/RCS/*.c,v)
(cd ce; chmod +w *.c)
(cd ce; cp $(DEF)/*.c .)
(cd ce; cp $(DEF)/*/*.c .)
ln mach.c ce/mach.c
@make EM_instr
@make -f ce_makefile EM_instr
ceg :
mkdir ceg
(cd ceg;co $(ASMAIN)/RCS/*,v)
(cd ceg;$(CC) -c $(IFILES) *.c; ar r as_lib.a *.o; ranlib as_lib.a)
(cd ceg; cp $(ASMAIN)/* .)
(cd ceg;$(CC) -c $(IFILES) *.c; $(AR) r as_lib.a *.o )
-(cd ceg; ranlib as_lib.a)
back :
mkdir back
(cd back; co $(BACK)/obj_back/RCS/*h,v $(BACK)/obj_back/RCS/Makefile,v)
(cd back;cp $(BACK)/obj_back/*h . )
(cd back;cp $(BACK)/obj_back/Makefile .)
( cd back; make)
ar r back.a back/*o;
ranlib back.a
$(AR) r back.a back/*o;
-ranlib back.a
ce.a : ce/*.o
ar r ce.a ce/*.o
ranlib ce.a
$(AR) r ce.a ce/*.o
-ranlib ce.a
ce/*.o : mach.h back/*.h
(cd ce;$(CC) -c -O $(IFILES) *.c)
(cd ce;$(CC) -c $(CFLAGS) $(IFILES) *.c)
EM_instr : ceg/ceg mach.h back/*.h EM_table
( cd ce; $(CEG)/util/preproc ../EM_table| ../ceg/ceg -l)
( cd ce; $(EM)/lib/cpp -P ../EM_table | ../ceg/ceg -l)
( cd ce; $(CEG)/util/create_ofiles)
@make ce.a
@make -f ce_makefile ce.a
ceg/ceg : ceg/as_lib.a ceg/as_instr.o ceg/eval_as.o # $(Em)/em_parser
(cd ceg; $(CC) -o ceg $(Em)/*.o as_instr.o eval_as.o as_lib.a $(CEG_LIBS) $(LEXLIB) )
ceg/eval_as.o : ceg/eval_as.c as.h # $(AS)/as_parser.h $(Em)/arg_type.h
(cd ceg;$(CC) -c $(IFILES) eval_as.c)
ceg/eval_as.c : as.c # $(EVAL)/eval
(cd ceg; $(EVAL)/eval < ../as.c > eval_as.c )
ceg/ceg : $(Em)/em_parser ceg/as_lib.a ceg/as_instr.o ceg/eval_as.o
$(CC) -o ceg/ceg $(Em)/*.o ceg/as_instr.o ceg/eval_as.o ceg/as_lib.a\
$(CEG_LIBS) -ll
ceg/as_instr.o : as.h ceg/*h ceg/as_instr.c
(cd ceg;$(CC) -c $(IFILES) as_instr.c)
ceg/as_instr.c : as_table $(AS)/as_parser
$(CEG)/util/preproc as_table| $(AS)/as_parser > ceg/as_instr.c
ceg/as_instr.c : as_table # $(AS)/as_parser
(cd ceg; $(EM)/lib/cpp -P ../as_table| $(AS)/as_parser > as_instr.c)
ceg/eval_as.o : ceg/eval_as.c as.h $(AS)/as_parser.h $(Em)/arg_type.h
(cd ceg;$(CC) -c $(IFILES) eval_as.c)
ceg/eval_as.c : as.c $(EVAL)/eval
$(EVAL)/eval < as.c > ceg/eval_as.c

View file

@ -1,5 +1,5 @@
EM = /proj/em/Work
CEG = /usr/star/kaashoek/em/ceg
EM = ../../../..
CEG = $(EM)/lib/ceg
Em = $(CEG)/EM_parser
AS = $(CEG)/as_parser
@ -7,6 +7,9 @@ EVAL = $(CEG)/as_parser/eval
DEF = $(CEG)/defaults
CC = cc
CFLAGS = -O
AR = ar
LEXLIB = -ll
IFILES = -I. -I.. -I$(AS) -I$(Em) -I$(EM)/h -I$(EM)/modules/h
@ -15,20 +18,24 @@ CEG_LIBS = $(EM)/modules/lib/liballoc.a\
$(EM)/modules/lib/libstring.a\
$(EM)/modules/lib/libsystem.a
.c.o : mach.h back/*h ; ( cd ce; $(CC) -c -O $(IFILES) ../$*.c)
.c.o : mach.h back/*h ; ( cd ce; $(CC) -c $(CFLAGS) $(IFILES) ../$*.c)
all: back ceg ce
make -f ce_makefile ce.a
install : ceg ce
make ce.a
clean:
rm -rf ce back ceg *.a Out
dclean:
rm -rf ce back ceg Out
ce : ceg/ceg
mkdir ce
( cd ce; ../ceg/ceg -l < $(DEF)/not_impl/not_impl_table)
(cd ce;co $(DEF)/RCS/*.c,v )
(cd ce;co $(DEF)/*/RCS/*.c,v)
(cd ce;chmod +w *.c)
(cd ce;cp $(DEF)/*.c .)
(cd ce;cp $(DEF)/*/*.c .)
ln mach.c ce/mach.c
@make EM_instr
@make -f ce_makefile EM_instr
ceg :
mkdir ceg
@ -36,23 +43,23 @@ ceg :
ce.a : ce/*.o
ar r ce.a ce/*.o
ranlib ce.a
$(AR) r ce.a ce/*.o
-ranlib ce.a
ce/*.o : mach.h
(cd ce;$(CC) -c -O $(IFILES) ../$*.c)
(cd ce;$(CC) -c $(CFLAGS) $(IFILES) ../$*.c)
EM_instr : ceg/ceg EM_table mach.h
( cd ce; $(CEG)/util/preproc ../EM_table| ../ceg/ceg -l)
( cd ce; $(EM)/lib/cpp/p -P ../EM_table| ../ceg/ceg -l)
( cd ce; $(CEG)/util/create_ofiles)
@make ce.a
@make -f ce_makefile ce.a
ceg/ceg : $(Em)/em_parser ceg/assemble.o ceg/as_instr.o ceg/eval_as.o
$(CC) -o ceg/ceg $(Em)/*.o ceg/assemble.o ceg/as_instr.o ceg/eval_as.o\
$(CEG_LIBS) -ll
ceg/ceg : ceg/assemble.o ceg/as_instr.o ceg/eval_as.o # $(Em)/em_parser
(cd ceg ; $(CC) -o ceg $(Em)/*.o assemble.o as_instr.o eval_as.o\
$(CEG_LIBS) $(LEXLIB) )
ceg/assemble.o : as.h ceg/assemble.c ceg/*h
(cd ceg;$(CC) -c $(IFILES) assemble.c)
@ -60,11 +67,11 @@ ceg/assemble.o : as.h ceg/assemble.c ceg/*h
ceg/as_instr.o : as.h ceg/*h ceg/as_instr.c
(cd ceg;$(CC) -c $(IFILES) as_instr.c)
ceg/as_instr.c : as_table $(AS)/as_parser
$(CEG)/util/preproc as_table| $(AS)/as_parser > ceg/as_instr.c
ceg/as_instr.c : as_table # $(AS)/as_parser
(cd ceg ; $(EM)/lib/cpp -P ../as_table| $(AS)/as_parser > as_instr.c )
ceg/eval_as.o : ceg/eval_as.c as.h $(AS)/as_parser.h $(Em)/arg_type.h
ceg/eval_as.o : ceg/eval_as.c as.h # $(AS)/as_parser.h $(Em)/arg_type.h
(cd ceg;$(CC) -c $(IFILES) eval_as.c)
ceg/eval_as.c : as.c $(EVAL)/eval
$(EVAL)/eval < as.c > ceg/eval_as.c
ceg/eval_as.c : as.c # $(EVAL)/eval
( cd ceg ; $(EVAL)/eval < ../as.c > eval_as.c )

View file

@ -1 +1 @@
/lib/cpp $@ | sed "/^#/d"
../../../../lib/cpp $@ | sed "/^#/d"

View file

@ -9,7 +9,7 @@ do
*.o) make -f ce_makefile ce/$i;
ar r ce.a $i;;
*..) ( cd ce; /lib/cpp ../EM_table| sed "/^#/d"| ../ceg/ceg -c $i);
*..) ( cd ce; ../../../../lib/cpp ../EM_table| sed "/^#/d"| ../ceg/ceg -c $i);
F=`basename $i ..`;
U="_dnam"
V="_dlb"
@ -17,7 +17,7 @@ do
echo ar r ce.a ce/$F.o ce/"$F$U.o" ce/"$F$V.o";
ar r ce.a ce/$F.o ce/$F$U.o ce/"$F$U.o";;
*) ( cd ce; /lib/cpp ../EM_table| sed "/^#/d"| ../ceg/ceg -c $i);
*) ( cd ce; ../../../../lib/cpp ../EM_table| sed "/^#/d"| ../ceg/ceg -c $i);
make -f ce_makefile ce/$i.o;
echo ar r ce.a ce/$i.o;
ar r ce.a ce/$i.o;;