home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #20 / NN_1992_20.iso / spool / comp / software / 3442 < prev    next >
Encoding:
Text File  |  1992-09-14  |  4.0 KB  |  102 lines

  1. Newsgroups: comp.software-eng
  2. Path: sparky!uunet!sun-barr!ames!riacs!george.arc.nasa.gov!lehman
  3. From: lehman@george.arc.nasa.gov (John Lehman -- GDP)
  4. Subject: RCS and imake. Was: Re: Summary: SCCS vs RCS
  5. Message-ID: <1992Sep14.220343.25845@riacs.edu>
  6. Summary: Here's one way to integrate make and RCS.
  7. Keywords: RCS, imake, make, configuration, build
  8. Sender: news@riacs.edu
  9. Organization: RIACS, NASA Ames Research Center
  10. References: <!xvn8wk.dbander@netcom.com>
  11. Distribution: comp.software-eng
  12. Date: Mon, 14 Sep 92 22:03:43 GMT
  13. Lines: 87
  14.  
  15. Hi, I just read Andersen's summary; thanks for the
  16. information!  I got some valuable help a few months
  17. ago from this newsgroup, integrating RCS and make.
  18. I also had briefly weighed the merits of SCCS and RCS.
  19. I chose RCS because it's free and comes as source, and
  20. because almost everyone I've read or talked with prefers 
  21. RCS over SCCS.
  22.  
  23. Incidentally UC Santa Cruz Ext. in Santa Clara, Calif. 
  24. has or had a course in which RCS and SCCS are both 
  25. presented (along with make, yacc, lex, and a few other 
  26. topics).
  27.  
  28. One of my correspondents (B.E.) suggested that I look 
  29. into "imake", and I'm glad I did.
  30.  
  31. I have revised some Makefiles so that they will access
  32. files from RCS.  I use ordinary make, not gnu make
  33. (gnu make knows about RCS so that would have been easy;
  34. but it is not feasible to get all sites to run gnu make)
  35. -- and I have not used any special features of make -- 
  36. any solution I come up with has to run on a variety of 
  37. Unix machines (and should be easy for my team-mates to 
  38. understand).
  39.  
  40. To begin with, consider the RCS files; for a file
  41. called "filename", the corresponding RCS file (in which
  42. are stored versions of "filename") is "filename,v".
  43. You have a choice of either storing all the RCS files
  44. prog1.c,v prog2.c,v ...  in the same directory as
  45. prog1.c   prog2.c   ...  or you can put the RCS files
  46. into a subdirectory called RCS.
  47.  
  48. If the RCS files are in the "same" directory, the
  49. directory is cluttered.
  50.  
  51. If the RCS files are in a subdirectory called RCS,
  52. then you (or rather, "I") have a problem when writing
  53. the Makefiles:  if you define suffix rules (for "make")
  54. (as suggested in _Managing_Projects_With_Make_ by
  55. Andrew Oram and Steve Talbott, Dec. '91, page 28)
  56. telling how to make "filename" out of "filename,v",
  57. these suffix rules only work if the "filename,v" is
  58. in the current directory!  (Remember, this is assuming
  59. that gnu make is not used, and that only the most
  60. generic features of make are used (no "%" pattern 
  61. matching is allowed)).
  62.  
  63. So I elected to write out all the rules (in the Makefiles)
  64. explicitly (no suffix rules are used).  This makes really
  65. long Makefiles; but that's where imake comes in.  Using
  66. imake, you can write an Imakefile, which is shorter than
  67. the Makefile, and use Imakefile to generate the Makefile.
  68.  
  69. Aside from Imakefiles being shorter than Makefiles,
  70. there are a couple of other advantages to imake, stemming
  71. from the fact that imake uses macros (it understands
  72. multi-line cpp macros):
  73.  
  74. (1) you can define a variable (I call it USE_RCS)
  75.     to tell imake whether to generate a Makefile
  76.     which uses RCS or (alternatively) a Makefile
  77.     which doesn't use RCS.  This can be handy if
  78.     some of your customers don't use RCS (but you
  79.     want to maintain only the one set of Imakefiles) --
  80.     or for whatever reason you might want to do some
  81.     work without RCS getting in the way.
  82.  
  83. (2) you can define the "RCS subdirectory" to be
  84.     anywhere you wish -- such that all team members
  85.     can automatically build the product in their 
  86.     home directories using one copy of RCS files 
  87.     which are in a central location (no "links"
  88.     necessary).
  89.    
  90. I'm still working on this but so far it works fine.
  91. I expect to post more on this sometime after Sept. 30
  92. (end of fiscal year -- a busy time).  Imake is unnecessarily
  93. hard to learn (not documented well enough) but that's one 
  94. of the things I would post about (perhaps in alt.uu.future,
  95. where they accept lesson material -- uu is usenet university)
  96. -- if there's interest.
  97.  
  98. This work of mine deals with a master makefile with about
  99. 10 sub-makefiles.
  100.  
  101. lehman@ames.arc.nasa.gov
  102.