home *** CD-ROM | disk | FTP | other *** search
/ Nebula 2 / Nebula Two.iso / SourceCode / MiscKit1.7.1 / MiscKit / Makefiles / submission.make < prev    next >
Encoding:
Text File  |  1995-04-12  |  2.4 KB  |  76 lines

  1. #
  2. # submission.make
  3. # Copyright (C) 1995 Stephan Wacker
  4. # 94-12-25
  5. #
  6. # Targets:
  7. #    bin_submission - precompiled fat binary
  8. #    src_submission - program sources
  9. #    submission - all of the above
  10. #
  11. # Put this line into your Makefile.preamble:
  12. #    LOCALMAKEDIR = /LocalDeveloper/Makefiles
  13. #
  14. # And this goes to the end of Makefile.postamble:
  15. #    -include $(LOCALMAKEDIR)/submission.make
  16. #    -include ./submission.make
  17. #
  18. # Inputs from Makefile.preamble:
  19. #    SUBMIT_NAME - basename of archive, usually  ``$(NAME)''
  20. #    VERSION - version number of this submission, e.g.  ``1.1''
  21. #    SUBMIT_ARCHS - architectures included in the binary submission,
  22. #        e.g.  ``$(TARGET_ARCHS)''  or  ``m68k i386''
  23. #    SUBMIT_FILES - files to be added to the main submission directory,
  24. #        e.g.  ``README.rtf INSTALL.rtfd''
  25. #    SUBMIT_SRC_FILES - like SUBMIT_FILES but only for a source submission
  26. #    SUBMIT_BIN_FILES - like SUBMIT_FILES but only for a binary submission
  27. #    
  28.  
  29. TMPDIR        = /tmp/$(SUBMIT_NAME)
  30.  
  31. ARCHITECTURE    = `echo $(SUBMIT_ARCHS) | \
  32.           sed -e s/m68k/N/ -e s/i386/I/ \
  33.               -e s/hppa/H/ -e s/sparc/S/ -e 's/ //g'`
  34.  
  35. ARCHIVERS    = tar.gz
  36. GZIP        = /usr/bin/gzip -9
  37.  
  38. #
  39. # The submission name is formed according to the conventions of
  40. # the Peanuts archive at the University of Munich:
  41. # ftp://ftp.informatik.uni-muenchen.de/pub/comp/platforms/next/submissions
  42. #
  43. SUBMIT_BIN_ARCHIVE = $(SUBMIT_NAME).$(VERSION).$(ARCHITECTURE).b.$(ARCHIVERS)
  44. SUBMIT_SRC_ARCHIVE = $(SUBMIT_NAME).$(VERSION).s.$(ARCHIVERS)
  45.  
  46.  
  47. #
  48. # Use any of these targets:
  49. #
  50. submission: bin_submission src_submission
  51. bin_submission: $(SUBMIT_BIN_ARCHIVE)
  52. src_submission: $(SUBMIT_SRC_ARCHIVE)
  53.  
  54.  
  55. #
  56. # A binary submission is like a compressed installation.
  57. # Here we compile for all architectures specified in SUBMIT_ARCHS.
  58. #
  59. $(SUBMIT_BIN_ARCHIVE): $(SRCFILES) $(SUBMIT_FILES)
  60.     $(RM) -rf $(TMPDIR)
  61.     $(RM) -rf $(SYMROOT)/$(NAME).app
  62.     $(MAKE) install "INSTALLDIR=$(TMPDIR)" "TARGET_ARCHS=$(SUBMIT_ARCHS)"
  63.     $(CP) -R $(SUBMIT_FILES) $(SUBMIT_BIN_FILES) $(TMPDIR)
  64.     ( (cd $(TMPDIR)/.. ; $(TAR) chf - $(SUBMIT_NAME) ) | $(GZIP) -c > $@ )
  65.     $(RM) -rf $(TMPDIR)
  66.  
  67. #
  68. # A source submission is like a compressed copy.
  69. #
  70. $(SUBMIT_SRC_ARCHIVE): $(SRCFILES) $(SUBMIT_FILES)
  71.     $(RM) -rf $(TMPDIR)
  72.     $(MAKE) copy "DEST=$(TMPDIR)/$(NAME)-$(VERSION)"
  73.     $(CP) -R $(SUBMIT_FILES) $(SUBMIT_SRC_FILES) $(LOCALMAKEDIR) $(TMPDIR)
  74.     ( (cd $(TMPDIR)/.. ; $(TAR) chf - $(SUBMIT_NAME) ) | $(GZIP) -c > $@ )
  75.     $(RM) -rf $(TMPDIR)
  76.