URL: <http://savannah.gnu.org/bugs/?30794>
Summary: Interpreting backslash in pattern rules is weird Project: make Submitted by: raspy Submitted on: Tue 17 Aug 2010 10:32:55 AM GMT Severity: 3 - Normal Item Group: Bug Status: None Privacy: Public Assigned to: None Open/Closed: Open Discussion Lock: Any Component Version: 3.82 Operating System: MS Windows Fixed Release: None Triage Status: None _______________________________________________________ Details: Suppose the following test2.mk makefile: backslash := $(subst /,\,/) obj$(backslash)%.obj: src$(backslash)%.c xcopy $< $@ Invoking make with target like obj\foo.obj fails to find a rule. Note also that in generated dump left backslash is eaten, while the right one is not: $> make -f test2.mk obj\foo.obj -dpr # GNU Make 3.82 # Built for Windows32 [...] Reading makefiles... Reading makefile `test2.mk'... Updating makefiles.... [...] Updating goal targets.... Considering target file `obj\foo.o'. File `obj\foo.o' does not exist. Looking for an implicit rule for `obj\foo.o'. No implicit rule found for `obj\foo.o'. Finished prerequisites of target file `obj\foo.o'. Must remake target `obj\foo.o'. make: *** No rule to make target `obj\foo.o'. Stop. # Make data base, printed on Tue Aug 17 12:22:29 2010 # Variables [...] # makefile (from `test2.mk', line 1) backslash := \ [...] # Implicit Rules # No implicit rules. # Files # Not a target: .SUFFIXES: # Implicit rule search has not been done. # Modification time never checked. # File has not been updated. obj%.obj: src\%.c # Implicit rule search has not been done. # Modification time never checked. # File has not been updated. # recipe to execute (from `test2.mk', line 4): xcopy $< $@ # Not a target: obj\foo.o: # Command line target. # Implicit rule search has been done. # File does not exist. # File has not been updated. [...] _______________________________________________________ Reply to this item at: <http://savannah.gnu.org/bugs/?30794> _______________________________________________ Message sent via/by Savannah http://savannah.gnu.org/ _______________________________________________ Bug-make mailing list Bug-make@gnu.org http://lists.gnu.org/mailman/listinfo/bug-make