flak@slovax.UUCP (06/16/87)
I need help in setting up a Makefile in BSD 4.2.
What I am attempting to do, is take a file with a ".r" suffix and
run it through a process to convert it into a file with no suffix
The obvious thing to do is:
# ======================
.SUFFIXES:	.r
.r:
	process $*.r > $*
# ======================
This works in SYS V, but in BSD 4.2, "make foo" (given foo.r exists)
yields: "Make:  Don't know how to make foo.  Stop."
Anyone have a clean solution to this?
-- 
{psivax,ism780}!logico!slovax!flak  :  {hplsla,uw-beaver}!tikal!slovax!flak
Dan Flak-R & D Associates,3625 Perkins Lane SW,Tacoma,Wa 98466,206-581-1322rsalz@Diamond.BBN.COM (Rich Salz) (06/17/87)
In comp.unix.questions (<463@slovax.UUCP>), flak@slovax.UUCP (Dan Flak) writes: > >What I am attempting to do, is take a file with a ".r" suffix and >run it through a process to convert it into a file with no suffix You can't. The concept of single-suffix rules were added by AT&T in SystemV (version 1, even, I believe). The code to do it is fairly simple -- a couple-dozen lines added to the doname() routine. Don't ask me for them; if you think about it, it'd be illegal for me to post a diff. If you want to do that in BSD, then you either have to port a System V make (and buy source, if you don't already have that). The AT&T Toolchest sells a "new make" described in the Portland Usenix proceedings that does this, and more. But be warned: nmake isn't the make we all know and love: it's a much more complicated beastie. [ Yow, what's my punctuation ratio? ] /r$ -- Rich $alz "Anger is an energy" Cronus Project, BBN Laboratories rsalz@pineapple.bbn.com