home *** CD-ROM | disk | FTP | other *** search
/ Usenet 1994 January / usenetsourcesnewsgroupsinfomagicjanuary1994.iso / sources / unix / volume26 / mnl-rpc++-2.3.1 / part01 / Proj.make < prev    next >
Encoding:
Text File  |  1993-04-24  |  1.4 KB  |  69 lines

  1. # These are included in every Makefile in the project
  2.  
  3. CWDPATH = .
  4. CLEANWILDCARDS = core *~ *.o
  5. VERYCLEANWILDCARDS = core *~ *.o
  6. TEXCLEANWILDCARD = *~ *.aux *.log *.bbl *.blg *.toc *.idx *.ind
  7. TEXVERYCLEANWILDCARD = $(TEXCLEANWILDCARD) *.dvi
  8. ifndef SUBDIRS
  9. SUBDIRS =
  10. endif
  11.  
  12. # Doing all always means doing the subdirs.
  13. # Make subdirs.all a target to allow forced processing
  14. ifneq ("$(SUBDIRS)", "")
  15. ifneq ("$(SUBDIRSALL)", "NO")
  16. all:: subdirs.all
  17. endif
  18.  
  19. subdirs.all::
  20.     @for d in $(SUBDIRS); do \
  21.       (cd $$d; \
  22.        smflags=$(SUBMFLAGS); \
  23.        echo "Making all in $$d with flags: $$smflags ..." ; \
  24.        echo "cd `pwd`"; \
  25.        $(MAKE) $$smflags all); done; \
  26.     echo "cd `pwd`"
  27. else
  28. all::;
  29. endif
  30.  
  31. ifneq ("$(SUBDIRS)", "")
  32. clean:: subdirs.clean
  33.  
  34. subdirs.clean::
  35.     @for d in $(SUBDIRS); do \
  36.       echo "Cleaning all in $$d..." ; \
  37.       (cd $$d; $(MAKE) clean); done
  38. else
  39. clean::;
  40. endif
  41.  
  42. ifneq ("$(SUBDIRS)", "")
  43. veryclean:: subdirs.veryclean
  44.  
  45. subdirs.veryclean::
  46.     @for d in $(SUBDIRS); do \
  47.       echo "Verycleaning all in $$d..." ; \
  48.       (cd $$d; $(MAKE) veryclean); done
  49. else
  50. veryclean::;
  51. endif
  52.  
  53. # dist.list prints a list of files to be included in the distribution
  54. distlist::
  55. ifneq ("$(DISTLIST)", "")
  56.     @for f in $(DISTLIST); do \
  57.       echo $(CWDPATH)/$$f; done
  58. endif
  59. ifneq ("$(SUBDIRS)", "")
  60. ifneq ("$(SUBDIRSDIST)", "NO")
  61.     @for d in $(SUBDIRS); do \
  62.       (cd $$d; $(MAKE) distlist CWDPATH=$(CWDPATH)/$$d); done
  63. endif
  64. endif
  65. ifeq ("$(DISTLIST)$(SUBDIRS)","")
  66.     
  67. endif
  68.  
  69.