[omniORB] CygWin build patch

Vladimir Panov gbr at voidland.org
Mon Jan 17 20:25:39 GMT 2005


Hi all.

omniORB 4.0.5 builds almost OK under CygWin (with GCC, not MSVC). But 
there are 3 problems:

1. omkdirhier has a side effect of constructing directory names with an 
additional slash at the front, e.g.:
mkdir //usr/local
But recent versions of CygWin interpret such a path as an UNC.

2. The non-static version COSDynamic4 cannot be built. I am not a very 
experienced Windows programmer, but as far as I can tell this is because 
it doesn't link the import library for COS4.

3. COS4 and COSDynamic4 import libraries are not installed.

I have attached a patch which fixes these problems.

Vlado

-------------- next part --------------
diff -r -u omniORB-4.0.5-orig/bin/scripts/omkdirhier omniORB-4.0.5/bin/scripts/omkdirhier
--- omniORB-4.0.5-orig/bin/scripts/omkdirhier	2004-08-11 14:17:54.000000000 +0300
+++ omniORB-4.0.5/bin/scripts/omkdirhier	2005-01-13 20:31:35.562500000 +0200
@@ -47,7 +47,11 @@
 	for filename
 	do
 		path=$prefix$filename
-		prefix=$path/
+		prefix=$path
+		if echo $prefix | grep -v '/$'
+		then
+			prefix=$prefix/
+		fi
 		shift
 
 		test -d "$path" || {
diff -r -u omniORB-4.0.5-orig/src/services/mklib/dir.mk omniORB-4.0.5/src/services/mklib/dir.mk
--- omniORB-4.0.5-orig/src/services/mklib/dir.mk	2004-03-19 03:08:35.000000000 +0200
+++ omniORB-4.0.5/src/services/mklib/dir.mk	2005-01-13 20:34:38.890625000 +0200
@@ -132,10 +132,15 @@
 imps := $(OMNIORB_LIB)
 dynimps := $(OMNIORB_LIB)
 else
+ifdef Cygwin
+imps := $(OMNIORB_LIB_NODYN)
+dynimps := $(OMNIORB_LIB) $(shell $(SharedLibraryImplibName) $(sknamespec))
+else
 imps := $(OMNIORB_LIB_NODYN)
 dynimps := $(OMNIORB_LIB)
 endif
 endif
+endif
 
 mkshared::
 	@(dir=shared; $(CreateDir))
@@ -172,6 +177,35 @@
 	$(RM) shared/*.o
 	(dir=shared; $(CleanSharedLibrary))
 
+ifdef Cygwin
+
+skimplib := $(shell $(SharedLibraryImplibName) $(sknamespec))
+dynskimplib := $(shell $(SharedLibraryImplibName) $(dynsknamespec))
+
+export:: $(skimplib)
+	@(namespec="$(sknamespec)"; $(ExportImplibLibrary))
+
+export:: $(dynskimplib)
+	@(namespec="$(dynsknamespec)"; $(ExportImplibLibrary))
+
+ifdef INSTALLTARGET
+install:: $(skimplib)
+	@(dir="$(INSTALLLIBDIR)"; namespec="$(sknamespec)"; \
+          $(ExportLibraryToDir))
+
+install:: $(dynskimplib)
+	@(dir="$(INSTALLLIBDIR)"; namespec="$(dynsknamespec)"; \
+          $(ExportLibraryToDir))
+endif
+
+clean::
+	(dir=.; $(CleanImplibLibrary))
+
+veryclean::
+	(dir=.; $(CleanImplibLibrary))
+
+endif
+
 else
 
 mkshared::


More information about the omniORB-list mailing list