pass EMHOME to nested make
This commit is contained in:
parent
d473c8b1df
commit
d41028a664
15 changed files with 21 additions and 21 deletions
|
@ -110,11 +110,11 @@ SRC = $(CSRC) $(LCSRC) $(GCSRC)
|
||||||
./make.allocd <$*.str >$*.h
|
./make.allocd <$*.str >$*.h
|
||||||
|
|
||||||
Main: Cfiles
|
Main: Cfiles
|
||||||
sh -c 'if $(CC) nmclash.c > /dev/null 2>&1 ; then make $(CURRDIR)/main ; else sh Resolve main ; fi'
|
sh -c 'if $(CC) nmclash.c > /dev/null 2>&1 ; then make "EMHOME="$(EMHOME) $(CURRDIR)/main ; else EMHOME=$(EMHOME); export EMHOME; ./Resolve main ; fi'
|
||||||
@rm -f nmclash.o a.out
|
@rm -f nmclash.o a.out
|
||||||
|
|
||||||
Emain: Cfiles
|
Emain: Cfiles
|
||||||
sh -c 'if $(CC) nmclash.c > /dev/null 2>&1 ; then make $(CURRDIR)/emain ; else sh Resolve emain ; fi'
|
sh -c 'if $(CC) nmclash.c > /dev/null 2>&1 ; then make "EMHOME="$(EMHOME) $(CURRDIR)/emain ; else EMHOME=$(EMHOME); export EMHOME; ./Resolve emain ; fi'
|
||||||
@rm -f nmclash.o a.out
|
@rm -f nmclash.o a.out
|
||||||
|
|
||||||
install: Main
|
install: Main
|
||||||
|
@ -137,7 +137,7 @@ clean:
|
||||||
(cd .. ; rm -rf Xsrc)
|
(cd .. ; rm -rf Xsrc)
|
||||||
|
|
||||||
lint: Cfiles
|
lint: Cfiles
|
||||||
sh -c 'if $(CC) nmclash.c > /dev/null 2>&1 ; then make Xlint ; else sh Resolve Xlint ; fi'
|
sh -c 'if $(CC) nmclash.c > /dev/null 2>&1 ; then make "EMHOME="$(EMHOME) Xlint ; else sh Resolve Xlint ; fi'
|
||||||
@rm -f nmclash.o a.out
|
@rm -f nmclash.o a.out
|
||||||
|
|
||||||
longnames: $(SRC) $(HFILES)
|
longnames: $(SRC) $(HFILES)
|
||||||
|
|
|
@ -105,9 +105,9 @@ NEXTFILES = code.str declar.str decspecs.str def.str expr.str field.str \
|
||||||
all: cc
|
all: cc
|
||||||
|
|
||||||
cc:
|
cc:
|
||||||
make "CC=$(CC)" hfiles
|
make "EMHOME="$(EMHOME) "CC=$(CC)" hfiles
|
||||||
make "CC=$(CC)" LLfiles
|
make "EMHOME="$(EMHOME) "CC=$(CC)" LLfiles
|
||||||
make "CC=$(CC)" main
|
make "EMHOME="$(EMHOME) "CC=$(CC)" main
|
||||||
|
|
||||||
cem: cem.c
|
cem: cem.c
|
||||||
$(CC) -O cem.c $(SYSLIB) -o cem
|
$(CC) -O cem.c $(SYSLIB) -o cem
|
||||||
|
|
|
@ -26,7 +26,7 @@ then
|
||||||
:
|
:
|
||||||
else mkdir ../Xsrc
|
else mkdir ../Xsrc
|
||||||
fi
|
fi
|
||||||
make longnames
|
make EMHOME=$EMHOME longnames
|
||||||
: remove code generating routines from the clashes list as they are defines.
|
: remove code generating routines from the clashes list as they are defines.
|
||||||
: code generating routine names start with C_
|
: code generating routine names start with C_
|
||||||
sed '/^C_/d' < longnames > tmp$$
|
sed '/^C_/d' < longnames > tmp$$
|
||||||
|
@ -48,11 +48,11 @@ $i: clashes $PW/$i
|
||||||
cid -Fclashes < $PW/$i > $i
|
cid -Fclashes < $PW/$i > $i
|
||||||
EOF
|
EOF
|
||||||
done
|
done
|
||||||
make `cat $PW/Cfiles`
|
make EMHOME=$EMHOME `cat $PW/Cfiles`
|
||||||
rm -f makefile
|
rm -f makefile
|
||||||
ed - $PW/makefile <<'EOF'
|
ed - $PW/makefile <<'EOF'
|
||||||
/^#EXCLEXCL/,/^#INCLINCL/d
|
/^#EXCLEXCL/,/^#INCLINCL/d
|
||||||
w makefile
|
w makefile
|
||||||
q
|
q
|
||||||
EOF
|
EOF
|
||||||
make CURRDIR=$PW $target
|
make EMHOME=$EMHOME CURRDIR=$PW $target
|
||||||
|
|
|
@ -290,7 +290,7 @@ gen_tpend()
|
||||||
register struct sdef *sd;
|
register struct sdef *sd;
|
||||||
int getout = 0;
|
int getout = 0;
|
||||||
|
|
||||||
while (!getout) {
|
while (!getout && p) {
|
||||||
if (!gen_error) {
|
if (!gen_error) {
|
||||||
tp = *(p->s_tpp);
|
tp = *(p->s_tpp);
|
||||||
switch(tp->tp_fund) {
|
switch(tp->tp_fund) {
|
||||||
|
|
|
@ -22,7 +22,7 @@ OFILES=codegen.o compute.o equiv.o fillem.o gencode.o glosym.o main.o\
|
||||||
move.o nextem.o reg.o regvar.o salloc.o state.o subr.o var.o
|
move.o nextem.o reg.o regvar.o salloc.o state.o subr.o var.o
|
||||||
|
|
||||||
all: tables.c
|
all: tables.c
|
||||||
make cg
|
make "EMHOME="$(EMHOME) cg
|
||||||
|
|
||||||
cg: tables.o $(OFILES)
|
cg: tables.o $(OFILES)
|
||||||
$(CC) $(LDFLAGS) $(OFILES) tables.o $(LIBS) -o cg
|
$(CC) $(LDFLAGS) $(OFILES) tables.o $(LIBS) -o cg
|
||||||
|
|
|
@ -22,7 +22,7 @@ OFILES=codegen.o compute.o equiv.o fillem.o gencode.o glosym.o main.o\
|
||||||
move.o nextem.o reg.o regvar.o salloc.o state.o subr.o var.o
|
move.o nextem.o reg.o regvar.o salloc.o state.o subr.o var.o
|
||||||
|
|
||||||
all: tables.c
|
all: tables.c
|
||||||
make cg
|
make "EMHOME="$(EMHOME) cg
|
||||||
|
|
||||||
cg: tables.o $(OFILES)
|
cg: tables.o $(OFILES)
|
||||||
$(CC) $(LDFLAGS) $(OFILES) tables.o $(LIBS) -o cg
|
$(CC) $(LDFLAGS) $(OFILES) tables.o $(LIBS) -o cg
|
||||||
|
|
|
@ -22,7 +22,7 @@ OFILES=codegen.o compute.o equiv.o fillem.o gencode.o glosym.o main.o\
|
||||||
move.o nextem.o reg.o regvar.o salloc.o state.o subr.o var.o
|
move.o nextem.o reg.o regvar.o salloc.o state.o subr.o var.o
|
||||||
|
|
||||||
all: tables.c
|
all: tables.c
|
||||||
make cg
|
make "EMHOME="$(EMHOME) cg
|
||||||
|
|
||||||
cg: tables.o $(OFILES)
|
cg: tables.o $(OFILES)
|
||||||
$(CC) $(LDFLAGS) $(OFILES) tables.o $(LIBS) -o cg
|
$(CC) $(LDFLAGS) $(OFILES) tables.o $(LIBS) -o cg
|
||||||
|
|
|
@ -22,7 +22,7 @@ OFILES=codegen.o compute.o equiv.o fillem.o gencode.o glosym.o main.o\
|
||||||
move.o nextem.o reg.o regvar.o salloc.o state.o subr.o var.o
|
move.o nextem.o reg.o regvar.o salloc.o state.o subr.o var.o
|
||||||
|
|
||||||
all: tables.c
|
all: tables.c
|
||||||
make cg
|
make "EMHOME="$(EMHOME) cg
|
||||||
|
|
||||||
cg: tables.o $(OFILES)
|
cg: tables.o $(OFILES)
|
||||||
$(CC) $(LDFLAGS) $(OFILES) tables.o $(LIBS) -o cg
|
$(CC) $(LDFLAGS) $(OFILES) tables.o $(LIBS) -o cg
|
||||||
|
|
|
@ -22,7 +22,7 @@ OFILES=codegen.o compute.o equiv.o fillem.o gencode.o glosym.o main.o\
|
||||||
move.o nextem.o reg.o regvar.o salloc.o state.o subr.o var.o
|
move.o nextem.o reg.o regvar.o salloc.o state.o subr.o var.o
|
||||||
|
|
||||||
all: tables.c
|
all: tables.c
|
||||||
make cg
|
make "EMHOME="$(EMHOME) cg
|
||||||
|
|
||||||
cg: tables.o $(OFILES)
|
cg: tables.o $(OFILES)
|
||||||
$(CC) $(LDFLAGS) $(OFILES) tables.o $(LIBS) -o cg
|
$(CC) $(LDFLAGS) $(OFILES) tables.o $(LIBS) -o cg
|
||||||
|
|
|
@ -22,7 +22,7 @@ OFILES=codegen.o compute.o equiv.o fillem.o gencode.o glosym.o main.o\
|
||||||
move.o nextem.o reg.o regvar.o salloc.o state.o subr.o var.o
|
move.o nextem.o reg.o regvar.o salloc.o state.o subr.o var.o
|
||||||
|
|
||||||
all: tables.c
|
all: tables.c
|
||||||
make cg
|
make "EMHOME="$(EMHOME) cg
|
||||||
|
|
||||||
cg: tables.o $(OFILES)
|
cg: tables.o $(OFILES)
|
||||||
$(CC) $(LDFLAGS) $(OFILES) tables.o $(LIBS) -o cg
|
$(CC) $(LDFLAGS) $(OFILES) tables.o $(LIBS) -o cg
|
||||||
|
|
|
@ -22,7 +22,7 @@ OFILES=codegen.o compute.o equiv.o fillem.o gencode.o glosym.o main.o\
|
||||||
move.o nextem.o reg.o regvar.o salloc.o state.o subr.o var.o
|
move.o nextem.o reg.o regvar.o salloc.o state.o subr.o var.o
|
||||||
|
|
||||||
all: tables.c
|
all: tables.c
|
||||||
make cg
|
make "EMHOME="$(EMHOME) cg
|
||||||
|
|
||||||
cg: tables.o $(OFILES)
|
cg: tables.o $(OFILES)
|
||||||
$(CC) $(LDFLAGS) $(OFILES) tables.o $(LIBS) -o cg
|
$(CC) $(LDFLAGS) $(OFILES) tables.o $(LIBS) -o cg
|
||||||
|
|
|
@ -22,7 +22,7 @@ OFILES=codegen.o compute.o equiv.o fillem.o gencode.o glosym.o main.o\
|
||||||
move.o nextem.o reg.o regvar.o salloc.o state.o subr.o var.o
|
move.o nextem.o reg.o regvar.o salloc.o state.o subr.o var.o
|
||||||
|
|
||||||
all: tables.c
|
all: tables.c
|
||||||
make cg
|
make "EMHOME="$(EMHOME) cg
|
||||||
|
|
||||||
cg: tables.o $(OFILES)
|
cg: tables.o $(OFILES)
|
||||||
$(CC) $(LDFLAGS) $(OFILES) tables.o $(LIBS) -o cg
|
$(CC) $(LDFLAGS) $(OFILES) tables.o $(LIBS) -o cg
|
||||||
|
|
|
@ -22,7 +22,7 @@ OFILES=codegen.o compute.o equiv.o fillem.o gencode.o glosym.o main.o\
|
||||||
move.o nextem.o reg.o regvar.o salloc.o state.o subr.o var.o
|
move.o nextem.o reg.o regvar.o salloc.o state.o subr.o var.o
|
||||||
|
|
||||||
all: tables.c
|
all: tables.c
|
||||||
make cg
|
make "EMHOME="$(EMHOME) cg
|
||||||
|
|
||||||
cg: tables.o $(OFILES)
|
cg: tables.o $(OFILES)
|
||||||
$(CC) $(LDFLAGS) $(OFILES) tables.o $(LIBS) -o cg
|
$(CC) $(LDFLAGS) $(OFILES) tables.o $(LIBS) -o cg
|
||||||
|
|
|
@ -22,7 +22,7 @@ OFILES=codegen.o compute.o equiv.o fillem.o gencode.o glosym.o main.o\
|
||||||
move.o nextem.o reg.o regvar.o salloc.o state.o subr.o var.o
|
move.o nextem.o reg.o regvar.o salloc.o state.o subr.o var.o
|
||||||
|
|
||||||
all: tables.c
|
all: tables.c
|
||||||
make cg
|
make "EMHOME="$(EMHOME) cg
|
||||||
|
|
||||||
cg: tables.o $(OFILES)
|
cg: tables.o $(OFILES)
|
||||||
$(CC) $(LDFLAGS) $(OFILES) tables.o $(LIBS) -o cg
|
$(CC) $(LDFLAGS) $(OFILES) tables.o $(LIBS) -o cg
|
||||||
|
|
|
@ -22,7 +22,7 @@ OFILES=codegen.o compute.o equiv.o fillem.o gencode.o glosym.o main.o\
|
||||||
move.o nextem.o reg.o regvar.o salloc.o state.o subr.o var.o
|
move.o nextem.o reg.o regvar.o salloc.o state.o subr.o var.o
|
||||||
|
|
||||||
all: tables.c
|
all: tables.c
|
||||||
make cg
|
make "EMHOME="$(EMHOME) cg
|
||||||
|
|
||||||
cg: tables.o $(OFILES)
|
cg: tables.o $(OFILES)
|
||||||
$(CC) $(LDFLAGS) $(OFILES) tables.o $(LIBS) -o cg
|
$(CC) $(LDFLAGS) $(OFILES) tables.o $(LIBS) -o cg
|
||||||
|
|
Loading…
Add table
Reference in a new issue