From: Kern Sibbald Date: Sun, 14 Mar 2010 18:21:59 +0000 (+0100) Subject: Add bat=no make option on Win32 X-Git-Tag: Release-5.2.1~1592 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=39b55e352b8152077d31fe9d13c1b61803aae01c;p=bacula%2Fbacula Add bat=no make option on Win32 --- diff --git a/bacula/src/win32/Makefile b/bacula/src/win32/Makefile index 52b4c91efa..e3ce8d880d 100644 --- a/bacula/src/win32/Makefile +++ b/bacula/src/win32/Makefile @@ -1,10 +1,20 @@ +# +# Makefile for Win32/Win64 Bacula File daemon +# +# If called make win64=yes the Win64 version will be built +# otherwise the Win32 version will be built. +# +# If called with bat=no, bat will not be built, otherwise it will be +# built. +# + ECHO_CMD=@ WIN32_DIRS=lib filed filed/plugins console scripts WIN64_DIRS=lib filed filed/plugins console scripts -ifeq ($(WIN64),yes) +ifeq ($(win64),yes) DIRS=$(WIN64_DIRS) INSTALLER=win64_installer SPECIAL=bsmtp @@ -14,6 +24,10 @@ else SPECIAL=bat bsmtp endif +ifeq ($(bat),no) + SPECIAL=bsmtp +endif + .PHONY: $(DIRS) clean all Makefile.inc win32_installer full_win32_installer \ win64_installer bsmtp @@ -97,7 +111,8 @@ Makefile.inc: BUILDDIR=`(pwd)`; \ MAINDIR=`(cd ../..;pwd)`; \ sed \ - -e "s^@WIN64@^$${WIN64}^" \ + -e "s^@WIN64@^$${win64}^" \ + -e "s^@BAT@^$${bat}^" \ -e "s^@WIN32DEPKGS@^$${DEPKGSDIR}^" \ -e "s^@WIN32DEPKGS32@^$${DEPKGSDIR32}^" \ -e "s^@WIN32BUILDDIR@^$${BUILDDIR}^" \ diff --git a/bacula/src/win32/Makefile.inc.in b/bacula/src/win32/Makefile.inc.in index e65b83733b..784d934a70 100644 --- a/bacula/src/win32/Makefile.inc.in +++ b/bacula/src/win32/Makefile.inc.in @@ -63,6 +63,14 @@ else OBJDIR := obj32 endif +bat=@BAT@ + +ifeq ($(bat),no) + BUILD_BAT=no +else + BUILD_BAT=yes +endif + OBJDIRS := obj32 obj64 LDFLAGS := -g -Wall -mno-cygwin -Wl,--disable-auto-import @@ -78,44 +86,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/makeall b/bacula/src/win32/makeall index 62640cbdca..c23d887f5d 100755 --- a/bacula/src/win32/makeall +++ b/bacula/src/win32/makeall @@ -4,4 +4,4 @@ make clean make # # Build win64 Bacula -make WIN64=yes +make win64=yes diff --git a/bacula/src/win32/win32_installer/Makefile b/bacula/src/win32/win32_installer/Makefile index 5d70841c7a..2c5bc005cf 100644 --- a/bacula/src/win32/win32_installer/Makefile +++ b/bacula/src/win32/win32_installer/Makefile @@ -14,18 +14,26 @@ DEFINES := \ -DOUT_DIR=..\\release32 \ -DSRC_DIR=release32 \ -DBUILD_TOOLS=MinGW32 \ - -DWINVER=32 + -DWINVER=32 \ + -DBUILD_BAT=$(BUILD_BAT) INSTALL_EXE := $(BUILDDIR)/release32/winbacula-$(VERSION).exe -BACULA_BINARIES := \ +BACULABINARIES := \ bacula.dll \ exchange-fd.dll \ bacula-fd.exe \ bconsole.exe \ bsleep.exe \ bsmtp.exe \ - bat.exe + +ifeq ($(bat),no) + BACULA_BINARIES=$(BACULABINARIES) + HELP= +else + BACULA_BINARIES=$(BACULABINARIES) bat.exe + HELP=help +endif DEPKGS_BINARIES := \ libeay32.dll \ @@ -64,23 +72,27 @@ DOC_FILES := \ docs/manuals/en/problems/problems.pdf \ docs/manuals/en/utility/utility.pdf -HELP_FILES := help/* - ########################################################################## # Targets .PHONY: all clean installer -all: $(INSTALL_EXE) +all: $(HELP) $(INSTALL_EXE) -installer: $(INSTALL_EXE) +installer: $(HELP) $(INSTALL_EXE) clean: @echo "Cleaning `pwd`" $(CMD_ECHO)-rm -f $(INSTALL_EXE) $(CMD_ECHO)-rm -rf release32 +help: + rm -rf release32/help + mkdir release32/help + cp -f $(BINDIR)/help/* release32/help/ + + # # Rules # @@ -127,10 +139,8 @@ $(foreach file,$(DOC_FILES),$(eval $(call Copy_Docs,$(file)))) $(INSTALL_EXE): winbacula.nsi $(addprefix release32/,$(BACULA_BINARIES) $(SCRIPT_FILES) $(CAT_FILES) $(DEPKGS_BINARIES) $(NONGCC_BINARIES) $(NONGCC_LIBRARIES) $(MINGW_BINARIES) $(SSL_FILES) $(DIRD_FILES) $(DOC_FILES)) - rm -rf release32/help - mkdir release32/help - cp -f $(BINDIR)/$(HELP_FILES) release32/help/ NSISDIR=$(NSIS_DIR) \ + echo "$(NSIS_DIR)/makensis -V3 $(DEFINES) winbacula.nsi" $(NSIS_DIR)/makensis -V3 $(DEFINES) winbacula.nsi include $(BUILDDIR)/Makefile.rules diff --git a/bacula/src/win32/win32_installer/winbacula.nsi b/bacula/src/win32/win32_installer/winbacula.nsi index eff5b904d3..2e0d668df7 100644 --- a/bacula/src/win32/win32_installer/winbacula.nsi +++ b/bacula/src/win32/win32_installer/winbacula.nsi @@ -499,6 +499,7 @@ Section "Bat Console" SecBatConsole SetOutPath "$INSTDIR" +!if "${BUILD_BAT}" == "yes" Call InstallCommonFiles File "${SRC_DIR}\QtCore4.dll" File "${SRC_DIR}\QtGui4.dll" @@ -518,6 +519,8 @@ Section "Bat Console" SecBatConsole ; Create Start Menu entry CreateShortCut "$SMPROGRAMS\Bacula\Bat.lnk" "$INSTDIR\bat.exe" '-c "$INSTDIR\bat.conf"' "$INSTDIR\bat.exe" 0 CreateShortCut "$SMPROGRAMS\Bacula\Configuration\Edit Bat Configuration.lnk" "write.exe" '"$INSTDIR\bat.conf"' +!endif + SectionEnd