home *** CD-ROM | disk | FTP | other *** search
/ Education Sampler 1992 [NeXTSTEP] / Education_1992_Sampler.iso / NeXT / GnuSource / cc-61.0.1 / Makefile
Makefile  |  1992-08-04  |  1KB  |  49 lines

  1. SUBDIRS = as bison cc include 
  2.  
  3. clean all install:
  4.     @if [ $(SRCROOT) ];                        \
  5.     then                                \
  6.         CWD=`pwd`; cd $(DSTROOT); DSTROOT=`pwd`; cd $$CWD;        \
  7.         for i in `echo $(SUBDIRS)`;                    \
  8.           do                            \
  9.             echo =========== make $@ for $$i =============;    \
  10.             (cd $$i; $(MAKE) RC_CFLAGS="$(RC_CFLAGS)"        \
  11.             DSTROOT=$$DSTROOT                \
  12.             SRCROOT=$(SRCROOT)/$$i                \
  13.             OBJROOT=$(OBJROOT)/$$i                \
  14.             SYMROOT=$(SYMROOT)/$$i $@);            \
  15.           done                            \
  16.     else                                \
  17.         CWD=`pwd`; cd $(DSTROOT); DSTROOT=`pwd`; cd $$CWD;        \
  18.         for i in `echo $(SUBDIRS)`;                    \
  19.           do                            \
  20.             echo =========== make $@ for $$i =============;    \
  21.             (cd $$i; $(MAKE) RC_CFLAGS="$(RC_CFLAGS)"        \
  22.             DSTROOT=$$DSTROOT $@);                \
  23.           done                            \
  24.     fi
  25.  
  26. installsrc installGNUsrc: SRCROOT
  27.     mkdirs $(SRCROOT)
  28.     cp Makefile $(SRCROOT)
  29.     for i in `echo $(SUBDIRS)`; \
  30.       do \
  31.         echo =========== make $@ for $$i =============;    \
  32.         (cd $$i; $(MAKE) SRCROOT=$$SRCROOT/$$i $@); \
  33.       done
  34.  
  35. installhdrs: $(DSTROOT)
  36.     cd include; $(MAKE) DSTROOT=$(DSTROOT) install
  37.  
  38. $(DSTROOT):
  39.     mkdirs $@
  40.  
  41. SRCROOT:
  42.     @if [ -n "${$@}" ]; \
  43.     then \
  44.         exit 0; \
  45.     else \
  46.         echo Must define $@; \
  47.         exit 1; \
  48.     fi
  49.