home *** CD-ROM | disk | FTP | other *** search
/ OpenStep (Enterprise) / OpenStepENTCD.toast / OEDEV / DEV.Z / sgs.make < prev    next >
Encoding:
Text File  |  1996-09-08  |  1017 b   |  30 lines

  1. #
  2. # sgs.make 
  3. #
  4. # Hacks to support use of NeXT's internal SGS tool set
  5.  
  6.  
  7. #
  8. # Generation of a version string if project lives in correct directory name
  9. # To activate this feature, put your source code in a directory named 
  10. # $(NAME).%d[.%d][.%d] and set OTHER_GENERATED_OFILES = $(VERS_OFILE).
  11. #
  12. VERS_FILE = $(NAME)_vers.c
  13. VERS_OFILE = $(NAME)_vers.o
  14.  
  15. $(VERS_OFILE): $(VERS_FILE)
  16.  
  17. $(VERS_FILE): 
  18.     @(cname=`$(ECHO) $(NAME) | $(SED) 's/[^0-9A-Za-z]/_/g'`; \
  19.         $(VERS_STRING) -c $(NAME) \
  20.                 | $(SED) s/SGS_VERS/$${cname}_VERS_STRING/ \
  21.                 | $(SED) s/VERS_NUM/$${cname}_VERS_NUM/ > $(SFILE_DIR)/$(VERS_FILE))
  22.  
  23.  
  24. # This doesn't work, because it's substituted in line and not evaluated
  25. # properly.
  26.  
  27. # CURRENT_PROJECT_VERSION = `$(VERS_STRING) -n $(BURY_STDERR) | $(AWK) -F. '$$3 ~ /^[0-9][0-9]*$$/ && $$2 ~ /^[0-9][0-9]*$$/ && $$1 ~ /^[0-9][0-9]*$$/ {print $$1"."$$2"."$$3; next} $$2 ~ /^[0-9][0-9]*$$/ && $$1 ~ /^[0-9][0-9]*$$/ {print $$1"."$$2; next} $$1 ~ /^[0-9][0-9]*$$/ {print $$1}'`
  28.  
  29.  
  30.