]> git.sur5r.net Git - bacula/bacula/blobdiff - bacula/src/win32/Makefile
Detect the case where logfiles but no databases are being restored.
[bacula/bacula] / bacula / src / win32 / Makefile
index f4a29a9ddb169cc8e8f0485d8941f37334abb851..2b83bdc02b981c3ddf9ddac1745dedf64c42b0ae 100644 (file)
@@ -1,27 +1,72 @@
 ECHO_CMD=@
 
-DIRS=  dll \
+DIRS=  lib \
+       cats \
        filed \
+       filed/plugins \
        dird \
        stored \
        console \
        wx-console \
-       tools
+       tools \
+       scripts
 
-.PHONY: $(DIRS) clean all
+.PHONY: $(DIRS) clean all Makefile.inc installer newinstaller
 
-all: Makefile.inc $(DIRS)
+all: Makefile.inc $(DIRS) installer newinstaller
 
-clean: $(DIRS)
+clean: $(DIRS) installer newinstaller
        $(ECHO_CMD)-rm -rf release
 
+newinstaller:
+       @if test -f Makefile.inc; then \
+          if $(MAKE) -C $@ $(MAKECMDGOALS); then \
+               echo "\n===== Make of $@ succeeded =====\n\n" ; \
+          else  \
+               echo "\n!!!!! Make of $@ failed !!!!!\n\n" ; \
+          fi ; \
+       fi
+
+installer:
+       @if test -f Makefile.inc; then \
+          if $(MAKE) -C $@ $(MAKECMDGOALS); then \
+               echo "\n===== Make of $@ succeeded =====\n\n" ; \
+          else  \
+               echo "\n!!!!! Make of $@ failed !!!!!\n\n" ; \
+          fi ; \
+       fi
+
 $(DIRS):
-       @if $(MAKE) -C $@ $(MAKECMDGOALS); then \
-               echo -e "\n===== Make of $@ succeeded =====\n\n" ; \
-       else \
-               echo -e "\n!!!!! Make of $@ failed !!!!!\n\n" ; \
+       @if test -f Makefile.inc; then \
+          if $(MAKE) -C $@ $(MAKECMDGOALS); then \
+               echo "\n===== Make of $@ succeeded =====\n\n" ; \
+          else  \
+               echo "\n!!!!! Make of $@ failed !!!!!\n\n" ; \
+          fi ; \
        fi
 
-Makefile.inc: Makefile.inc.cross
+Makefile.inc:
        @echo Creating $@
-       $(ECHO_CMD)sed -e "s^@TOPDIR@^`(cd ../../..;pwd)`^" < Makefile.inc.cross > $@
+       $(ECHO_CMD)TOPDIR=`(cd ../../..;pwd)`; \
+       if test -e ../../../cross-tools/mingw32/bin/mingw32-gcc; then \
+               BINDIR=$${TOPDIR}/cross-tools/mingw32/bin; \
+               INCDIR=$${TOPDIR}/cross-tools/mingw32/mingw32/include; \
+               DLLDIR=$${TOPDIR}/cross-tools/mingw32/mingw32/bin; \
+       elif test -e /mingw/bin/mingw32-gcc; then \
+               BINDIR=/mingw/bin; \
+               INCDIR=/mingw/include; \
+               DLLDIR=/mingw/bin; \
+       else \
+               echo "\nThe GCC cross compiler isn't installed."; \
+               echo "You must run build-win32-cross-tools and build-dependencies first.\n"; \
+               exit 1; \
+       fi ; \
+       BUILDDIR=`(pwd)`; \
+       MAINDIR=`(cd ../..;pwd)`; \
+       sed \
+               -e "s^@WIN32BUILDDIR@^$${BUILDDIR}^" \
+               -e "s^@WIN32MAINDIR@^$${MAINDIR}^" \
+               -e "s^@WIN32TOPDIR@^$${TOPDIR}^" \
+               -e "s^@WIN32BINDIR@^$${BINDIR}^" \
+               -e "s^@WIN32INCDIR@^$${INCDIR}^" \
+               -e "s^@WIN32DLLDIR@^$${DLLDIR}^" < Makefile.inc.in > $@