The makefile is as follows:
------------------------------------------------------------------------------
topsrcdir := ../..
# Macro path definitions for use in rules
FOO_DIR := $(topsrcdir)/stuff/include
FOO_INSTDIR := $(topsrcdir)/include
# Macros defining source files/programs and built headers
FOO_SCRIPTFILES := GenerateSomeStuff.pl
HEADER_FILES := Foo16_charsAfterUnderscore.h Foo32_charsAfterUnderscore.h \
Foo16.h Foo32.h
# Add full paths to file locations
FOO_SCRIPTS := $(FOO_SCRIPTFILES)
FOO_GENHDRS := $(addprefix $(FOO_DIR)/, $(HEADER_FILES))
FOO_INSTHDRS := $(addprefix $(FOO_INSTDIR)/, $(FOO_HDRFILES))
.PHONY: install
install : $(FOO_INSTHDRS) $(FOO_GENHDRS)
# generate decode tables
$(FOO_DIR)/Foo%_charsAfterUnderscore.h: $(FOO_DIR)/Foo%.h $(FOO_SCRIPTS)
@echo "TARGET is $@, STEM is $*"
@echo "Generating include file Foo$*_charsAfterUnderscore.h"
@echo "DEBUG: would have invoked perl GenerateSomeStuff.pl $* $@"
# prototype for decode and execute functions
$(FOO_DIR)/Foo%.h: $(FOO_SCRIPTS)
@echo "TARGET is $@, STEM is $*"
@echo "Generating include file Foo$*.h"
@echo "DEBUG: would have invoked perl GenerateSomeStuff.pl $* $@"
------------------------------------------------------------------------------
In 3.80, both rules trigger with a stem of "16" or "32":
(using args -r --debug=i):
$ make -r --debug=i
GNU Make 3.80
Copyright (C) 2002 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.
There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A
PARTICULAR PURPOSE.
Reading makefiles...
Updating goal targets....
File `install' does not exist.
File `../../stuff/include/Foo16_charsAfterUnderscore.h' does not exist.
Looking for an implicit rule for `../../stuff/include/Foo16_charsAfterUnderscore.h'.
Trying pattern rule with stem `16'.
Trying implicit prerequisite `../../stuff/include/Foo16.h'.
Trying rule prerequisite `GenerateSomeStuff.pl'.
Found an implicit rule for `../../stuff/include/Foo16_charsAfterUnderscore.h'.
File `../../stuff/include/Foo16.h' does not exist.
Looking for an implicit rule for `../../stuff/include/Foo16.h'.
Trying pattern rule with stem `16'.
Trying rule prerequisite `GenerateSomeStuff.pl'.
Found an implicit rule for `../../stuff/include/Foo16.h'.
Looking for an implicit rule for `GenerateSomeStuff.pl'.
No implicit rule found for `GenerateSomeStuff.pl'.
Must remake target `../../stuff/include/Foo16.h'.
TARGET is ../../stuff/include/Foo16.h, STEM is 16
Generating include file Foo16.h
DEBUG: would have invoked perl GenerateSomeStuff.pl 16 ../../stuff/include/Foo16.h
[...]
Now in 3.81....
first make is "Trying pattern rule with stem `16'" (GOOD)
then starts "Trying pattern rule with stem `16_charsAfterUnderscore'" (NOT WHAT I EXPECTED)
$ make -r --debug=i
[...]
Updating goal targets....
File `install' does not exist.
File `../../stuff/include/Foo16_charsAfterUnderscore.h' does not exist.
Looking for an implicit rule for `../../stuff/include/Foo16_charsAfterUnderscore.h'.
Trying pattern rule with stem `16'.
Trying implicit prerequisite `../../stuff/include/Foo16.h'.
Trying pattern rule with stem `16_charsAfterUnderscore'.
Trying rule prerequisite `GenerateSomeStuff.pl'.
Found an implicit rule for `../../stuff/include/Foo16_charsAfterUnderscore.h'.
Looking for an implicit rule for `GenerateSomeStuff.pl'.
No implicit rule found for `GenerateSomeStuff.pl'.
Must remake target `../../stuff/include/Foo16_charsAfterUnderscore.h'.
TARGET is ../../stuff/include/Foo16_charsAfterUnderscore.h, STEM is 16_charsAfterUnderscore
Generating include file Foo16_charsAfterUnderscore.h
DEBUG: would have invoked perl GenerateSomeStuff.pl 16_charsAfterUnderscore ../../stuff/include/Foo16_charsAfterUnderscore.h
Any insight (Bug? Me doing something wrong?) into this would be greatly appreciated.
Thanks,
Tom
_______________________________________________ Help-make mailing list [email protected] http://lists.gnu.org/mailman/listinfo/help-make
