[M3commit] CVS Update: cm3
Jay K
jay.krell at cornell.edu
Sun Oct 20 09:55:35 CEST 2013
diff -u -r1.71 cm3cfg.common
--- m3-sys/cminstall/src/config-no-install/cm3cfg.common 22 Sep 2013 04:21:00 -0000 1.71
+++ m3-sys/cminstall/src/config-no-install/cm3cfg.common 20 Oct 2013 07:50:19 -0000
@@ -22,6 +22,14 @@
%-------------------------------------------------------------------
+if equal(M3_BACKEND_MODE, "IntegratedC")
+ or equal(M3_BACKEND_MODE, "C")
+ or USE_C_BACKEND_VIA_M3CGCAT
+ readonly BUILD_DIR_C = "c"
+else
+ readonly BUILD_DIR_C = ""
+end
+
if not defined("PROFILING_P")
if M3_PROFILING
readonly PROFILING_P = "p"
@@ -31,7 +39,7 @@
end
if not defined("BUILD_DIR")
- readonly BUILD_DIR = TARGET & PROFILING_P % directory for results
+ readonly BUILD_DIR = TARGET & PROFILING_P & BUILD_DIR_C % directory for results
end
%------------------------------------------------------------------------------
Index: scripts/python/pylib.py
===================================================================
RCS file: /usr/cvs/cm3/scripts/python/pylib.py,v
retrieving revision 1.407
diff -u -r1.407 pylib.py
--- scripts/python/pylib.py 19 Oct 2013 08:18:30 -0000 1.407
+++ scripts/python/pylib.py 20 Oct 2013 07:50:19 -0000
@@ -365,6 +365,7 @@
#-----------------------------------------------------------------------------
_CBackend = "c" in sys.argv
+_BuildDirC = ["", "c"][_CBackend]
_PossibleCm3Flags = ["boot", "keep", "override", "commands", "verbose", "why"]
_SkipGccFlags = ["nogcc", "skipgcc", "omitgcc"]
_PossiblePylibFlags = ["noclean", "nocleangcc", "c"] + _SkipGccFlags + _PossibleCm3Flags
@@ -764,10 +765,11 @@
# other commands
+ _BuildDir = ("%(Config)s%(_BuildDirC)s" % vars())
if os.name == "nt":
- RealClean = RealClean or "if exist %(Config)s rmdir /q/s %(Config)s"
+ RealClean = RealClean or "if exist %(_BuildDir)s rmdir /q/s %(_BuildDir)s"
else:
- RealClean = RealClean or "rm -rf %(Config)s"
+ RealClean = RealClean or "rm -rf %(_BuildDir)s"
RealClean = (RealClean % vars())
- Jay
----------------------------------------
> Date: Sun, 20 Oct 2013 09:52:06 +0000
> To: m3commit at elegosoft.com
> From: jkrell at elego.de
> Subject: [M3commit] CVS Update: cm3
>
> CVSROOT: /usr/cvs
> Changes by: jkrell at birch. 13/10/20 09:52:06
>
> Modified files:
> cm3/m3-sys/cminstall/src/config-no-install/: cm3cfg.common
> ./: cm3cfg.common
> cm3/scripts/python/: pylib.py
>
> Log message:
> add lower case "c" to the end of BUILD_DIR if using the C backend
>
> in scripts/python, user must add "c" as a parameter
> then e.g. realclean appends "c"
>
> This is experimental, in that it has likely been years
> since anyone had TARGET != BUILD_DIR.
> But this is what profiling evidently did.
>
> Strongly consider:
> make the C backend the overwhelming norm for most/all platforms
> and switch the logic around, i.e. append "cm3cg" if using cm3cg
>
> Note that AMD64_NT only has one backend.
>
> Note further that the C output is almost identical across all
> targets, and this will become more the case.. it should, just
> about, become its own target; except that we also run cc/cl
> and ld/link in these output directories...so we need a way
> to share..later
>
> I considered ".c" but that would look like a file name to people.
> "-c" or "_c" should also be considered.
>
> This is a working (hopefully) proof of concept, open to change.
>
More information about the M3commit
mailing list