[omniORB] Minor patch to windows build

Mark Hammond mhammond@skippinet.com.au
Wed Apr 9 02:11:01 2003


This is a multi-part message in MIME format.

------=_NextPart_000_024A_01C2FE88.A0317B80
Content-Type: text/plain;
	charset="iso-8859-1"
Content-Transfer-Encoding: 7bit

I have made a simple patch to the build system, so that omniidl will compile
on windows from a Python source tree (rather than just a binary installed
version).

The patch simply adds a couple of directories is the /I and /libpath:
options - for a binary install, the new $PYTHON/PCbuild and $PYTHON/PC
directories wont exist, and for source trees the $PYTHON/lib tree has no
.obj files, but that is not a problem.

I also notice that you guys had a lot of grief with path names, going so far
as to create wrappers for you common tools.  Looking over the source code,
much of it will not work as intended for new cygwins (keys have moved, HKLM
is an alternative, etc).  It may be worth noting that fairly recent cygwin
installs have a cygpath utility which does all these path transformations
for you.  The Mozilla build uses this tool with good success.  They also
have autoconf doing the variable manipulation for the lib path and include
files, which is more tractable to my brain than bending make (but only
just!)

Would patches that removed some hacks via cygpath and/or autoconf be
welcomed, even if they were "one-step-at-a-time" type patches?  I guess it
would mean updating your "minimal cygwin".  A potential future win is that
it would open the door to using the via the cygwin Python builds.

Oh - and finally, it seems the devel branch is currently fails on Windows
(well, 12 hours ago anyway!) :)  That isn't a problem for me though, I'm on
4.0.1.


Thanks,

Mark.

------=_NextPart_000_024A_01C2FE88.A0317B80
Content-Type: application/octet-stream;
	name="omni.patch"
Content-Transfer-Encoding: quoted-printable
Content-Disposition: attachment;
	filename="omni.patch"

Index: cxx/dir.mk
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
RCS file: /cvsroot/omniorb/omni/src/tool/omniidl/cxx/Attic/dir.mk,v
retrieving revision 1.19.2.16
diff -u -r1.19.2.16 dir.mk
--- cxx/dir.mk	13 Mar 2003 13:50:05 -0000	1.19.2.16
+++ cxx/dir.mk	9 Apr 2003 00:57:10 -0000
@@ -246,14 +246,17 @@
=20
 DIR_CPPFLAGS +=3D -DMSDOS -DOMNIIDL_EXECUTABLE
=20
+# A Python Windows source tree has PC/pyconfig.h and PCbuild/*.lib
+# We specify all directories for both a source and binary tree -
+# the others just wont be used.
 PYPREFIX1 :=3D "$(shell $(PYTHON) -c 'import sys,string; =
sys.stdout.write(string.lower(sys.prefix))')"
 PYPREFIX  :=3D $(subst program files,progra~1,$(subst =
\,/,$(PYPREFIX1)))
 PYVERSION :=3D $(shell $(PYTHON) -c 'import sys; =
sys.stdout.write(sys.version[:3])')
 PYINCDIR  :=3D $(PYPREFIX)/include
-PYLIBDIR  :=3D $(PYPREFIX)/libs $(PYPREFIX)/lib/x86_win32
+PYLIBDIR  :=3D $(PYPREFIX)/libs $(PYPREFIX)/lib/x86_win32 =
$(PYPREFIX)/PCbuild
 PYLIB     :=3D python$(subst .,,$(PYVERSION)).lib
=20
-DIR_CPPFLAGS +=3D -I$(PYINCDIR) -I$(PYINCDIR)/python$(PYVERSION) \
+DIR_CPPFLAGS +=3D -I$(PYINCDIR) -I$(PYPREFIX)/PC =
-I$(PYINCDIR)/python$(PYVERSION) \
                 -DPYTHON_INCLUDE=3D"<Python.h>"
=20
 CXXLINKOPTIONS +=3D $(patsubst %,-libpath:%,$(PYLIBDIR))

------=_NextPart_000_024A_01C2FE88.A0317B80--