[cc65] [ca65] Include dir behaviour change between 2.13.3 and 2.13.9

From: Spiro Trikaliotis <ml-cc651trikaliotis.net>
Date: 2012-07-27 19:39:02
Hello,

wenn including files from a ca65 source file, the behaviour of where the
file is searched has changed between 2.13.3 and a recent build of 2.13.9.

As I do not believe the previous behaviour was documented, I am not sure
if I would classify this as a bug, as annoyance, or as a wishlist item. ;)

I uploaded a tarball which should show what I am speaking about. You can
find it at 

  http://www.trikaliotis.net/Download/test.ca65.tar.gz

Now, what is happening?

Let's start with the outline of the directory tree:

[A1] root_generic.i65: includes specific.i65
[A2] a1/test.a65:      includes ../root-generic.i65
[A3] a1/specific.i65:  writes "a1/specific.i65" into the object file
[A4] a2/test.a65:      includes ../root-generic.i65
[A5] a2/specific.i65:  writes "a2/specific.i65" into the object file

Now, do "cd a1; make test.a65" and "cd a2; make test.a65", respectively.
we get the following result:

a. cd a1; ca65 test.a65
   [A2] includes [A1] includes [A3]; as expected

b. cd a2; ca65 test.a65
   [A4] includes [A1] includes [A5]; as expected

Here, both variants of ca65 behave the same, and they behave as I would
have expected.


Now for the second test:

[B1] b1/b1-generic.i65: includes specific.i65
[B2] b1/test.a65:       includes b1-generic.i65
[B3] b1/specific.i65:   writes "b1/specific.i65" into the object file
[B4] b2/test.a65:       includes ../b1/b1-generic.i65
[B5] b2/specific.i65:   writes "b2/specific.i65" into the object file

To summarize the difference: [A1] is placed ia nthe root, [B1] is placed
into b1/. Thus, [B2] and [B4] include [B1] from b1/, not from the root
directory.

Building these test cases like above results in the following behaviour:

c. cd b1; ca65 test.a65
   [B2] includes [B1] includes [B3]; as expected

d. cd b2; ca65 test.a65
   for 2.13.3:
   [B4] includes [B1] includes [B5]; as expected

   for 2.13.9
   [B4] includes [B1] includes [B3]; THIS IS WEIRD!

As I said, I would expect to take the sfile specific.i65 from the
directory where ca65 was called from; however, in this last case, it is
not for 2.13.9.

Yes, I know, the directory structure is not optimal in the first place,
but it was the simplest scenario I couold come up with the show this
behaviour.

In the tarball, there is also a directory output/ which contains the
outputs I get from the assembly listing for 2.13.3 and 2.13.9, as well
as a diff between both. Additionally, the outputs of cc65 --version and
ca65 --version are included, too. (Wouldn't it be good to add the
svn version also to the output of ca65 and possibly other commands?)

I'd expect the changed behaviour to have occurred around svn version
4662, but I did not test specifically.

BTW: ca65 --version reports copyright -2011 for current 2.13.9, but
-2012 for 2.13.3. This seems a little bit add, as the current 2.13.9 is
clearly newer.

Regards,
Spiro.

-- 
Spiro R. Trikaliotis
http://www.trikaliotis.net/
----------------------------------------------------------------------
To unsubscribe from the list send mail to majordomo@musoftware.de with
the string "unsubscribe cc65" in the body(!) of the mail.
Received on Fri Jul 27 20:01:56 2012

This archive was generated by hypermail 2.1.8 : 2012-07-27 20:02:00 CEST