Issue 64869 - Improve parsing of %-target definitions
Summary: Improve parsing of %-target definitions
Status: CLOSED FIXED
Alias: None
Product: Build Tools
Classification: Code
Component: dmake (show other issues)
Version: current
Hardware: All All
: P3 Trivial (vote)
Target Milestone: ---
Assignee: hjs
QA Contact: issues@tools
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-04-27 22:18 UTC by quetschke
Modified: 2013-08-07 15:34 UTC (History)
2 users (show)

See Also:
Issue Type: PATCH
Latest Confirmation in: ---
Developer Difficulty: ---


Attachments
Patch for dmake (16.74 KB, patch)
2006-05-03 22:44 UTC, quetschke
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this issue.
Description quetschke 2006-04-27 22:18:31 UTC
With dmake the following makefile segfaults:

---
SHELL*:=/bin/sh 
SHELLFLAGS*:=-ce

allnew : all

%.x all  : %.c
	touch $@

qqq.c :
	+echo qqq > qqq.c
---

And this doesn't work as expected:
---
SHELL*:=/bin/sh 
SHELLFLAGS*:=-ce

allnew : qqq.y

%.x %.y  : %.c
	touch $@

qqq.c :
	+echo qqq > qqq.c
---
$ rm qqq.? ; ./dmake/dmake.exe -rf multipercent.mk
touch qqq.y

Bottomline is that more than one %-target in the target section is not
defined by the dmake man page. Patch will follow soon.
Comment 1 quetschke 2006-05-03 21:43:06 UTC
Another one along the same lines:

---
SHELL*:=/bin/sh 
SHELLFLAGS*:=-ce

.PHONY all : %.c
	touch all
---

$ ./dmake/dmake.exe -rf attrpercent.mk
dmake:  Error: -- `%.c' not found, and can't be made

That should be:
dmake:  attrpercent.mk:  line 9:  Error: -- Syntax error in % rule, missing % target
Comment 2 quetschke 2006-05-03 21:49:23 UTC
And while I'm at it:

---
SHELL*:=/bin/sh 
SHELLFLAGS*:=-ce

all :
	touch all

.PHONY : all ; echo no recipe expected
---

$ ./dmake/dmake.exe -rf attrtarget.mk
touch all

Hmm, recipe lines are not expected behind the "ATTRIBUTE_LIST : targets" form
or some special targets like .INCLUDE .
Comment 3 quetschke 2006-05-03 22:44:06 UTC
Created attachment 36252 [details]
Patch for dmake
Comment 4 quetschke 2006-05-03 22:47:53 UTC
The previous patch fixes these problems. Committed to CWS dmake45.
Comment 5 quetschke 2006-06-04 01:36:29 UTC
Committed the examples from this issue as testcases. Reassigning for verification.
Comment 6 quetschke 2006-06-04 01:37:11 UTC
Committed -> FIXED.

@ause: Please verify.
Comment 7 hjs 2006-06-26 14:46:23 UTC
played around with those samples. looks good
Comment 8 hjs 2006-07-07 15:23:18 UTC
.