home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #27 / NN_1992_27.iso / spool / comp / unix / question / 13912 < prev    next >
Encoding:
Text File  |  1992-11-24  |  1.7 KB  |  42 lines

  1. Newsgroups: comp.unix.questions
  2. Path: sparky!uunet!stanford.edu!leland.Stanford.EDU!dkeisen
  3. From: dkeisen@leland.Stanford.EDU (Dave Eisen)
  4. Subject: Re: make, makefile where s.'s are in another directory, clean solution ?
  5. Message-ID: <1992Nov24.043303.8790@leland.Stanford.EDU>
  6. Keywords: make
  7. Sender: news@leland.Stanford.EDU (Mr News)
  8. Organization: Sequoia Peripherals, Inc.
  9. References: <1992Nov20.140313.32637@europa.asd.contel.com> <1992Nov23.092525.1396@ericsson.se>
  10. Date: Tue, 24 Nov 92 04:33:03 GMT
  11. Lines: 29
  12.  
  13. >In article <1992Nov20.140313.32637@europa.asd.contel.com>, mclemore@rebec.asd.contel.com (Ken McLemore) writes:
  14. > we like to keep all our "s." files in one source directory and run makes
  15. > in other directory during development, looking for a clean solution for
  16. > these "s." dependencies other than an explicit entry for each ".c" that
  17. > has macro pathing to the source directory.
  18. > suggestions, thanks in advance....ken
  19.  
  20. This probably depends on the version make you are using.
  21.  
  22. We use GNU make (and are very happy with it) and it has a feature
  23. that makes this a triviality. Using GNU make, all you need do is
  24. put:
  25.  
  26. vpath   s.%     SCCSdir
  27.  
  28. This tells make to look for files that are names s.something in
  29. directory SCCSdir.
  30.  
  31. As I understand things, this use of vpath is unique to GNU make. But
  32. other makes have a less powerful feature using a variable VPATH. Check
  33. the documentation that comes with your system.
  34.  
  35.  
  36.  
  37. -- 
  38. Dave Eisen                               Sequoia Peripherals: (415) 967-5644
  39. dkeisen@leland.Stanford.EDU              Home:                (415) 321-5154
  40.        There's something in my library to offend everybody. 
  41.           --- Washington Coalition Against Censorship
  42.