Re: [cc65] Please critique this makefile

From: Oliver Schmidt <ol.sc1web.de>
Date: 2010-04-24 11:36:51
Hi,

>> Sorry, now I understand your issue! You're of course right. The second
>> line should look like you show it here. i've no idea right now what's
>> going on. Is it reproducable?
>
> Yes - it is. This is what remains in the obj dir every time after issuing
> "make".

I can't reproduce this issue here using Cygwin 1.7 on WinXP. So the
only thing I can do is supporting you at debugging by turning the sed
commands from write-only to read-after-write ;-)

This is what we've got: sed -e"s!$(<:.c=.s)!$@!p" -e"s![^\t]*\t\(.*\)!\1:!"

$(<:.c=.s) is replaced by make with the path of the source file but
with an .s extension.

$@ is replaced by make with the path of the object file.

s!$(<:.c=.s)!$@! substitude the assembler intermediate pathname with
the final object pathname. Obviously necessary as cl65 deletes the
assembler intermediate file.

p print the current result to the output stream but otherwise
continues processing of the current line. This allows to duplicate a
line.

[^\t] read a char that is no tab.

[^\t]* read as many as possible chars that are no tabs.

\t read a tab char.

\( start marking a pattern.

. read any char.

.* read as many as possible chars.

\) end marking a pattern.

\1 the first marked pattern.

: just the ':' char

s![^\t]*\t\(.*\)!\1:! substitude the whole line with the content
following the first tab suffixed with a ':'

There are many docs on 'sed' around. However I like this one:
http://www.grymoire.com/Unix/Sed.html

Regards, Oliver

P.S.: It isn't necessary/useful to have the .c file on the second
line. However it doesn't hurt and avoids making the sed script yet
more magic.
----------------------------------------------------------------------
To unsubscribe from the list send mail to majordomo@musoftware.de with
the string "unsubscribe cc65" in the body(!) of the mail.
Received on Sat Apr 24 11:36:58 2010

This archive was generated by hypermail 2.1.8 : 2010-04-24 11:37:00 CEST