Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.1 ggr 9/12/83; site pyuxbb.UUCP Path: utzoo!linus!philabs!cmcl2!floyd!vax135!ariel!hou5f!hou5g!hou5h!eagle!allegra!alice!rabbit!pyuxbb!ggr From: ggr@pyuxbb.UUCP Newsgroups: net.followup,net.unix-wizards,btl.unix Subject: Found: a version of 'make' that uses a MAKEPATH Message-ID: <165@pyuxbb.UUCP> Date: Wed, 28-Sep-83 11:36:39 EDT Article-I.D.: pyuxbb.165 Posted: Wed Sep 28 11:36:39 1983 Date-Received: Thu, 29-Sep-83 06:04:14 EDT References: <158@pyuxbb.UUCP> Organization: AT&T Bell Laboratories, Piscataway Lines: 34 Well, it uses the environment variable VPATH, and you won't guess where I found it. In my own /usr/src/cmd/make directory. It seems that if you have a USG UNIX (aka System III or System V) you already have this undocumented (of course) feature. Thanks to Guy Harris (that other Guy) who had remembered it from a bout of code-reading he once did. Thanks also to many who replied having make front-ends that fiddle with linking files, read '.from' files to get paths, or take '.PREFIXES' lines in the Makefile itself. This feature is *not* in the Version 7 make, nor in various BSD makes I've seen (at least not as VPATH). Now to make it useful: it seems to be adequate (if you carefully craft your Makefiles) *if* the search directories other than the current are kept up to date (object files not deleted). Otherwise, you get results like: $ VPATH=:/usr/src/cmd/diff make -f /usr/src/cmd/diff/diff.mk cc -O -s -i -o diff diff.c 0: No source file diff.c *** Error code 1 Stop. Now you can get around this by making a 'cc' command that uses VPATH also, does stat's on its arguments that look like input file names, and replaces them with full pathnames before invoking the real /bin/cc. (You have to do this with commands other than cc as well.) Or maybe I can work this into make itself. Or maybe I'll take another look at the other solutions. === Guy Riddle == AT&T Bell Laboratories, Piscataway ===