From b3eaa447d6694e9a0acd28b1a47c8e4c4d42e35d Mon Sep 17 00:00:00 2001 From: Kern Sibbald Date: Wed, 22 Oct 2008 08:19:41 +0000 Subject: [PATCH] kes Modify win32 Makefiles to use full paths in most cases. In particular add MAINDIR environment variable that points to the main Bacula source directory. git-svn-id: https://bacula.svn.sourceforge.net/svnroot/bacula/trunk@7874 91ce42f0-d328-0410-95d8-f526ca767f89 --- bacula/src/win32/Makefile | 4 +++- bacula/src/win32/Makefile.inc.in | 16 +++++++++++++--- bacula/src/win32/Makefile.template | 2 +- bacula/src/win32/cats/Makefile | 5 ++--- bacula/src/win32/console/Makefile | 4 ++-- bacula/src/win32/dird/Makefile | 4 ++-- bacula/src/win32/dll/Makefile | 4 ++-- bacula/src/win32/filed/Makefile | 4 ++-- bacula/src/win32/stored/Makefile | 6 +++--- bacula/src/win32/tools/Makefile | 4 ++-- bacula/src/win32/wx-console/Makefile | 10 +++++----- bacula/technotes-2.5 | 4 ++++ 12 files changed, 41 insertions(+), 26 deletions(-) diff --git a/bacula/src/win32/Makefile b/bacula/src/win32/Makefile index 335114c802..4fd6cd1fe3 100644 --- a/bacula/src/win32/Makefile +++ b/bacula/src/win32/Makefile @@ -1,4 +1,4 @@ -ECHO_CMD=@ +c+ECHO_CMD=@ DIRS= dll \ cats \ @@ -44,8 +44,10 @@ Makefile.inc: Makefile.inc.in exit 1; \ fi ; \ $(ECHO_CMD)BUILDDIR=`(pwd)`; \ + $(ECHO_CMD)MAINDIR=`(cd ../..;pwd)`; \ sed \ -e "s^@BUILDDIR@^$${BUILDDIR}^" \ + -e "s^@MAINDIR@^$${MAINDIR}^" \ -e "s^@TOPDIR@^$${TOPDIR}^" \ -e "s^@BINDIR@^$${BINDIR}^" \ -e "s^@INCDIR@^$${INCDIR}^" \ diff --git a/bacula/src/win32/Makefile.inc.in b/bacula/src/win32/Makefile.inc.in index d072fd76f3..f0dc0352e3 100644 --- a/bacula/src/win32/Makefile.inc.in +++ b/bacula/src/win32/Makefile.inc.in @@ -3,19 +3,29 @@ # Using MinGW cross-compiler on GNU/Linux # # Written by Robert Nelson, June 2006 +# Absolute paths used in place of relative paths +# Kern Sibbald, October 2008 # # Global Configuration ECHO_CMD = @ +# Main Bacula source dir +MAINDIR := @MAINDIR@ +# +# Build dir -- i.e. normally src/win32 BUILDDIR := @BUILDDIR@ +# +# Dir above Bacula where we find depkgs TOPDIR := @TOPDIR@ +# +# where we find depkgs DEPKGS := $(TOPDIR)/depkgs-mingw32 DOCDIR := $(TOPDIR)/docs -BINDIR := ../release -LIBDIR := ../release +BINDIR := $(BUILDDIR)/release +LIBDIR := $(BUILDDIR)/release OBJDIR := . MINGW_BIN := @BINDIR@ @@ -36,7 +46,7 @@ CFLAGS := -g -Wall -mno-cygwin -m32 -mwin32 -mthreads -O3 -fno-strict-aliasing LDFLAGS := -g -Wall -mno-cygwin -Wl,--disable-auto-import INCLUDE_DDK := -I$(MINGW_INCLUDE)/ddk -INCLUDE_BACULA := -I../.. -I../compat +INCLUDE_BACULA := -I$(MAINDIR)/src -I$(BUILDDIR)/compat INCLUDE_PTHREADS := -I$(DEPKGS)/include/pthreads INCLUDE_ZLIB := -I$(DEPKGS)/include INCLUDE_VSS := -I$(DEPKGS)/vss diff --git a/bacula/src/win32/Makefile.template b/bacula/src/win32/Makefile.template index 978221d4ee..c542045ded 100644 --- a/bacula/src/win32/Makefile.template +++ b/bacula/src/win32/Makefile.template @@ -21,7 +21,7 @@ DEFINES = \ $(HAVES) # Replace MODULE with the directory in the main Bacula tree containing the source -VPATH = ../../MODULE +VPATH = $(MAINDIR) ########################################################################## diff --git a/bacula/src/win32/cats/Makefile b/bacula/src/win32/cats/Makefile index 0c2caeab18..1754813dd3 100644 --- a/bacula/src/win32/cats/Makefile +++ b/bacula/src/win32/cats/Makefile @@ -17,8 +17,8 @@ INCLUDES = \ DEFINES = \ $(HAVES) -vpath %.c ../../cats -vpath %.cpp ../../cats +vpath %.c $(MAINDIR)/src/cats +vpath %.cpp $(MAINDIR)/src/cats ###################################################################### @@ -97,4 +97,3 @@ $(eval $(call Link_Dll,cats_mysql,MYSQL)) $(eval $(call Link_Dll,cats_postgresql,POSTGRESQL)) $(eval $(call Link_Dll,cats_sqlite3,SQLITE3)) - diff --git a/bacula/src/win32/console/Makefile b/bacula/src/win32/console/Makefile index 32dbbc6d6c..bf81e02c63 100644 --- a/bacula/src/win32/console/Makefile +++ b/bacula/src/win32/console/Makefile @@ -16,8 +16,8 @@ DEFINES = \ -DUSING_DLL \ $(HAVES) -vpath %.c ../../console -vpath %.cpp ../../console +vpath %.c $(MAINDIR)/src/console +vpath %.cpp $(MAINDIR)/src/console ########################################################################## diff --git a/bacula/src/win32/dird/Makefile b/bacula/src/win32/dird/Makefile index b7c75be29f..acede826d6 100644 --- a/bacula/src/win32/dird/Makefile +++ b/bacula/src/win32/dird/Makefile @@ -21,8 +21,8 @@ DEFINES = \ -DWINVER=0x500 \ $(HAVES) -vpath %.c ../../dird ../libwin32 -vpath %.cpp ../../dird ../libwin32 +vpath %.c $(MAINDIR)/src/dird $(BUILDDIR)/libwin32 +vpath %.cpp $(MAINDIR)/src/dird $(BUILDDIR)/libwin32 ########################################################################## diff --git a/bacula/src/win32/dll/Makefile b/bacula/src/win32/dll/Makefile index 8de657a8f4..71ba6ce448 100644 --- a/bacula/src/win32/dll/Makefile +++ b/bacula/src/win32/dll/Makefile @@ -16,8 +16,8 @@ INCLUDES = \ DEFINES = \ $(HAVES) -vpath %.c ../compat ../../findlib ../../lib -vpath %.cpp ../compat ../../findlib ../../lib +vpath %.c $(BUILDDIR)/compat $(MAINDIR)/src/findlib $(MAINDIR)/src/lib +vpath %.cpp $(BUILDDIR)/compat $(MAINDIR)/src/findlib $(MAINDIR)/src/lib ###################################################################### diff --git a/bacula/src/win32/filed/Makefile b/bacula/src/win32/filed/Makefile index 406f3e8850..d20dbbaea2 100644 --- a/bacula/src/win32/filed/Makefile +++ b/bacula/src/win32/filed/Makefile @@ -23,8 +23,8 @@ DEFINES = \ -DWINVER=0x500 \ $(HAVES) -vpath %.c ../../filed ../libwin32 -vpath %.cpp ../../filed ../libwin32 +vpath %.c $(MAINDIR)/src/filed $(BUILDDIR)/libwin32 +vpath %.cpp $(MAINDIR)/src/filed $(BUILDDIR)/libwin32 ########################################################################## diff --git a/bacula/src/win32/stored/Makefile b/bacula/src/win32/stored/Makefile index 4ac103d83f..52fb25b2f6 100644 --- a/bacula/src/win32/stored/Makefile +++ b/bacula/src/win32/stored/Makefile @@ -11,7 +11,7 @@ include ../Makefile.inc INCLUDES = \ -I. \ - -I../../stored \ + -I$(MAINDIR)/src/stored \ $(INCLUDE_DDK) \ $(INCLUDE_PTHREADS) \ $(INCLUDE_BACULA) \ @@ -25,8 +25,8 @@ DEFINES = \ -DWINVER=0x500 \ $(HAVES) -vpath %.c ../../stored ../libwin32 -vpath %.cpp ../../stored ../libwin32 +vpath %.c $(MAINDIR)/src/stored $(BUILDDIR)/libwin32 +vpath %.cpp $(MAINDIR)/src/stored $(BUILDDIR)/libwin32 ########################################################################## diff --git a/bacula/src/win32/tools/Makefile b/bacula/src/win32/tools/Makefile index 31080f0053..ec9e9aab13 100644 --- a/bacula/src/win32/tools/Makefile +++ b/bacula/src/win32/tools/Makefile @@ -21,8 +21,8 @@ DEFINES = \ LDFLAGS:=$(LDFLAGS) -lstdc++ -vpath %.c ../../tools ../../dird -vpath %.cpp ../../tools ../../dird +vpath %.c $(MAINDIR)/src/tools $(MAINDIR)/src/dird +vpath %.cpp $(MAINDIR)/src/tools $(MAINDIR)/src/dird ########################################################################## diff --git a/bacula/src/win32/wx-console/Makefile b/bacula/src/win32/wx-console/Makefile index bb8a653e32..67ab84a6b3 100755 --- a/bacula/src/win32/wx-console/Makefile +++ b/bacula/src/win32/wx-console/Makefile @@ -24,13 +24,13 @@ DEFINES = \ -D_STAT_DEFINED \ $(HAVES) -vpath %.c ../../wx-console -vpath %.cpp ../../wx-console -vpath %.rc ../../wx-console +vpath %.c $(MAINDIR)/src/wx-console +vpath %.cpp $(MAINDIR)/src/wx-console +vpath %.rc $(MAINDIR)/src/wx-console ########################################################################## -# Files in ../../wx-console +# Files in $(MAINDIR)/src/wx-console CONSOLE_OBJS = \ $(OBJDIR)/authenticate.o \ @@ -81,6 +81,6 @@ $(BINDIR)/bwx-console.exe: $(CONSOLE_OBJS) $(LIBS_BACULA) $(OBJDIR)/wx-console_private.res: wx-console_private.rc @echo "Compiling $@" $(call checkdir,$@) - $(ECHO_CMD)$(WINDRES) $(INCLUDE_ICONS) -I../../wx-console -O coff $< -o $@ + $(ECHO_CMD)$(WINDRES) $(INCLUDE_ICONS) -I$(MAINDIR)/src/wx-console -O coff $< -o $@ include ../Makefile.rules diff --git a/bacula/technotes-2.5 b/bacula/technotes-2.5 index 301f8babde..0a14ce1faa 100644 --- a/bacula/technotes-2.5 +++ b/bacula/technotes-2.5 @@ -50,6 +50,10 @@ libtool on the configure command line with: General: +22Oct08 +kes Modify win32 Makefiles to use full paths in most cases. + In particular add MAINDIR environment variable that points + to the main Bacula source directory. 21Oct08 kes Add read volume list code to SD -- not yet used. kes Add James' binutils patch -- 2.39.5