> define assert > $(call assert,$($ARGS), The variable "$ARGS" is null) > endef
This code is dead - nothing calls it. I see that it includes an expression that will be evaluated (if it's ever called) as $(A)RGS when it was probably intended to say $(ARGS). > SRCS = $(wordlist 2, 999, $(ARGS)) What sets ARGS? Not make: mart...@whitewater:/tmp$ make -f badger.make -p 2>&1 | grep ARGS mart...@whitewater:/tmp$ Putting spaces after commas helps readability but it's generally a bad idea in makefiles. It's semantically significant: mart...@whitewater:/tmp$ cat > badger.make SRCS := $(subst a, b, bac) mart...@whitewater:/tmp$ make -f badger.make -p 2>&1 | grep SRCS SRCS := b bc mart...@whitewater:/tmp$ > $(EXEC-FILE): $(SRCS:%.o=%.mod) > # $(LINK) $@ $^ > $(LINK) $^ -o $@ The first line after the colon must start with a tab. Perhaps it does already but something bad happened to that rule, perhaps in transit, likely from my mail client (sorry). Now, sigh, this is going to sound patronising, for which I apologize, but hopefully you'll appreciate that more than just going silent on you: Bug reports should show what you typed and what the computer displayed. It would also be a good idea to include which version of make you're using and ideally on which platform. This mailing list is really for bugs in Make itself, not for bugs in makefiles. I believe there's a help-make list for that. -----Original Message----- From: bug-make-bounces+mdorey=bluearc....@gnu.org [mailto:bug-make-bounces+mdorey=bluearc....@gnu.org] On Behalf Of Duke Normandin Sent: Wednesday, October 20, 2010 15:21 To: Paul Smith Cc: Bug-make@gnu.org Subject: Re: source file extension On Wed, 20 Oct 2010, Paul Smith wrote: > On Wed, 2010-10-20 at 16:08 -0600, Duke Normandin wrote: > > %.o:%.mod > > $(MODULA) %< > > This should be "$<", not "%<". I should use my "good eye" when I program and debug! Thanks for catching that. Unfortunately fixing the typo didn't solve the problem. Any other ideas? -- Duke _______________________________________________ Bug-make mailing list Bug-make@gnu.org http://lists.gnu.org/mailman/listinfo/bug-make -----Original Message----- From: bug-make-bounces+mdorey=bluearc....@gnu.org [mailto:bug-make-bounces+mdorey=bluearc....@gnu.org] On Behalf Of Duke Normandin Sent: Wednesday, October 20, 2010 15:09 To: Bug-make@gnu.org Subject: source file extension Hello list... I recently cobbled together a "generic" Makefile for an Oberon-2 compiler - with the help of 2 generous hackers on this list. Works great with Oberon. Today I tried the same Makefile with a Modula-2 compiler, after making the necessary changes. The Modula compiler is really a gcc front-end. It behaves pretty much like the Oberon compiler. However, the Makefile doesn't seem to want to create the object file when used for the Modula-2 compiler. The Modula-2 source code file extension is ".mod", as opposed to a single-char extension, like .c, or .m . Could that be the problem? Here's the relevant code: define assert $(call assert,$($ARGS), The variable "$ARGS" is null) endef # save CLI arguments EXEC-FILE = $(word 1, $(ARGS)) SRCS = $(wordlist 2, 999, $(ARGS)) LINK = gm2 MODULA = gm2 -c $(EXEC-FILE): $(SRCS:%.o=%.mod) # $(LINK) $@ $^ $(LINK) $^ -o $@ %.o:%.mod $(MODULA) %< Much obliged! -- Duke _______________________________________________ Bug-make mailing list Bug-make@gnu.org http://lists.gnu.org/mailman/listinfo/bug-make _______________________________________________ Bug-make mailing list Bug-make@gnu.org http://lists.gnu.org/mailman/listinfo/bug-make