URL:
<http://savannah.gnu.org/bugs/?20502>
Summary: Allow attaching target-specific variables to
implicit rules
Project: make
Submitted by: hashproduct
Submitted on: Tuesday 07/17/2007 at 05:03
Severity: 3 - Normal
Item Group: Enhancement
Status: None
Privacy: Public
Assigned to: None
Open/Closed: Open
Discussion Lock: Any
Component Version: 3.81
Operating System: POSIX-Based
Fixed Release: None
_______________________________________________________
Details:
I'm using GNU make 3.81 on Fedora Core 7 Linux.
Suppose I have some documentation files, some of which use a hash symbol to
mark comments and some of which use a double slash; a file's extension (.hc
or .ssc) tells what format it's in. I want to generate comment-free versions
of all the files. Here's the makefile:
-----
UNCOMMENT = grep -v '^$(commentsymbol)'
all: foo.txt bar.txt
# foo.hc and bar.ssc exist
%.txt: %.hc
$(UNCOMMENT) $< -o $@
%.txt: %.ssc
$(UNCOMMENT) $< -o $@
-----
I want to associate a target-specific variable definition for
$(commentsymbol) with each implicit rule so that a target's $(commentsymbol)
will be correct based on which rule was chosen to build it. Make will let me
attach definitions to the target pattern %.txt, but that's no good because I
can't get make to use one definition for the first rule and a different
definition for the second. Make should provide a way for me attach a
definition to an implicit rule. Since only one implicit rule can exist with
a given target pattern and a given set of prerequisite patterns, attaching
the definition to those patterns comes to the same. The syntax could be
something like this:
%.txt: %.hc: commentsymbol = \#
%.txt: %.ssc: commentsymbol = //
_______________________________________________________
Reply to this item at:
<http://savannah.gnu.org/bugs/?20502>
_______________________________________________
Message sent via/by Savannah
http://savannah.gnu.org/
_______________________________________________
Bug-make mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/bug-make