From a7a5be6b7ce3c9578f17c56ae729b563f4ee6489 Mon Sep 17 00:00:00 2001 From: helge Date: Tue, 14 Sep 2004 11:42:57 +0000 Subject: [PATCH] use makefile version in resource lookup git-svn-id: http://svn.opengroupware.org/SOPE/trunk@135 e4a50df8-12e2-0310-a44c-efbce7f8a7e3 --- sope-appserver/NGObjWeb/ChangeLog | 6 ++++++ sope-appserver/NGObjWeb/GNUmakefile | 4 +--- sope-appserver/NGObjWeb/GNUmakefile.preamble | 10 ++++++++-- sope-appserver/NGObjWeb/NGHttp+WO.m | 1 - sope-appserver/NGObjWeb/SoObjects/GNUmakefile | 2 +- .../NGObjWeb/SoObjects/GNUmakefile.preamble | 10 +--------- .../NGObjWeb/SoObjects/SoProductRegistry.m | 18 ++++++++++------- sope-appserver/NGObjWeb/Templates/GNUmakefile | 2 +- .../NGObjWeb/Templates/GNUmakefile.preamble | 10 +--------- .../Templates/WOApplication+Builders.m | 20 +++++++++++-------- sope-appserver/NGObjWeb/Version | 2 +- sope-appserver/NGObjWeb/WOCoreApplication.m | 7 +++++-- sope-appserver/NGObjWeb/WOMessage.m | 1 - sope-appserver/NGObjWeb/subdirs.make | 20 +++++++++++++++++++ 14 files changed, 68 insertions(+), 45 deletions(-) create mode 100644 sope-appserver/NGObjWeb/subdirs.make diff --git a/sope-appserver/NGObjWeb/ChangeLog b/sope-appserver/NGObjWeb/ChangeLog index 4e060512..ee839f8b 100644 --- a/sope-appserver/NGObjWeb/ChangeLog +++ b/sope-appserver/NGObjWeb/ChangeLog @@ -1,3 +1,9 @@ +2004-09-14 Helge Hess + + * WOMessage.m, WOCoreApplication.m, SoProductRegistry.m, + WOApplication+Builders.m: use makefile provided SOPE version for + resource lookup (v4.3.39) + 2004-09-13 Helge Hess * OWResourceManager.m: deprecated -pathToComponentNamed:inFramework: diff --git a/sope-appserver/NGObjWeb/GNUmakefile b/sope-appserver/NGObjWeb/GNUmakefile index a37b3e48..f4242598 100644 --- a/sope-appserver/NGObjWeb/GNUmakefile +++ b/sope-appserver/NGObjWeb/GNUmakefile @@ -9,11 +9,9 @@ LIBRARY_NAME = libNGObjWeb ifeq ($(FHS_INSTALL_ROOT),) RESOURCES_DIR = $(GNUSTEP_RESOURCES)/NGObjWeb else -RESOURCES_DIR = $(FHS_INSTALL_ROOT)/share/sope-4.3/ngobjweb +RESOURCES_DIR = $(FHS_INSTALL_ROOT)/share/sope-$(MAJOR_VERSION).$(MINOR_VERSION)/ngobjweb endif -libNGObjWeb_CPPFLAGS += -pipe -DCOMPILING_NGOBJWEB=1 - libNGObjWeb_SOVERSION=$(MAJOR_VERSION).$(MINOR_VERSION) libNGObjWeb_VERSION=$(MAJOR_VERSION).$(MINOR_VERSION).$(SUBMINOR_VERSION) diff --git a/sope-appserver/NGObjWeb/GNUmakefile.preamble b/sope-appserver/NGObjWeb/GNUmakefile.preamble index 5091249d..46c9472b 100644 --- a/sope-appserver/NGObjWeb/GNUmakefile.preamble +++ b/sope-appserver/NGObjWeb/GNUmakefile.preamble @@ -1,6 +1,13 @@ # $Id: GNUmakefile.preamble 25 2004-08-20 23:01:07Z helge $ -ADDITIONAL_CPPFLAGS += -Wall -DCOMPILE_FOR_GSTEP_MAKE=1 +ADDITIONAL_CPPFLAGS += \ + -Wall -DCOMPILE_FOR_GSTEP_MAKE=1 \ + -DSOPE_MAJOR_VERSION=$(MAJOR_VERSION) \ + -DSOPE_MINOR_VERSION=$(MINOR_VERSION) \ + -DSOPE_SUBMINOR_VERSION=$(SUBMINOR_VERSION) + +libNGObjWeb_CPPFLAGS += -pipe -DCOMPILING_NGOBJWEB=1 +libNGObjWeb_OBJCFLAGS += -Wall -Wno-import -Wno-protocol SOPE_ROOT=../.. CORE_ROOT=$(SOPE_ROOT)/sope-core @@ -15,7 +22,6 @@ ADDITIONAL_INCLUDE_DIRS += \ -I$(CORE_ROOT)/NGExtensions \ -I$(SOPE_ROOT)/sope-mime -libNGObjWeb_OBJCFLAGS += -Wall -Wno-import -Wno-protocol ifneq ($(GNUSTEP_BUILD_DIR),) RELBUILD_DIR_SOPE=$(GNUSTEP_BUILD_DIR)/.. diff --git a/sope-appserver/NGObjWeb/NGHttp+WO.m b/sope-appserver/NGObjWeb/NGHttp+WO.m index 7eef5945..b990e282 100644 --- a/sope-appserver/NGObjWeb/NGHttp+WO.m +++ b/sope-appserver/NGObjWeb/NGHttp+WO.m @@ -18,7 +18,6 @@ Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ -// $Id$ #include "NGHttp+WO.h" #include diff --git a/sope-appserver/NGObjWeb/SoObjects/GNUmakefile b/sope-appserver/NGObjWeb/SoObjects/GNUmakefile index fedd674a..7a6492d6 100644 --- a/sope-appserver/NGObjWeb/SoObjects/GNUmakefile +++ b/sope-appserver/NGObjWeb/SoObjects/GNUmakefile @@ -1,6 +1,6 @@ # $Id: GNUmakefile 1 2004-08-20 10:08:27Z znek $ -include $(GNUSTEP_MAKEFILES)/common.make +include ../subdirs.make SUBPROJECT_NAME = SoObjects diff --git a/sope-appserver/NGObjWeb/SoObjects/GNUmakefile.preamble b/sope-appserver/NGObjWeb/SoObjects/GNUmakefile.preamble index 9be6f9fb..ff4872d4 100644 --- a/sope-appserver/NGObjWeb/SoObjects/GNUmakefile.preamble +++ b/sope-appserver/NGObjWeb/SoObjects/GNUmakefile.preamble @@ -1,11 +1,3 @@ # $Id$ -ADDITIONAL_INCLUDE_DIRS += \ - -I.. \ - -I../DynamicElements/ \ - -I../WebDAV/ \ - -I../.. \ - -I../../../sope-core \ - -I../../../sope-core/NGStreams \ - -I../../../sope-core/NGExtensions \ - -I../../../sope-xml +ADDITIONAL_INCLUDE_DIRS += -I../WebDAV/ diff --git a/sope-appserver/NGObjWeb/SoObjects/SoProductRegistry.m b/sope-appserver/NGObjWeb/SoObjects/SoProductRegistry.m index af2c68ca..9ee2a715 100644 --- a/sope-appserver/NGObjWeb/SoObjects/SoProductRegistry.m +++ b/sope-appserver/NGObjWeb/SoObjects/SoProductRegistry.m @@ -202,6 +202,7 @@ static int debugOn = 0; NSProcessInfo *pi; NSArray *pathes; NSBundle *bundle; + NSString *relPath; unsigned i; /* scan mail bundle & frameworks */ @@ -248,15 +249,16 @@ static int debugOn = 0; [self debugWithFormat:@"scanning for products ..."]; +#if !COCOA_Foundation_LIBRARY + relPath = @"Library/"; +#endif + relPath = [NSString stringWithFormat:@"%@SoProducts-%i.%i/", relPath, + SOPE_MAJOR_VERSION, SOPE_MINOR_VERSION]; for (i = 0; i < [pathes count]; i++) { NSString *lPath; BOOL isDir; - lPath = [pathes objectAtIndex:i]; -#if !COCOA_Foundation_LIBRARY - lPath = [lPath stringByAppendingPathComponent:@"Library"]; -#endif - lPath = [lPath stringByAppendingPathComponent:@"SoProducts-4.3"]; + lPath = [[pathes objectAtIndex:i] stringByAppendingPathComponent:relPath]; if (![fm fileExistsAtPath:lPath isDirectory:&isDir]) continue; @@ -269,9 +271,11 @@ static int debugOn = 0; /* look into FHS pathes */ + relPath = [NSString stringWithFormat:@"lib/sope-%i.%i/products/", + SOPE_MAJOR_VERSION, SOPE_MINOR_VERSION]; pathes = [NSArray arrayWithObjects: - @"/usr/local/lib/sope-4.3/products/", - @"/usr/lib/sope-4.3/products/", + [@"/usr/local/" stringByAppendingString:relPath], + [@"/usr/" stringByAppendingString:relPath], nil]; for (i = 0; i < [pathes count]; i++) { NSString *lPath; diff --git a/sope-appserver/NGObjWeb/Templates/GNUmakefile b/sope-appserver/NGObjWeb/Templates/GNUmakefile index f0bedf1a..2269c5ae 100644 --- a/sope-appserver/NGObjWeb/Templates/GNUmakefile +++ b/sope-appserver/NGObjWeb/Templates/GNUmakefile @@ -1,6 +1,6 @@ # $Id$ -include $(GNUSTEP_MAKEFILES)/common.make +include ../subdirs.make SUBPROJECT_NAME = Templates diff --git a/sope-appserver/NGObjWeb/Templates/GNUmakefile.preamble b/sope-appserver/NGObjWeb/Templates/GNUmakefile.preamble index e72c2678..73c51ce6 100644 --- a/sope-appserver/NGObjWeb/Templates/GNUmakefile.preamble +++ b/sope-appserver/NGObjWeb/Templates/GNUmakefile.preamble @@ -1,10 +1,2 @@ -# $Id$ +# compile settings -ADDITIONAL_INCLUDE_DIRS += \ - -I.. \ - -I../DynamicElements/ \ - -I../.. \ - -I../../../sope-core \ - -I../../../sope-core/NGStreams \ - -I../../../sope-core/NGExtensions \ - -I../../../sope-xml diff --git a/sope-appserver/NGObjWeb/Templates/WOApplication+Builders.m b/sope-appserver/NGObjWeb/Templates/WOApplication+Builders.m index 18b66a6e..792e082d 100644 --- a/sope-appserver/NGObjWeb/Templates/WOApplication+Builders.m +++ b/sope-appserver/NGObjWeb/Templates/WOApplication+Builders.m @@ -64,9 +64,11 @@ } - (void)loadBuilderBundles { + // TODO: DUP to SoProductRegistry.m NSFileManager *fm; NSProcessInfo *pi; NSArray *pathes; + NSString *relPath; unsigned i; /* scan library pathes */ @@ -98,16 +100,16 @@ [self debugWithFormat:@"scanning for builder bundles ..."]; +#if !COCOA_Foundation_LIBRARY + relPath = @"Library/"; +#endif + relPath = [NSString stringWithFormat:@"%@WOxElemBuilders-%i.%i/", relPath, + SOPE_MAJOR_VERSION, SOPE_MINOR_VERSION]; for (i = 0; i < [pathes count]; i++) { NSString *lPath; BOOL isDir; - lPath = [pathes objectAtIndex:i]; -#if !COCOA_Foundation_LIBRARY - lPath = [lPath stringByAppendingPathComponent:@"Library"]; -#endif - lPath = [lPath stringByAppendingPathComponent:@"WOxElemBuilders-4.3"]; - + lPath = [[pathes objectAtIndex:i] stringByAppendingPathComponent:relPath]; if (![fm fileExistsAtPath:lPath isDirectory:&isDir]) continue; if (!isDir) @@ -119,9 +121,11 @@ /* look into FHS pathes */ + relPath = [NSString stringWithFormat:@"lib/sope-%i.%i/wox-builders/", + SOPE_MAJOR_VERSION, SOPE_MINOR_VERSION]; pathes = [NSArray arrayWithObjects: - @"/usr/local/lib/sope-4.3/wox-builders/", - @"/usr/lib/sope-4.3/wox-builders/", + [@"/usr/local/" stringByAppendingString:relPath], + [@"/usr/" stringByAppendingString:relPath], nil]; for (i = 0; i < [pathes count]; i++) { NSString *lPath; diff --git a/sope-appserver/NGObjWeb/Version b/sope-appserver/NGObjWeb/Version index 3c3f9fab..0aff0f28 100644 --- a/sope-appserver/NGObjWeb/Version +++ b/sope-appserver/NGObjWeb/Version @@ -1,6 +1,6 @@ # version file -SUBMINOR_VERSION:=38 +SUBMINOR_VERSION:=39 # v4.2.413 requires libSaxObjC v4.2.33 # v4.2.341 requires libNGExtensions v4.2.77 diff --git a/sope-appserver/NGObjWeb/WOCoreApplication.m b/sope-appserver/NGObjWeb/WOCoreApplication.m index 3ae35a49..7245a1a3 100644 --- a/sope-appserver/NGObjWeb/WOCoreApplication.m +++ b/sope-appserver/NGObjWeb/WOCoreApplication.m @@ -715,8 +715,11 @@ static NSMutableArray *activeApps = nil; // THREAD [ma addObject:apath]; } [ma addObject:relPath]; - [ma addObject:@"/usr/local/share/sope-4.3/ngobjweb/"]; - [ma addObject:@"/usr/share/sope-4.3/ngobjweb/"]; + + relPath = [NSString stringWithFormat:@"share/sope-%i.%i/ngobjweb/", + SOPE_MAJOR_VERSION, SOPE_MINOR_VERSION]; + [ma addObject:[@"/usr/local/" stringByAppendingString:relPath]]; + [ma addObject:[@"/usr/" stringByAppendingString:relPath]]; return ma; } diff --git a/sope-appserver/NGObjWeb/WOMessage.m b/sope-appserver/NGObjWeb/WOMessage.m index 08350006..e3fb0019 100644 --- a/sope-appserver/NGObjWeb/WOMessage.m +++ b/sope-appserver/NGObjWeb/WOMessage.m @@ -18,7 +18,6 @@ Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ -// $Id: WOMessage.m 4 2004-08-20 17:04:31Z helge $ #include #include diff --git a/sope-appserver/NGObjWeb/subdirs.make b/sope-appserver/NGObjWeb/subdirs.make new file mode 100644 index 00000000..dff4a40c --- /dev/null +++ b/sope-appserver/NGObjWeb/subdirs.make @@ -0,0 +1,20 @@ +# common settings for SOPE subdirs + +include $(GNUSTEP_MAKEFILES)/common.make +include ../../Version +include ../Version + +ADDITIONAL_CPPFLAGS += \ + -Wall -DCOMPILE_FOR_GSTEP_MAKE=1 \ + -DSOPE_MAJOR_VERSION=$(MAJOR_VERSION) \ + -DSOPE_MINOR_VERSION=$(MINOR_VERSION) \ + -DSOPE_SUBMINOR_VERSION=$(SUBMINOR_VERSION) + +ADDITIONAL_INCLUDE_DIRS += \ + -I.. \ + -I../DynamicElements/ \ + -I../.. \ + -I../../../sope-core \ + -I../../../sope-core/NGStreams \ + -I../../../sope-core/NGExtensions \ + -I../../../sope-xml -- 2.39.5