[M3devel] How to run m3cggen?
Jay K
jay.krell at cornell.edu
Tue Nov 5 19:55:38 CET 2013
Right. I hit the same problem at some point and wasn't satisfied either. I fixed it, or almost fixed it.
Building it in a list of other stuff is correct, not a false hit, part of the solution.
upgrade.sh and ugprade.py both handle this, almost.
upgrade.sh:
https://dcvs.elegosoft.com/cgi-bin/cvsweb.cgi/cm3/scripts/upgrade.sh?rev=1.37;content-type=text%2Fplain
if [ "x${GCC_BACKEND}" = xyes ]; then
# Continue with the backend, if needed. Deliberately don't ship it!
# "$root/m3-sys/m3cggen/${TARGET}/m3cggen" > "$root/m3-sys/m3cc/gcc/gcc/m3cg/m3cg.h"
"$root/scripts/do-pkg.sh" "$@" "build" m3cc || exit 1
fi
upgrade.py:
https://dcvs.elegosoft.com/cgi-bin/cvsweb.cgi/cm3/scripts/python/upgrade.py?rev=1.39;content-type=text%2Fplain
a = Root + "/m3-sys/m3cggen/" + Target + "/m3cggen > " + Root + "/m3-sys/m3cc/gcc/gcc/m3cg/m3cg.h"
print(a)
# os.system(a)
FilterPackages([ "m3cc" ]) and DoPackage(argv_BuildShip, [ "m3cc" ])
Those two lines should be uncommented.
Or, more likely, they should redirect elsewhere and do a "move if change".
In the python case, "elsewhere" should be read the pipe into a variable in memory.
It isn't supposed to change if there are no local edits, but streamlining it is very good to have.
Maybe that is why I left it commented out.
Only approx. 3 of us have changed this probably in 10 years.
Tony probably doesn't use any of the scripts. I do and almost fixed it. You are #3.
Can you make it so or shall I?
m3cggen is "standalone" for this reason, or should be.
> gcc/gcc/m3cg.
> What is the complete set of source files that, like this, are not where one would
> expect them to be? Is it everything in the m3cg subdirectory? Just parse.c?
The list is whatever the source does.
The alternative would be to have several almost identical copies and disconnected history.
It is a little confusing, but the alternative isn't great either.
For parse.c, and related, look in m3-sys/src/m3makefile.
For example, we also sometimes have to make links for gmp/mpfr/mpc.
- Jay
> Date: Tue, 5 Nov 2013 11:47:13 -0600
> From: rodney_bates at lcwb.coop
> To: m3devel at elegosoft.com
> Subject: [M3devel] How to run m3cggen?
>
> I need to rebuild m3cc after changes to m3middle/src/M3CG_Binary.i3 and m3cggen/src/Main.
> I can see that at a minimum, I have to recompile m3cggen first, then run it and place
> its output appropriately, before compiling m3cc. m3cggen comes after m3cc in pkginfo.txt,
> so the do-cm3-*.sh scripts can't work here.
>
> A massive recursive grep of everything for "m3cggen" doesn't appear to turn up anything in
> a script, makefile, or m3makefile, other than disconnected building of m3cggen itself.
> However, there is so much false output here, that it's a needle in a haystack.
>
> So is there any script, makefile, etc. that takes care of this, or is it all manual?
> Are there any other generated source files or similar steps that also need to be redone
> that I can't easily find?
>
> m3cg.h (The result of this process) is a CVS file, which at least hints that this is
> just being done manually.
>
> Slightly related, I found out the hard way that the parse.c in the gcc version you are
> compiling is actually, sometimes, overlaid during building, by the one in gcc/gcc/m3cg.
> What is the complete set of source files that, like this, are not where one would
> expect them to be? Is it everything in the m3cg subdirectory? Just parse.c?
> Some other subset?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://m3lists.elegosoft.com/pipermail/m3devel/attachments/20131105/2281089d/attachment-0002.html>
More information about the M3devel
mailing list