tech-toolchain archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

10.1 make oddity



I recently tried to help someone set up some of my infrastructure on a
10.1 machine.  I got reports of some bizarre messages from make.  So I
tried it on a 9.1 machine.  I got the same messages:

make: Unclosed substitution for  (; missing)
make: Unclosed substitution for  (; missing)
make: "/home/mouse/z.local/lib/make/local-prog" line 115: Need an operator

Here's a cut-down test case:

V = a.1
D = /tmp

.MAIN: dummy

.PHONY: dummy
dummy:

.for x in $V
$(x:C;^(.*)\.([0-9].*)$;$D/cat\2/\1.0;):		\
		$(x:C;^.*\.([0-9].*)$;$D/cat\1;)	\
		$(x:C;\.([0-9].*)$;.cat\1;)
	cp $(x:C;\.([0-9].*)$;.cat\1;) $(.TARGET)
.endfor

which, to be completely unambiguous, I repeat base64-encoded:

ViA9IGEuMQpEID0gL3RtcAoKLk1BSU46IGR1bW15CgouUEhPTlk6IGR1bW15CmR1
bW15OgoKLmZvciB4IGluICRWCiQoeDpDO14oLiopXC4oWzAtOV0uKikkOyREL2Nh
dFwyL1wxLjA7KToJCVwKCQkkKHg6QzteLipcLihbMC05XS4qKSQ7JEQvY2F0XDE7
KQlcCgkJJCh4OkM7XC4oWzAtOV0uKikkOy5jYXRcMTspCgljcCAkKHg6QztcLihb
MC05XS4qKSQ7LmNhdFwxOykgJCguVEFSR0VUKQouZW5kZm9yCg==

On a hunch, I tried replacing - in the original, and it works in the
above test case too - the ;s with ^Bs (as in, tr \; \\2 for the test
case) - and the symptom went away.

make(1) on 9.1 says that :C is just like :S except that it uses
regexes.  I *think* I originated this code, long ago, and my version of
it does indeed work with semicolons as delimiters.

The description of :S says that

                                                Any character may be used as a
          delimiter for the parts of the modifier string.

but it appears this is not actually true.  What are the actual
restrictions?  Or is this a bug that needs fixing?  Or am I completely
confused here somehow?

/~\ The ASCII				  Mouse
\ / Ribbon Campaign
 X  Against HTML		mouse%rodents-montreal.org@localhost
/ \ Email!	     7D C8 61 52 5D E7 2D 39  4E F1 31 3E E8 B3 27 4B


Home | Main Index | Thread Index | Old Index