diff --git a/mach/sun3/libcc.ansi/homefromsubdir b/mach/sun3/libcc.ansi/homefromsubdir new file mode 100755 index 000000000..64b05cadb --- /dev/null +++ b/mach/sun3/libcc.ansi/homefromsubdir @@ -0,0 +1,15 @@ +if [ $# = 1 ] +then + NAM=`expr $1 : '^\(\..*\)'` + if [ X$NAM = X ] + then + NAM=$1 + else + NAM=../$NAM + fi + echo $NAM + exit 0 +else + echo PATH_ERROR + exit 1 +fi diff --git a/mach/sun3/libcc.ansi/makefile b/mach/sun3/libcc.ansi/makefile index 4e0bbdecf..786a9cc4e 100644 --- a/mach/sun3/libcc.ansi/makefile +++ b/mach/sun3/libcc.ansi/makefile @@ -7,14 +7,21 @@ SUB= LIBC="PREF=$(PREF)" "SUB=$(SUB)" OLIB=tail_$(PREF)$(SUB) -install: cplibc +install: cplibc cphead -cplibc: +cplibc: libsrc + make -f $(MAKEFILE) $(LIBC) $(MACHDEF) "EMHOME=`homefromsubdir $(EMHOME)`" tailcp + +cphead: head_$(PREF).e + make -f $(MAKEFILE) $(LIBC) $(MACHDEF) "EMHOME=$(EMHOME)" headcp + +head_$(PREF).e: libsrc + +libsrc: $(EMHOME)/lang/cem/libcc.ansi/libsrc . cp $(EMHOME)/lang/cem/libcc.ansi/libsrc . tar xf libsrc - make -f $(MAKEFILE) $(LIBC) $(MACHDEF) "EMHOME=../$(EMHOME)" tailcp -cmp: cmplibc +cmp: cmplibc cmphead -../../compare $(OLIB) cmplibc: @@ -22,8 +29,11 @@ cmplibc: tar xf libsrc make -f $(MAKEFILE) $(LIBC) $(MACHDEF) "EMHOME=../$(EMHOME)" tail +cmphead: head_$(PREF).e + make -f $(MAKEFILE) $(LIBC) $(MACHDEF) "EMHOME=../$(EMHOME)" head + clean: - rm -rf `cat LIST` LIST OLIST MakeArch Makefile make.proto libsrc + rm -rf `cat LIST` LIST OLIST MakeArch Makefile make.proto libsrc head_$(PREF).[e$(SUF)] opr: make pr | opr