🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.bugs.sys5
Article #669

Re: make bug?

#669
From: William E. Sommerfeld
Date: Sat, 23 Jan 1988 20:44
32 lines
1709 bytes
In article <158@ateng.UUCP> chip@ateng.UUCP (Chip Salzenberg) writes:
>If you specify a [make] dependency
>with two colons instead of one, then you can have a different action for
>each dependency line ...
>I've never had a need for this feature, but it seems like it should be
>useful for _something_. :-)

Yep, it is.  The X version 11 distribution uses a tool called `imake'
(written by Todd Brunhoff of Tektronix), which runs a file through the
C preprocessor, then a `cleanup' filter (which gets rid of the # line
directives and extra vertical whitespace, and turns `@@' into newline,
permitting multiple-line macros), and then through `make'.

You can define macros like the following:

#define simple(pgm,locallibs,syslibs)					@@\
									@@\
all:: pgm								@@\
									@@\
pgm: concat(pgm,.c) locallibs						@@\
	$(CC) $(CFLAGS) -o $@ $@.c locallibs syslibs			@@\
									@@\
clean::									@@\
	$(RM) pgm concat(pgm,.o) 					@@\
									@@\
instal::								@@\
	$(INSTALL) pgm $(INSTALLDIR)

and invoke it several times in an Imakefile without running into
difficulty.

					- Bill
Technical Details
Message-ID: <2483@bloom-beacon.MIT.EDU>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!water!watmath!clyde!cbosgd!ihnp4!ptsfa!ames!umd5!purdue!gatech!bloom-beacon!athena.mit.edu!wesommer
References: <2979@ncrcae.Columbia.NCR.COM> <292@dana.UUCP> <158@ateng.UUCP>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!water!watmath!clyde!cbosgd!ihnp4!ptsfa!ames!umd5!purdue!gatech!bloom-beacon!athena.mit.edu!wesommer
From: wesommer@athena.mit.edu (William E. Sommerfeld)
Newsgroups: comp.bugs.sys5,comp.unix.wizards
Subject: Re: make bug?
Summary: :: is useful.
Message-ID: <2483@bloom-beacon.MIT.EDU>
Date: 23 Jan 88 20:44:33 GMT
References: <2979@ncrcae.Columbia.NCR.COM> <292@dana.UUCP> <158@ateng.UUCP>
Sender: daemon@bloom-beacon.MIT.EDU
Reply-To: wesommer@athena.mit.edu (William E. Sommerfeld)
Organization: Massachusetts Institute of Technology
Lines: 32