[M3devel] -no-m3ship-resolution

Jay K jay.krell at cornell.edu
Sun Mar 7 12:48:59 CET 2010


My CM3_INSTALL environment variable has forward slashes.

It'd probably work otherwise.

 

One fix is:

 

Index: M3Build.m3
===================================================================
RCS file: /usr/cvs/cm3/m3-sys/cm3/src/M3Build.m3,v
retrieving revision 1.31
diff -u -r1.31 M3Build.m3
--- M3Build.m3 4 Sep 2009 10:25:26 -0000 1.31
+++ M3Build.m3 7 Mar 2010 11:40:50 -0000
@@ -133,7 +133,7 @@
     (* some more config dependent backward compatibility hacks... *)
     Quake.Define (t, "M3SEARCH_TABLES", "-T" & M3TFile);
     Quake.Define (t, "DEFAULT_BUILD_DIR", GetConfig (t, "BUILD_DIR"));
-    Quake.Define (t, "M3", M3Path.New (GetConfig (t, "BIN_USE"), "cm3"));
+    Quake.Define (t, "M3", TextUtils.Substitute(M3Path.New (GetConfig (t, "BIN_USE"), "cm3"), "/", M3Path.SlashText));
     Quake.Define (t, "PACKAGE_DIR", pkg);
 
     t.build_pkg       := M3ID.Add (Pathname.Last (pkg));
@@ -143,19 +143,19 @@
 
     (* M3Path.New is used to canonicalize the paths -- to remove dots *)
 
-    t.pkg_use         := M3Path.New (GetConfig (t, "PKG_USE"));
+    t.pkg_use         := TextUtils.Substitute(M3Path.New (GetConfig (t, "PKG_USE")), "/", M3Path.SlashText);
 (* not in Quake.Machine
-    t.bin_use         := M3Path.New (GetConfig (t, "BIN_USE"));
-    t.lib_use         := M3Path.New (GetConfig (t, "LIB_USE"));
+    t.bin_use         := TextUtils.Substitute(M3Path.New (GetConfig (t, "BIN_USE")), "/", M3Path.SlashText);
+    t.lib_use         := TextUtils.Substitute(M3Path.New (GetConfig (t, "LIB_USE")), "/", M3Path.SlashText);
 *)
-    t.pkg_install     := M3Path.New (GetConfig (t, "PKG_INSTALL"));
-    t.install_root    := M3Path.New (GetConfig (t, "INSTALL_ROOT"));
-    t.bin_install     := M3Path.New (GetConfig (t, "BIN_INSTALL"));
-    t.lib_install     := M3Path.New (GetConfig (t, "LIB_INSTALL"));
-    t.emacs_install   := M3Path.New (GetConfig (t, "EMACS_INSTALL"));
-    t.doc_install     := M3Path.New (GetConfig (t, "DOC_INSTALL"));
-    t.man_install     := M3Path.New (GetConfig (t, "MAN_INSTALL"));
-    t.html_install    := M3Path.New (GetConfig (t, "HTML_INSTALL"));
+    t.pkg_install     := TextUtils.Substitute(M3Path.New (GetConfig (t, "PKG_INSTALL")), "/", M3Path.SlashText);
+    t.install_root    := TextUtils.Substitute(M3Path.New (GetConfig (t, "INSTALL_ROOT")), "/", M3Path.SlashText);
+    t.bin_install     := TextUtils.Substitute(M3Path.New (GetConfig (t, "BIN_INSTALL")), "/", M3Path.SlashText);
+    t.lib_install     := TextUtils.Substitute(M3Path.New (GetConfig (t, "LIB_INSTALL")), "/", M3Path.SlashText);
+    t.emacs_install   := TextUtils.Substitute(M3Path.New (GetConfig (t, "EMACS_INSTALL")), "/", M3Path.SlashText);
+    t.doc_install     := TextUtils.Substitute(M3Path.New (GetConfig (t, "DOC_INSTALL")), "/", M3Path.SlashText);
+    t.man_install     := TextUtils.Substitute(M3Path.New (GetConfig (t, "MAN_INSTALL")), "/", M3Path.SlashText);
+    t.html_install    := TextUtils.Substitute(M3Path.New (GetConfig (t, "HTML_INSTALL")), "/", M3Path.SlashText);
     t.have_pkgtools   := GetConfigBool (t, "HAVE_PKGTOOLS");
     t.at_SRC          := GetConfigBool (t, "AT_SRC");
     t.system_liborder := QVal.ToArray (t, ConfigDefn (t, "SYSTEM_LIBORDER").value);


 

but I'm not sure I like that.

I think probably we should have parallel variables bin_install_forwardslash, etc., in which \\ is replaced by /.

 

If we compute the paths ourselves on Win32, we use \\.

But if user sets them, we leave them alone. Either slash works.

 

 

 - Jay


 


From: jay.krell at cornell.edu
To: m3devel at elegosoft.com
Date: Sun, 7 Mar 2010 11:25:10 +0000
Subject: [M3devel] -no-m3ship-resolution



This is head.
Two problems here.
One the feature apparently not fully working. I should look at that.
Two the test is too platform specific -- lib.lib vs. liblib.a.
Maybe reasonable to support some text substitution over the results to address that.
 Or heck, maybe abstract out the "naming conventions"? Maybe too difficult
  and too little gain.
  I'm surprised even have TARGET like that. The main point I think is the
  install root.

--- ../src/p2/p221/stdout.build 2009-12-15 03:04:01.000000000 -0800
+++ ../src/p2/p221/NT386/stdout.build   2010-03-07 03:11:39.531250000 -0800
@@ -1,7 +1,7 @@
-make_dir(PKG_INSTALL & "/p221/" & TARGET)
-install_file(".M3EXPORTS", PKG_INSTALL & "/p221/" & TARGET, "0644")
-install_file("liblib.a", PKG_INSTALL & "/p221/" & TARGET, "0644")
-install_file("liblib.m3x", PKG_INSTALL & "/p221/" & TARGET, "0644")
-install_file(".M3WEB", PKG_INSTALL & "/p221/" & TARGET, "0644")
-make_dir(PKG_INSTALL & "/p221")
-install_file("../Main.m3", PKG_INSTALL & "/p221", "0644")
+make_dir("/cm3/pkg/p221/" & TARGET)
+install_file(".M3EXPORTS", "/cm3/pkg/p221/" & TARGET, "0644")
+install_file("lib.lib", "/cm3/pkg/p221/" & TARGET, "0644")
+install_file("lib.m3x", "/cm3/pkg/p221/" & TARGET, "0644")
+install_file(".M3WEB", "/cm3/pkg/p221/" & TARGET, "0644")
+make_dir("/cm3/pkg/p221")
+install_file("../Main.m3", "/cm3/pkg/p221", "0644")
--- p222 --- .M3SHIP Library
 
 - Jay
 		 	   		  
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://m3lists.elegosoft.com/pipermail/m3devel/attachments/20100307/2b431e13/attachment-0002.html>


More information about the M3devel mailing list