From 19d132c8f6f5a15378d358069c0c893dbdb275a4 Mon Sep 17 00:00:00 2001 From: aafemt Date: Fri, 11 May 2007 06:40:19 +0000 Subject: [PATCH] Fix MinGW build --- builds/posix/Makefile.in.client.gbak | 2 +- builds/posix/Makefile.in.client.gfix | 2 +- builds/posix/Makefile.in.client.gpre | 3 ++- builds/posix/Makefile.in.client.isql | 2 +- builds/posix/Makefile.in.client.qli | 2 +- builds/posix/Makefile.in.client.util | 10 +++++----- builds/posix/Makefile.in.embed.gbak | 2 +- builds/posix/Makefile.in.embed.gfix | 2 +- builds/posix/Makefile.in.embed.gpre | 2 +- builds/posix/Makefile.in.embed.isql | 2 +- builds/posix/Makefile.in.embed.qli | 2 +- builds/posix/Makefile.in.intl | 14 +++++++++++--- builds/posix/Makefile.in.libfbclient | 5 +---- builds/posix/make.shared.variables | 11 +++++------ 14 files changed, 33 insertions(+), 28 deletions(-) diff --git a/builds/posix/Makefile.in.client.gbak b/builds/posix/Makefile.in.client.gbak index 2dee552b6f..7f4996e645 100644 --- a/builds/posix/Makefile.in.client.gbak +++ b/builds/posix/Makefile.in.client.gbak @@ -42,7 +42,7 @@ include $(ROOT)/gen/make.shared.variables GBAK_Other_Sources = remote/xdr.cpp jrd/sdl.cpp\ - common/classes/MetaName.cpp jrd/os/posix/path_utils.cpp + common/classes/MetaName.cpp jrd/path_utils.cpp GBAK_Files = backup.epp restore.epp \ burp.cpp canonical.cpp misc.cpp mvol.cpp GBAK_Sources = $(addprefix burp/, $(GBAK_Files)) $(GBAK_Other_Sources) diff --git a/builds/posix/Makefile.in.client.gfix b/builds/posix/Makefile.in.client.gfix index 18c1895a45..9b75c233ca 100644 --- a/builds/posix/Makefile.in.client.gfix +++ b/builds/posix/Makefile.in.client.gfix @@ -40,7 +40,7 @@ include $(ROOT)/gen/make.shared.variables @SET_MAKE@ -GFIX_Other_Sources = jrd/isc.cpp jrd/ThreadData.cpp jrd/os/posix/path_utils.cpp +GFIX_Other_Sources = jrd/isc.cpp jrd/ThreadData.cpp jrd/path_utils.cpp GFIX_Files = alice_meta.epp alice.cpp all.cpp exe.cpp tdr.cpp GFIX_Sources = $(addprefix alice/, $(GFIX_Files)) $(GFIX_Other_Sources) diff --git a/builds/posix/Makefile.in.client.gpre b/builds/posix/Makefile.in.client.gpre index b0943f1ca0..bc4d7fa68c 100644 --- a/builds/posix/Makefile.in.client.gpre +++ b/builds/posix/Makefile.in.client.gpre @@ -30,6 +30,7 @@ # ROOT=.. ObjModuleType=std +CFLAGS+=-DSTD_UTIL include $(ROOT)/gen/make.defaults include $(ROOT)/gen/make.platform @@ -38,7 +39,7 @@ include $(ROOT)/gen/make.shared.variables @SET_MAKE@ -GPRE_Other_Sources = jrd/dsc.cpp jrd/isc.cpp jrd/os/posix/path_utils.cpp +GPRE_Other_Sources = jrd/dsc.cpp jrd/isc.cpp jrd/path_utils.cpp GPRE_Files = gpre_meta.epp \ cmd.cpp cme.cpp cmp.cpp c_cxx.cpp exp.cpp gpre.cpp \ hsh.cpp int_cxx.cpp jrdmet.cpp movg.cpp msc.cpp par.cpp \ diff --git a/builds/posix/Makefile.in.client.isql b/builds/posix/Makefile.in.client.isql index c52e2ecf85..9055fa25ed 100644 --- a/builds/posix/Makefile.in.client.isql +++ b/builds/posix/Makefile.in.client.isql @@ -41,7 +41,7 @@ include $(ROOT)/gen/make.shared.variables unexport ISC_USER unexport ISC_PASSWORD -ISQL_Other_Sources = jrd/os/posix/path_utils.cpp +ISQL_Other_Sources = jrd/path_utils.cpp ISQL_Files = extract.epp isql.epp show.epp Extender.cpp ISQL_Sources = $(addprefix isql/, $(ISQL_Files)) $(ISQL_Other_Sources) ISQL_Objects = $(addprefix $(OBJ)/, $(addsuffix .o, $(basename $(ISQL_Sources)))) diff --git a/builds/posix/Makefile.in.client.qli b/builds/posix/Makefile.in.client.qli index 0908b2bedc..2abbb48afe 100644 --- a/builds/posix/Makefile.in.client.qli +++ b/builds/posix/Makefile.in.client.qli @@ -39,7 +39,7 @@ include $(ROOT)/gen/make.shared.variables @SET_MAKE@ -QLI_Other_Sources = jrd/dsc.cpp gpre/pretty.cpp jrd/os/posix/path_utils.cpp +QLI_Other_Sources = jrd/dsc.cpp gpre/pretty.cpp jrd/path_utils.cpp QLI_Files= all.cpp command.cpp compile.cpp dtr.cpp err.cpp eval.cpp \ expand.cpp exe.cpp format.cpp gener.cpp help.cpp \ diff --git a/builds/posix/Makefile.in.client.util b/builds/posix/Makefile.in.client.util index ad518a4905..9500ae8d69 100644 --- a/builds/posix/Makefile.in.client.util +++ b/builds/posix/Makefile.in.client.util @@ -76,7 +76,6 @@ GSTAT_Files = dba.epp ppg.cpp GSTAT_Sources = $(addprefix utilities/gstat/, $(GSTAT_Files)) $(GSTAT_Other_Sources) GSTAT_Objects = $(addprefix $(OBJ)/, $(addsuffix .o, $(basename $(GSTAT_Sources)))) $(CLUMPLETS_Objects) - FBSVCMGR_Files= fbsvcmgr.cpp FBSVCMGR_Other_Sources = common/classes/fb_string.cpp common/classes/alloc.cpp \ common/fb_exception.cpp common/utils.cpp @@ -86,7 +85,7 @@ FBSVCMGR_Objects = $(addprefix $(OBJ)/, $(addsuffix .o, $(basename $(FBSVCMGR_So $(FBCLASSES_MsgObjects) $(CLUMPLETS_Objects) -FBGUARD_Other_Sources = jrd/isc.cpp jrd/divorce.cpp jrd/os/posix/path_utils.cpp +FBGUARD_Other_Sources = jrd/isc.cpp jrd/divorce.cpp jrd/path_utils.cpp FBGUARD_Files = guard.cpp util.cpp FBGUARD_Sources = $(addprefix utilities/guard/, $(FBGUARD_Files)) $(FBGUARD_Other_Sources) FBGUARD_Objects = $(addprefix $(OBJ)/, $(addsuffix .o, $(basename $(FBGUARD_Sources)))) @@ -99,8 +98,7 @@ IBGUARD_B_Files = os/win32/chop.cpp IBGUARD_B_Sources = $(addprefix remote/, $(IBGUARD_B_Files)) IBGUARD_B_Objects = $(addprefix $(OBJ)/, $(addsuffix .o, $(basename $(IBGUARD_B_Sources)))) - -FBMGR_Other_Sources = jrd/os/posix/path_utils.cpp +FBMGR_Other_Sources = jrd/path_utils.cpp FBMGR_Files = ibmgr.cpp srvrmgr.cpp FBMGR_Sources = $(addprefix utilities/ibmgr/, $(FBMGR_Files)) $(FBMGR_Other_Sources) FBMGR_Objects = $(addprefix $(OBJ)/, $(addsuffix .o, $(basename $(FBMGR_Sources)))) @@ -125,6 +123,8 @@ RELAY_Files = relay.cpp RELAY_Sources = $(addprefix utilities/, $(RELAY_Files)) RELAY_Objects = $(addprefix $(OBJ)/, $(addsuffix .o, $(basename $(RELAY_Sources)))) +# Override shared variable to exclude TempFile.cpp +FBCLASSES_ClientFiles=alloc.cpp locks.cpp fb_string.cpp timestamp.cpp AllObjects = $(CREATEDB_Object) $(DROP_Object) $(GSTAT_Object) $(FBGUARD_Objects) \ $(FBMGR_Objects) $(REBUILD_Objects) $(RELAY_Objects) $(FBSVCMGR_Objects) @@ -207,7 +207,7 @@ $(INSTREG): $(INSTREG_Objects) instsvc: $(INSTSVC) $(INSTSVC): $(INSTSVC_Objects) - $(LD) $(LINK_OPTS) $^ -o $@ -L$(LIB) $(FBCLASSES_ClientObjects) $(FBCOMMON_Objects) $(LINK_LIBS) + $(LD) $(LINK_OPTS) $^ -o $@ -L$(LIB) $(FBCLASSES_ClientObjects) $(FBCOMMON_ClientObjects) $(LINK_LIBS) # This one needs a bit of work. diff --git a/builds/posix/Makefile.in.embed.gbak b/builds/posix/Makefile.in.embed.gbak index 17321cd440..934e4bad14 100644 --- a/builds/posix/Makefile.in.embed.gbak +++ b/builds/posix/Makefile.in.embed.gbak @@ -45,7 +45,7 @@ include $(ROOT)/gen/make.shared.variables @SET_MAKE@ -GBAK_Other_Sources = remote/xdr.cpp jrd/sdl.cpp jrd/os/posix/path_utils.cpp +GBAK_Other_Sources = remote/xdr.cpp jrd/sdl.cpp jrd/path_utils.cpp GBAK_Files = backup.epp restore.epp \ burp.cpp canonical.cpp misc.cpp mvol.cpp GBAK_Sources = $(addprefix burp/, $(GBAK_Files)) $(GBAK_Other_Sources) diff --git a/builds/posix/Makefile.in.embed.gfix b/builds/posix/Makefile.in.embed.gfix index 15a21c7bef..1295a462dd 100644 --- a/builds/posix/Makefile.in.embed.gfix +++ b/builds/posix/Makefile.in.embed.gfix @@ -48,7 +48,7 @@ include $(ROOT)/gen/make.shared.variables GFIX_Files = alice_meta.epp \ alice.cpp all.cpp exe.cpp tdr.cpp -GFIX_Other_Sources += jrd/isc.cpp jrd/ThreadData.cpp jrd/os/posix/path_utils.cpp +GFIX_Other_Sources += jrd/isc.cpp jrd/ThreadData.cpp jrd/path_utils.cpp GFIX_Sources = $(addprefix alice/, $(GFIX_Files)) $(GFIX_Other_Sources) GFIX_Objects = $(addprefix $(OBJ)/, $(addsuffix .o, $(basename $(GFIX_Sources)))) diff --git a/builds/posix/Makefile.in.embed.gpre b/builds/posix/Makefile.in.embed.gpre index cc8fc2c493..f1888bc8b5 100644 --- a/builds/posix/Makefile.in.embed.gpre +++ b/builds/posix/Makefile.in.embed.gpre @@ -38,7 +38,7 @@ include $(ROOT)/gen/make.shared.variables @SET_MAKE@ -GPRE_Other_Sources = jrd/dsc.cpp jrd/isc.cpp jrd/os/posix/path_utils.cpp +GPRE_Other_Sources = jrd/dsc.cpp jrd/isc.cpp jrd/path_utils.cpp GPRE_Files = gpre_meta.epp \ cmd.cpp cme.cpp cmp.cpp c_cxx.cpp exp.cpp gpre.cpp \ hsh.cpp int_cxx.cpp jrdmet.cpp movg.cpp msc.cpp par.cpp \ diff --git a/builds/posix/Makefile.in.embed.isql b/builds/posix/Makefile.in.embed.isql index 656cc60773..a7e18bf52e 100644 --- a/builds/posix/Makefile.in.embed.isql +++ b/builds/posix/Makefile.in.embed.isql @@ -41,7 +41,7 @@ include $(ROOT)/gen/make.shared.variables unexport ISC_USER unexport ISC_PASSWORD -ISQL_Other_Sources = jrd/os/posix/path_utils.cpp +ISQL_Other_Sources = jrd/path_utils.cpp ISQL_Files = extract.epp isql.epp show.epp Extender.cpp ISQL_Sources = $(addprefix isql/, $(ISQL_Files)) $(ISQL_Other_Sources) ISQL_Objects = $(addprefix $(OBJ)/, $(addsuffix .o, $(basename $(ISQL_Sources)))) diff --git a/builds/posix/Makefile.in.embed.qli b/builds/posix/Makefile.in.embed.qli index 9fa368dbd2..94e9527d5a 100644 --- a/builds/posix/Makefile.in.embed.qli +++ b/builds/posix/Makefile.in.embed.qli @@ -39,7 +39,7 @@ include $(ROOT)/gen/make.shared.variables @SET_MAKE@ -QLI_Other_Sources = jrd/dsc.cpp gpre/pretty.cpp jrd/os/posix/path_utils.cpp +QLI_Other_Sources = jrd/dsc.cpp gpre/pretty.cpp jrd/path_utils.cpp QLI_Files= all.cpp command.cpp compile.cpp dtr.cpp err.cpp eval.cpp \ expand.cpp exe.cpp format.cpp gener.cpp help.cpp \ diff --git a/builds/posix/Makefile.in.intl b/builds/posix/Makefile.in.intl index 814ea595d9..865965ce71 100644 --- a/builds/posix/Makefile.in.intl +++ b/builds/posix/Makefile.in.intl @@ -50,14 +50,22 @@ INTL_Files1= ld.cpp cv_narrow.cpp \ cs_gb2312.cpp cv_gb2312.cpp lc_gb2312.cpp \ cs_jis.cpp cv_jis.cpp lc_jis.cpp \ cs_ksc.cpp cv_ksc.cpp lc_ksc.cpp \ - cs_icu.cpp cv_icu.cpp lc_icu.cpp \ - ../jrd/IntlUtil.cpp ../jrd/unicode_util.cpp ../jrd/CharSet.cpp + cs_icu.cpp cv_icu.cpp lc_icu.cpp # INTL_Sources = $(INTL_Files1) INTL_Sources = $(addprefix intl/, $(INTL_Files1)) + +# SD: add modules that are not in intl subdir +INTL_Sources += jrd/IntlUtil.cpp jrd/unicode_util.cpp jrd/CharSet.cpp jrd/mod_loader.cpp + INTL_Objects = $(addprefix $(OBJ)/, $(addsuffix .o, $(basename $(INTL_Sources)))) +# SD: Shared variables are overriden to exclude extra files and +# this way fix 'unresolved symbol' errors when some unused routines call +# other routines from not included modules +FBCLASSES_ClientFiles=alloc.cpp locks.cpp fb_string.cpp timestamp.cpp + AllObjects = $(INTL_Objects) Dependencies = $(AllObjects:.o=.d) @@ -75,7 +83,7 @@ all : libfbintl libfbintl : $(LIBFBINTL_SO) -$(LIBFBINTL_SO): $(INTL_Objects) $(FBCOMMON_Objects) $(FBCLASSES_ClientObjects) +$(LIBFBINTL_SO): $(INTL_Objects) $(FBCOMMON_ClientObjects) $(FBCLASSES_ClientObjects) ifeq ($(PLATFORM),DARWIN) $(LIB_LINK) $(LIB_BUNDLE_OPTIONS) \ -o $@ $^ $(SO_LINK_LIBS) @PTHREAD_CFLAGS@ @PTHREAD_LIBS@ diff --git a/builds/posix/Makefile.in.libfbclient b/builds/posix/Makefile.in.libfbclient index 31bb4744cf..16d988a853 100644 --- a/builds/posix/Makefile.in.libfbclient +++ b/builds/posix/Makefile.in.libfbclient @@ -78,9 +78,6 @@ SECURITY_ClientObjects = $(addprefix $(OBJ)/, $(addsuffix .o, $(basename $(SECUR FBUTIL_ClientSources = $(addprefix fbutil/, $(FBUTIL_ClientFiles)) FBUTIL_ClientObjects = $(addprefix $(OBJ)/, $(addsuffix .o, $(basename $(FBUTIL_ClientSources)))) -FBCOMMON_ClientSources = $(addprefix common/, $(FBCOMMON_ClientFiles)) -FBCOMMON_ClientObjects = $(addprefix $(OBJ)/, $(addsuffix .o, $(basename $(FBCOMMON_ClientSources)))) - FBCLIENT_Objects = $(JRD_ClientObjects) \ $(DSQL_ClientObjects) \ @@ -88,7 +85,7 @@ FBCLIENT_Objects = $(JRD_ClientObjects) \ $(GPRELIB_ClientObjects) \ $(SECURITY_ClientObjects) \ $(FBUTIL_ClientObjects) \ - $(FBCOMMON_ClientObjects)\ + $(FBCOMMON_Objects)\ $(FBCLASSES_ClientObjects)\ $(FBCLASSES_MsgObjects)\ $(OS_SPECIFIC_Objects)\ diff --git a/builds/posix/make.shared.variables b/builds/posix/make.shared.variables index c8a144e9be..5b39724856 100644 --- a/builds/posix/make.shared.variables +++ b/builds/posix/make.shared.variables @@ -272,14 +272,13 @@ VULCAN_Objects = $(addprefix $(OBJ)/, $(addsuffix .o, $(basename $(VULCAN_Source # # common -FBCOMMON_ClientFiles = fb_exception.cpp utils.cpp classes/MetaName.cpp -FBCOMMON_ServerFiles = +FBCOMMON_ClientFiles = fb_exception.cpp classes/MetaName.cpp +FBCOMMON_ServerFiles = utils.cpp -FBCOMMON_Files = $(FBCOMMON_ClientFiles) $(FBCOMMON_ServerFiles) - -FBCOMMON_Sources = $(addprefix common/, $(FBCOMMON_Files)) -FBCOMMON_Objects = $(addprefix $(OBJ)/, $(addsuffix .o, $(basename $(FBCOMMON_Sources)))) +FBCOMMON_ClientObjects = $(addprefix $(OBJ)/common/, $(addsuffix .o, $(basename $(FBCOMMON_ClientFiles)))) +FBCOMMON_ServerObjects = $(addprefix $(OBJ)/common/, $(addsuffix .o, $(basename $(FBCOMMON_ServerFiles)))) +FBCOMMON_Objects = $(FBCOMMON_ClientObjects) $(FBCOMMON_ServerObjects) #________________________________________________________________________ #