Pattern rule instead of suffix rule in Makefile?
James E Keenan
jkeen at verizon.net
Fri Jun 15 19:15:43 UTC 2012
At approx. line 685 of config/gen/makefiles/root.in, we have this suffix
rule:
# constant string support
.c.str : # suffix rule (limited support)
$(PERL) $(BUILD_TOOLS_DIR)/c2str.pl $< > $@
According to
http://www.gnu.org/software/make/manual/html_node/Suffix-Rules.html#Suffix-Rules
(patspam++ for the link; not_gerd++ for #parrot discussion), "[S]uffix
rules are the old-fashioned way of defining implicit rules for make.
Suffix rules are obsolete because pattern rules are more general and
clearer."
Should we change this suffix rule to be a pattern rule?
(http://www.gnu.org/software/make/manual/html_node/Pattern-Intro.html#Pattern-Intro)
In the 'implicit_c2str' branch on github, I have modified this suffix
rule to be a pattern rule. (See patch attached.)
Would this be a problem for versions of 'make' other than GNU's?
Thank you very much.
Jim Keenan
(#parrot kid51)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-Change-the-suffix-rule-for-c2str-to-be-a-pattern-rul.patch
Type: text/x-csrc
Size: 878 bytes
Desc: not available
URL: <http://lists.parrot.org/pipermail/parrot-dev/attachments/20120615/61c806cc/attachment.c>
More information about the parrot-dev
mailing list