Also modify dependency generation to be a side-effect of compilation.
It's still not quite perfect in picking up some changes (in particular
just after a commit, no files have changed but the git identification
is now different).
several compilers:
- gcc version 4.5.3 (NetBSD nb2 20110806)
- gcc version 4.9.2 (Ubuntu 4.9.2-10ubuntu13)
- Ubuntu clang version 3.6.0-2ubuntu1 (tags/RELEASE_360/final) (based on LLVM 3.6.0)
The warnings were mostly about local variables shadowing others,
unused function parameters, and C++ style comments. Some variables were
indeed used before set.
Note that on Linux, using -std=c99 does stupid things like *remove* the
declaration of strdup() from <string.h>. Therefore I've reluctantly used
-std=gnu99.
Also, to make Kermit sources work, only increase the local symbol block
counter if there actually was a local symbol used in the block.
This way, conditional inclusions (which include source text only in the
first pass) will have less potential for de-synchronisation between the
passes. After all, if the generated internal local symbol names do
not match, phase errors will result (showing themselves as strange label
redefinition problems).
Normally listing is suppressed during the first pass, because there are
many unresolved symbols, which will be better in pass 2.
Errors are also suppressed because most of them are spurious.
With the -yl1 option, listing during pass 1 is not suppressed.
If you give the option twice, you also get the error messages.