relatively simple make question

David Karr davidk at dsinet
Thu May 16 05:34:21 AEST 1991


I have a Make question.  This should be simple, but it is giving me pain.

I have a macro definition called "SRCS".  It is a list of C shell source files.
Every file in the list has ".csh" appended to it.  For every file in the "SRCS"
list, I want to create a hard link with the ".csh" removed.  It would be
better if it would only create the links that don't exist or are "out of date",
but that isn't critical.  It should use the Bourne shell.  This is what I
have so far:

SRC = gork.csh flork.csh

$(SRC:.csh=): $(SRC)
	@echo ln $@.csh $@

It does an "echo" just to see if it would work.  It doesn't.  It does the
right thing for the first member of "SRC", but it doesn't do any more entries
in the "SRC" list.

Please enlighten me.
-- 
Digital Systems International, Inc.	David Karr
7730 177th Pl NE			dsinet!davidk
Redmond, WA   98073-0903
(206) 881-7544 ext. 547



More information about the Comp.unix.shell mailing list