Re: [cc65] --create-dep for ca65?

From: Ullrich von Bassewitz <uz1musoftware.de>
Date: 2010-05-01 12:02:52
Looking at dependency file generation for the assembler ...

On Sat, Apr 24, 2010 at 12:12:04PM +0200, Oliver Schmidt wrote:
> You're of course right. What I actually wanted to write was rather this:
>
> make calls cl65, which...
>
> - calls cc65 without --create-dep; it only embeds its dependencies
> into the .s file.
>
> - calls ca65 with --create-dep; it finds the embedded dependencies,
> and writes "<file>.o: <file>.c <incl>.h" to the .u file.

... I found out that above approach is rather complex. 

It is correct that file information is passed from the compiler to the
assembler if debug info is enabled. But this information includes all input
files, which means also system includes. There is no distinction between both
and it doesn't make sense to distinguish both, because this information is not
relevant for the debug infos. In addition to that, the assembler has no idea
of "system includes" and "user includes". Not for his own includes files and
of course not for files passed down via .dbg.

What this means is that I would have to add a complete new way to pass a file
list to the assembler, and this method must include information about the type
of the file. I don't think this is really worth the trouble. It does also
mean, that the assembler cannot have a --create-full-dep option, at least not
in the way the compiler has it (for the compiler, this options adds system
includes to the created dependency).

What I can do is:

  * Add --create-dep, which will generate a dependency file that includes
    all files touched by the assembler (main file, .include and .incbin).

  * Add --create-full-dep which will work as above, but files from debug
    info are added. Please note that this list of files will also contain
    the C system includes!

So --create-full-dep will work slightly different from the compiler but I
think this is ok. There's still the option to add a method to pass down
additional files from the compiler later.

Please note that above changes (options --create-dep and --create-full-dep,
which are already implemented for the compiler) will mean that you have to
change your makefiles, because the old --create-dep option had no argument,
the output file name was auto generated. This is no longer true for the new
options. The advantage is that the user is now in control of extension and
path of the generated dependency file.

Regards


        Uz


-- 
Ullrich von Bassewitz                                  uz@musoftware.de
----------------------------------------------------------------------
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 May 1 12:03:02 2010

This archive was generated by hypermail 2.1.8 : 2010-05-01 12:03:04 CEST