Thread View: comp.sources.d
4 messages
4 total messages
Started by Anthony Shipman
Wed, 06 Jan 1993 07:18
split source and object directories
Author: Anthony Shipman
Date: Wed, 06 Jan 1993 07:18
Date: Wed, 06 Jan 1993 07:18
40 lines
1866 bytes
1866 bytes
When a site has heterogeneous workstations and one central NFS server holding source it would be very useful if the makefiles supported separate source and object directories. Eg the makefile can define # Default source location SRC = . Then every reference to a source file in the makefile is qualified with the source directory. References to object file could be assumed to be in the current directory as at present or they could be qualified with an object directory too. eg $(OBJ)/prog: $(SRC)/prog.c $(SRC)/prog.h $(CC) $(CFLAGS) -o $(OBJ)/prog $(SRC)/prog.c or assuming . is always the working directory prog: $(SRC)/prog.c $(SRC)/prog.h $(CC) $(CFLAGS) -o prog $(SRC)/prog.c Then on each workstation when I build the program I just supply the source directory on the command line (along with other machine dependent flags). eg cd obj/prog-1.1 src=/server/comp/sources/misc/prog-1.1 make -f $src/Makefile SRC=$src ... install Would anybody else find this arrangement useful? I would like to see it as a standard for makefiles in comp.sources. -- Anthony Shipman "You've got to be taught before it's too late, CP Software Export Pty Ltd, Before you are six or seven or eight, 19 Cato St., East Hawthorn, To hate all the people your relatives hate, Melbourne, Australia, 3121 You've got to be carefully taught." R&H
Re: split source and object directories
Author: Bas de Bakker
Date: Wed, 06 Jan 1993 18:52
Date: Wed, 06 Jan 1993 18:52
10 lines
1016 bytes
1016 bytes
>>>>> In article <als.726304707@marloo.kowari.cpsg.com.au>, als@bohra.cpg.oz.au (Anthony Shipman) writes: as> When a site has heterogeneous workstations and one central NFS as> server holding source it would be very useful if the makefiles as> supported separate source and object directories. Sounds like you need GNU make. Get it from prep.ai.mit.edu:/pub/gnu or many other sites around the world. Bas de Bakker.
Re: split source and object directories
Author: Anthony Shipman
Date: Thu, 07 Jan 1993 01:47
Date: Thu, 07 Jan 1993 01:47
33 lines
2155 bytes
2155 bytes
bas@phys.uva.nl (Bas de Bakker) writes: >>>>>> In article <als.726304707@marloo.kowari.cpsg.com.au>, als@bohra.cpg.oz.au (Anthony Shipman) writes: >as> When a site has heterogeneous workstations and one central NFS >as> server holding source it would be very useful if the makefiles >as> supported separate source and object directories. >Sounds like you need GNU make. Get it from prep.ai.mit.edu:/pub/gnu or >many other sites around the world. Possibly, but then I have to port it to all these different machines too. Others have mailed me saying that I could just create a whole heap of symbolic links in the object directory to the source directory. This of course requires that symbolic links be available on all machines. I have done this from time to time eg with X windows software such as the Xaw library. To me it seems like a rather messy and ugly kludge. Another advantage of using the $(SRC)/prog.c form is that the source directory can be quickly switched (to a new version for example) by changing an environment variable rather than rebuilding symbolic links etc. We use the $(SRC) structure extensively in-house for our software products. It works quite well over our entire menagerie of machines including UNIX, VMS, MPE and DOS/Windows. -- Anthony Shipman "You've got to be taught before it's too late, CP Software Export Pty Ltd, Before you are six or seven or eight, 19 Cato St., East Hawthorn, To hate all the people your relatives hate, Melbourne, Australia, 3121 You've got to be carefully taught." R&H
Re: split source and object directories
Author: Thomas Wolff
Date: Fri, 08 Jan 1993 19:36
Date: Fri, 08 Jan 1993 19:36
22 lines
1532 bytes
1532 bytes
als@bohra.cpg.oz.au (Anthony Shipman) writes:
>bas@phys.uva.nl (Bas de Bakker) writes:
>>>>>>> In article <als.726304707@marloo.kowari.cpsg.com.au>, als@bohra.cpg.oz.au (Anthony Shipman) writes:
>>as> When a site has heterogeneous workstations and one central NFS
>>as> server holding source it would be very useful if the makefiles
>>as> supported separate source and object directories.
>Others have mailed me saying that I could just create a whole heap of symbolic
>links in the object directory to the source directory. This of course requires
>that symbolic links be available on all machines.
Or even better: symbolic links which may contain embedded environment
variables. This feature of DomainOS was really great to use. You could
simply link something like "${MACHINE}/obj" or "$HOME/objects/$MACHINE"
to the directory name addressed by your configuration and that's it.
But - alas! - Unix will ever remain a hacker system - no sign of
easy and systematic solutions.
Thomas Wolff@inf.fu-berlin.de
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads