]> git.sur5r.net Git - bacula/bacula/commitdiff
Add bat=no make option on Win32
authorKern Sibbald <kern@sibbald.com>
Sun, 14 Mar 2010 18:21:59 +0000 (19:21 +0100)
committerEric Bollengier <eric@eb.homelinux.org>
Mon, 2 Aug 2010 14:49:40 +0000 (16:49 +0200)
bacula/src/win32/Makefile
bacula/src/win32/Makefile.inc.in
bacula/src/win32/makeall
bacula/src/win32/win32_installer/Makefile
bacula/src/win32/win32_installer/winbacula.nsi

index 52b4c91efaf32f93a17fcb67ad737ce15de36b7f..e3ce8d880d2526b7949d946b4dd9d9a414a5ab2a 100644 (file)
@@ -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}^" \
index e65b83733b88a5f1d14fd5c926e38aa3ff8f7d4d..784d934a708b322f3d3f501eb4831d134f49b739 100644 (file)
@@ -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
index 62640cbdcab20228f4de2d1fcb9561a3857173c4..c23d887f5d4994588e8d9ab78ef6715181fb9d7e 100755 (executable)
@@ -4,4 +4,4 @@ make clean
 make
 #
 # Build win64 Bacula
-make WIN64=yes
+make win64=yes
index 5d70841c7a732e161f3ed7b83d2ac434597a8112..2c5bc005cf417cf76217c6f48ba3d4b3d54d1cbd 100644 (file)
@@ -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
index eff5b904d35e38e05dd4873810707fb93c8206b9..2e0d668df77e119a0d4380a4781685779ff718e5 100644 (file)
@@ -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