From 0f215765334041458a68436304c5a7804a696769 Mon Sep 17 00:00:00 2001 From: Kern Sibbald Date: Sun, 5 Apr 2009 08:34:49 +0000 Subject: [PATCH] Fix Win32 make clean to clean correctly git-svn-id: https://bacula.svn.sourceforge.net/svnroot/bacula/trunk@8689 91ce42f0-d328-0410-95d8-f526ca767f89 --- bacula/src/version.h | 6 ++-- bacula/src/win32/Makefile | 2 +- bacula/src/win32/Makefile.inc.in | 45 ++++++++++++++----------- bacula/src/win32/cats/Makefile | 2 ++ bacula/src/win32/console/Makefile | 1 + bacula/src/win32/dird/Makefile | 1 + bacula/src/win32/filed/Makefile | 3 +- bacula/src/win32/filed/plugins/Makefile | 3 +- bacula/src/win32/lib/Makefile | 1 + bacula/src/win32/scripts/Makefile | 1 + bacula/src/win32/stored/Makefile | 3 +- bacula/src/win32/tools/Makefile | 1 + bacula/src/win32/wx-console/Makefile | 3 +- bacula/technotes | 4 ++- 14 files changed, 48 insertions(+), 28 deletions(-) diff --git a/bacula/src/version.h b/bacula/src/version.h index 0bf8211ac9..d4c9f4fce6 100644 --- a/bacula/src/version.h +++ b/bacula/src/version.h @@ -3,9 +3,9 @@ */ #undef VERSION -#define VERSION "2.5.44" -#define BDATE "04 April 2009" -#define LSMDATE "04Apr09" +#define VERSION "3.0.0" +#define BDATE "05 April 2009" +#define LSMDATE "05Apr09" #define PROG_COPYRIGHT "Copyright (C) %d-2009 Free Software Foundation Europe e.V.\n" #define BYEAR "2009" /* year for copyright messages in progs */ diff --git a/bacula/src/win32/Makefile b/bacula/src/win32/Makefile index 3552224f4b..171b5fe15c 100644 --- a/bacula/src/win32/Makefile +++ b/bacula/src/win32/Makefile @@ -33,7 +33,7 @@ endif all: Makefile.inc $(DIRS) $(SPECIAL) $(INSTALLER) clean: $(DIRS) win32_installer newinstaller win64_installer - $(ECHO_CMD)-rm -rf release + $(ECHO_CMD)-rm -rf release32 release64 newinstaller: @if test -f Makefile.inc; then \ diff --git a/bacula/src/win32/Makefile.inc.in b/bacula/src/win32/Makefile.inc.in index 3cf3d1f2ad..e65b83733b 100644 --- a/bacula/src/win32/Makefile.inc.in +++ b/bacula/src/win32/Makefile.inc.in @@ -3,8 +3,13 @@ # 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 +# Split Win32 and Win64 objects and binaries. However +# the clean is a significant kludge -- hard coded. +# The object directories are deleted during make clean, +# so don't point them to any source directory. # # Global Configuration @@ -58,6 +63,8 @@ else OBJDIR := obj32 endif +OBJDIRS := obj32 obj64 + LDFLAGS := -g -Wall -mno-cygwin -Wl,--disable-auto-import INCLUDE_DDK := -I$(MINGW_INCLUDE)/ddk @@ -71,44 +78,44 @@ INCLUDE_WX := -I$(DEPKGS)/lib/wx_dll/msw -I$(DEPKGS)/include INCLUDE_MYSQL := -I$(DEPKGS)/include/mysql LIBS_DB := \ - $(DEPKGS)/lib/libdb.a + $(DEPKGS)/lib/libdb.a LIBS_PTHREADS := \ - $(DEPKGS)/lib/libpthreadGCE.a + $(DEPKGS)/lib/libpthreadGCE.a LIBS_ZLIB := \ - $(DEPKGS)/lib/libz.a + $(DEPKGS)/lib/libz.a LIBS_MYSQL := \ - $(DEPKGS)/lib/libmysql.a + $(DEPKGS)/lib/libmysql.a LIBS_POSTGRESQL := \ - $(DEPKGS)/lib/libpq.a + $(DEPKGS)/lib/libpq.a LIBS_SQLITE := \ - $(DEPKGS)/lib/libsqlite3.a + $(DEPKGS)/lib/libsqlite3.a LIBS_SSL := \ - $(DEPKGS)/lib/libssl.dll.a + $(DEPKGS)/lib/libssl.dll.a LIBS_CRYPTO := \ - $(DEPKGS)/lib/libcrypto.dll.a + $(DEPKGS)/lib/libcrypto.dll.a LIBS_WX := \ - $(DEPKGS)/lib/wx_dll/libwxmsw28_core.a \ - $(DEPKGS)/lib/wx_dll/libwxbase28.a + $(DEPKGS)/lib/wx_dll/libwxmsw28_core.a \ + $(DEPKGS)/lib/wx_dll/libwxbase28.a LIBS_CATS := \ - $(LIBDIR)/libcats.a + $(LIBDIR)/libcats.a LIBS_BACULA := \ - $(LIBDIR)/libbacula.a + $(LIBDIR)/libbacula.a HAVES := \ - -DHAVE_WIN32 \ - -DHAVE_MINGW \ - -DHAVE_ZLIB_H \ - -DHAVE_LIBZ \ - -DHAVE_CRYPTO \ - -DHAVE_OPENSSL \ - -DHAVE_TLS + -DHAVE_WIN32 \ + -DHAVE_MINGW \ + -DHAVE_ZLIB_H \ + -DHAVE_LIBZ \ + -DHAVE_CRYPTO \ + -DHAVE_OPENSSL \ + -DHAVE_TLS diff --git a/bacula/src/win32/cats/Makefile b/bacula/src/win32/cats/Makefile index a713de8516..ee5ef67e87 100644 --- a/bacula/src/win32/cats/Makefile +++ b/bacula/src/win32/cats/Makefile @@ -54,9 +54,11 @@ clean: $(call clean_exe,$(BINDIR)/cats_postgresql.dll) $(call clean_exe,$(BINDIR)/cats_sqlite3.dll) $(ECHO_CMD)rm -f $(OBJDIR)/libcats.exp $(LIBDIR)/libcats.a + $(ECHO_CMD)rm -rf $(OBJDIRS) $(LIBDIR)/libcats.a $(OBJDIR)/libcats.exp: bacula_cats.def $(call checkdir,$@) + @mkdir -p $(OBJDIRS) $(DLLTOOL) --dllname bacula_cats.dll --no-export-all-symbols --input-def bacula_cats.def --output-exp $(OBJDIR)/libcats.exp --output-lib $(LIBDIR)/libcats.a $^ $(BINDIR)/cats_mysql.dll: $(addprefix $(OBJDIR)/cats_mysql/,mysql.o $(SQL_OBJS)) $(OBJDIR)/libcats.exp diff --git a/bacula/src/win32/console/Makefile b/bacula/src/win32/console/Makefile index fac55b5329..4dc0e2e95a 100644 --- a/bacula/src/win32/console/Makefile +++ b/bacula/src/win32/console/Makefile @@ -42,6 +42,7 @@ clean: @echo "Cleaning `pwd`" $(call clean_obj,$(ALL_OBJS)) $(call clean_exe,$(BINDIR)/bconsole.exe) + $(ECHO_CMD)rm -rf $(OBJDIRS) # # Rules diff --git a/bacula/src/win32/dird/Makefile b/bacula/src/win32/dird/Makefile index b06b130d56..de32b1da09 100644 --- a/bacula/src/win32/dird/Makefile +++ b/bacula/src/win32/dird/Makefile @@ -97,6 +97,7 @@ clean: @echo "Cleaning `pwd`" $(call clean_obj,$(ALL_OBJS)) $(call clean_exe,$(BINDIR)/bacula-dir.exe) + $(ECHO_CMD)rm -rf $(OBJDIRS) # # Rules diff --git a/bacula/src/win32/filed/Makefile b/bacula/src/win32/filed/Makefile index e0e621db67..32cc1c0534 100644 --- a/bacula/src/win32/filed/Makefile +++ b/bacula/src/win32/filed/Makefile @@ -60,7 +60,7 @@ ALL_OBJS = $(FILED_OBJS) FILED_LIBS = \ $(LIBS_PTHREADS) \ $(LIBS_ZLIB) \ - $(LIBS_NETWORK) \ + $(LIBS_NETWORK) \ -lole32 \ -loleaut32 \ -luuid \ @@ -78,6 +78,7 @@ clean: @echo "Cleaning `pwd`" $(call clean_obj,$(ALL_OBJS)) $(call clean_exe,$(BINDIR)/bacula-fd.exe) + $(ECHO_CMD)rm -rf $(OBJDIRS) # # Rules diff --git a/bacula/src/win32/filed/plugins/Makefile b/bacula/src/win32/filed/plugins/Makefile index 1f48f65f61..a3ab49752c 100644 --- a/bacula/src/win32/filed/plugins/Makefile +++ b/bacula/src/win32/filed/plugins/Makefile @@ -47,7 +47,7 @@ LIBS_DLL = \ $(LIBS_CRYPTO) \ $(LIBS_PTHREADS) \ $(LIBS_ZLIB) \ - $(LIBS_NETWORK) \ + $(LIBS_NETWORK) \ -lole32 \ -loleaut32 \ -luuid @@ -65,6 +65,7 @@ clean: $(call clean_obj,$(EXCHANGE_OBJS)) $(call clean_exe,$(BINDIR)/exchange-fd.dll) $(ECHO_CMD)rm -f $(OBJDIR)/exchange-fd.a $(LIBDIR)/libexchange-fd.a + $(ECHO_CMD)rm -rf $(OBJDIRS) # # Rules for generating from ../lib diff --git a/bacula/src/win32/lib/Makefile b/bacula/src/win32/lib/Makefile index 15da369e93..7fb9412d8a 100644 --- a/bacula/src/win32/lib/Makefile +++ b/bacula/src/win32/lib/Makefile @@ -127,6 +127,7 @@ clean: $(call clean_obj,$(ALL_OBJS)) $(call clean_exe,$(BINDIR)/bacula.dll) $(ECHO_CMD)rm -f $(OBJDIR)/bacula.a $(LIBDIR)/libbacula.a + $(ECHO_CMD)rm -rf $(OBJDIRS) # # Rules for generating from ../lib diff --git a/bacula/src/win32/scripts/Makefile b/bacula/src/win32/scripts/Makefile index 46935bc24a..a0f844e9ad 100644 --- a/bacula/src/win32/scripts/Makefile +++ b/bacula/src/win32/scripts/Makefile @@ -27,6 +27,7 @@ clean: @echo "Cleaning `pwd`" $(call clean_obj,$(ALL_OBJS)) $(call clean_exe,$(BINDIR)/bsleep.exe) + $(ECHO_CMD)rm -rf $(OBJDIRS) # # Rules diff --git a/bacula/src/win32/stored/Makefile b/bacula/src/win32/stored/Makefile index 9acc4d870e..443bf4451f 100644 --- a/bacula/src/win32/stored/Makefile +++ b/bacula/src/win32/stored/Makefile @@ -95,7 +95,7 @@ ALL_OBJS = \ LIBS_STORED = \ $(LIBS_PTHREADS) \ - $(LIBS_NETWORK) \ + $(LIBS_NETWORK) \ -lole32 \ -loleaut32 \ -luuid \ @@ -119,6 +119,7 @@ clean: $(call clean_exe,$(BINDIR)/bls.exe) $(call clean_exe,$(BINDIR)/bscan.exe) $(call clean_exe,$(BINDIR)/btape.exe) + $(ECHO_CMD)rm -rf $(OBJDIRS) realclean: clean rm -f tags bacula-sd.conf diff --git a/bacula/src/win32/tools/Makefile b/bacula/src/win32/tools/Makefile index 84fabca276..a5757123ac 100644 --- a/bacula/src/win32/tools/Makefile +++ b/bacula/src/win32/tools/Makefile @@ -71,6 +71,7 @@ clean: $(call clean_exe,$(BINDIR)/testls.exe) $(call clean_exe,$(BINDIR)/bregex.exe) $(call clean_exe,$(BINDIR)/bwild.exe) + $(ECHO_CMD)rm -rf $(OBJDIRS) # # Rules diff --git a/bacula/src/win32/wx-console/Makefile b/bacula/src/win32/wx-console/Makefile index 14c9535456..561d019df4 100755 --- a/bacula/src/win32/wx-console/Makefile +++ b/bacula/src/win32/wx-console/Makefile @@ -52,7 +52,7 @@ ALL_OBJS = $(CONSOLE_OBJS) CONSOLE_LIBS = \ $(LIBS_WX) \ - $(LIBS_NETWORK) \ + $(LIBS_NETWORK) \ -lcomctl32 \ -lole32 \ -loleaut32 \ @@ -70,6 +70,7 @@ clean: $(call clean_obj,$(ALL_OBJS)) $(call clean_exe,$(BINDIR)/bwx-console.exe) $(call clean_exe,$(BINDIR)/wx-console.exe) + $(ECHO_CMD)rm -rf $(OBJDIRS) # # Rules diff --git a/bacula/technotes b/bacula/technotes index 88e62e029c..9a599d95e8 100644 --- a/bacula/technotes +++ b/bacula/technotes @@ -2,8 +2,10 @@ General: -04Apr09 +05Apr09 +kes Fix Win32 make clean to clean correctly kes Cleanup Win installer dialog messages a bit ... +04Apr09 kes Separate object/binaries in Win32 and Win64 builds. More to be done. kes Add bconsole to Win64 installer. 03Apr09 -- 2.39.5