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
[email protected]
http://lists.gnu.org/mailman/listinfo/bug-make