From: Kern Sibbald Date: Thu, 8 May 2003 12:40:45 +0000 (+0000) Subject: Add DISTDIR everywhere X-Git-Tag: Release-1.31~156 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=a90531d92c8e79edb632ca53bf6ac4e5eeb3a59b;p=bacula%2Fbacula Add DISTDIR everywhere git-svn-id: https://bacula.svn.sourceforge.net/svnroot/bacula/trunk@500 91ce42f0-d328-0410-95d8-f526ca767f89 --- diff --git a/bacula/INSTALL b/bacula/INSTALL index f7dd5d0d7b..b8cc183819 100644 --- a/bacula/INSTALL +++ b/bacula/INSTALL @@ -5,10 +5,11 @@ Using GNU autoconfig in the "doc" directory. 2. Run ./configure to generate config.h and the various Makefiles. - ./configure --help gives a list of possible options with slightly - longer descriptions in README.configure + ./configure --help gives a list of possible options. Note, in + configuring Bacula, you cannot get by with a simple ./configure, + it is much more complicated than that (unfortunately). - You might look at the "defaultconfig" file in the top directory. + You might look at the "defaultconfig" file in the examples directory. It is an example of what is probably reasonable for defaults. Some systems require unusual options for compilation or linking that @@ -26,16 +27,34 @@ Using GNU autoconfig CFLAGS="-g -Wall" ./configure --enable-smartalloc --enable-mysql - see README for a few additional details and the online manual + See the README for a few additional details and the online manual for all the gory details: http://www.bacula.org/html-manual - - 3. set any other main preferences (normally, you don't do this): + 3. Carefully review the output from ./configure. If it is not + what you want, re-run the ./configure. Often ./configure "caches" + things and thus remembers the last ./configure options. If you + want to be sure you are starting fresh after a ./configure, + do a: + + make distclean + + before re-running ./configure. "make distclean" wipes out any + knowledge of the ./configure, so don't do it after you have a + configuration that suits your needs, otherwise the "make" will + not work. + + 4. Set any other main preferences (normally, you don't do this): Edit "config.h" if you didn't use ./configure options If you're cross-compiling, edit the following in "config.h" - 4. Build it (repeat step 2 as desired): + 5. Build it (repeat step 2 as desired): make - 5. Install it + 6. Install it make install + + 7. Run it + cd $HOME/bacula/bin + ./bacula start + ./console + (enter commands) diff --git a/bacula/Makefile.in b/bacula/Makefile.in index 114c5ddc97..a66a26eb19 100755 --- a/bacula/Makefile.in +++ b/bacula/Makefile.in @@ -43,7 +43,7 @@ all: Makefile depend: @for I in ${all_subdirs}; \ - do (cd $$I; echo "==>Entering directory `pwd`"; $(MAKE) $@ || exit 1); done + do (cd $$I; echo "==>Entering directory `pwd`"; $(MAKE) DESTDIR=$(DESTDIR) $@ || exit 1); done bacula-fd: Makefile @for I in ${fd_subdirs}; \ @@ -86,24 +86,24 @@ uninstall: install-autostart: install-autostart-dir install-autostart-fd install-autostart-sd install-autostart-dir: - (cd platforms; $(MAKE) $@ || exit 1) + (cd platforms; $(MAKE) DESTDIR=$(DESTDIR) $@ || exit 1) install-autostart-fd: - (cd platforms; $(MAKE) $@ || exit 1) + (cd platforms; $(MAKE) DESTDIR=$(DESTDIR) $@ || exit 1) install-autostart-sd: - (cd platforms; $(MAKE) $@ || exit 1) + (cd platforms; $(MAKE) DESTDIR=$(DESTDIR) $@ || exit 1) uninstall-autostart: uninstall-autostart-dir uninstall-autostart-fd uninstall-autrun-sd uninstall-autostart-dir: - (cd platforms; $(MAKE) $@ || exit 1) + (cd platforms; $(MAKE) DESTDIR=$(DESTDIR) $@ || exit 1) uninstall-autostart-fd: - (cd platforms; $(MAKE) $@ || exit 1) + (cd platforms; $(MAKE) DESTDIR=$(DESTDIR) $@ || exit 1) uninstall-autostart-sd: - (cd platforms; $(MAKE) $@ || exit 1) + (cd platforms; $(MAKE) DESTDIR=$(DESTDIR) $@ || exit 1) Makefile: Makefile.in cd $(topdir) \ @@ -153,12 +153,12 @@ distclean: distdirs: mkdir ../$(VERNAME); mkdir ../$(VERNAME)/autoconf; - @for I in $(all_subdirs); do (cd $$I; $(MAKE) $@ || (echo "Failed to make distclean in $$I"; exit 0) ); done + @for I in $(all_subdirs); do (cd $$I; $(MAKE) DESTDIR=$(DESTDIR) $@ || (echo "Failed to make distclean in $$I"; exit 0) ); done distcopy: $(CP) -p $(DIST) ../$(VERNAME); $(CP) -p $(DIST_CFG) ../$(VERNAME)/autoconf; - @for I in $(all_subdirs); do (cd $$I; $(MAKE) $@ || exit 1); done + @for I in $(all_subdirs); do (cd $$I; $(MAKE) DESTDIR=$(DESTDIR) $@ || exit 1); done distrib: configure autoconf/config.h.in distdirs distcopy diff --git a/bacula/README b/bacula/README index fd5a3b952c..1c04c9d52d 100644 --- a/bacula/README +++ b/bacula/README @@ -3,7 +3,7 @@ As you will note, I don't follow the standard GNU release numbering conventions, but rather one that I started in 1970. My internal releases were 0.nn, the first release to another user was 1.0, each modified source code release then -gets a new minor release (1.1, ...) as well as a date. Each +gets a new minor release (1.1, 1.2, ...) as well as a date. Each major change in the software -- e.g. new tape format will normally have the major release number incremented. @@ -22,6 +22,7 @@ To Configure it: --sysconfdir=$HOME/bacula/bin \ --with-pid-dir=$HOME/bacula/bin \ --with-subsys-dir=$HOME/bacula/bin \ + --with-sqlite=$HOME/depkgs/sqlite \ --enable-gnome \ --with-mysql=$HOME/mysql \ --with-working-dir=$HOME/bacula/bin/working \ @@ -59,10 +60,20 @@ Build Bacula: To create the database: - src/make_bacula_tables + src/cats/make_bacula_tables + +To install: + + make install To start it: + cd $HOME/bacula/bin + ./bacula start + +To start it (as a developer). This is not appropriate if you +are installing Bacula. + ./startit ./console (or ./gnome-console) @@ -72,3 +83,12 @@ To stop it: Well, it is all just a bit more complicated than that, but you should have the idea. + +Be sure you read the chapter about testing your tape drive! +Don't waste a lot of time setting up and running Bacula, if +your drive is not supported. + +FreeBSD users, pay special attention to the Device configuration +parameters needed to deal with FreeBSD tape drivers. + + diff --git a/bacula/README.AIX b/bacula/README.AIX index 861789c8ce..bcb767a746 100644 --- a/bacula/README.AIX +++ b/bacula/README.AIX @@ -1,3 +1,4 @@ + Here are a few tips from James MacLean on making Bacula work on an AIX system -- 15 Mar 2003: @@ -53,4 +54,3 @@ How's that for a confusing Saturday story ;). take care, JES - diff --git a/bacula/autoconf/Make.common.in b/bacula/autoconf/Make.common.in index 953e74db35..659401dc42 100644 --- a/bacula/autoconf/Make.common.in +++ b/bacula/autoconf/Make.common.in @@ -15,13 +15,6 @@ FTPSITEDIR=# SHELL = /bin/sh -# This variable makes it possible to move the installation root to another -# directory. This is useful when you're creating a binary distribution -# If empty, normal root will be used. -# You can run eg. 'make install DESTDIR=/packages/rxvt-xx' to accomplish -# that. -# DESTDIR = /usr/local/X11/$(VERNAME) - # Installation target directories & other installation stuff prefix = @prefix@ exec_prefix = @exec_prefix@ diff --git a/bacula/src/filed/Makefile.in b/bacula/src/filed/Makefile.in index 5e64f0a485..f1ae99ea11 100755 --- a/bacula/src/filed/Makefile.in +++ b/bacula/src/filed/Makefile.in @@ -1,5 +1,5 @@ # -# Bacula Makefile +# Bacula Makefile for the File daemon # # Version $Id$ # @@ -54,20 +54,20 @@ all: Makefile @WIN32@ bacula-fd @STATIC_FD@ @echo " " win32/winlib.a: - (cd win32; $(MAKE)) + (cd win32; $(MAKE) DESTDIR=$(DESTDIR)) @rm -f bacula-fd.exe win32/winmain.o: - (cd win32; $(MAKE)) + (cd win32; $(MAKE) DESTDIR=$(DESTDIR)) @rm -f bacula-fd.exe win32/winres.res: - (cd win32; $(MAKE)) + (cd win32; $(MAKE) DESTDIR=$(DESTDIR)) @rm -f bacula-fd.exe # win32 libraries if needed win32: $(WIN32OBJS) - (cd win32; $(MAKE)) + (cd win32; $(MAKE) DESTDIR=$(DESTDIR)) @rm -f bacula-fd.exe bacula-fd: $(SVROBJS) ../findlib/libfind.a ../lib/libbac.a @WIN32@ diff --git a/bacula/src/filed/win32/Makefile.in b/bacula/src/filed/win32/Makefile.in index d53a006a74..d952aa817f 100755 --- a/bacula/src/filed/win32/Makefile.in +++ b/bacula/src/filed/win32/Makefile.in @@ -68,7 +68,7 @@ distclean: clean @rm -rf bin/CVS CVS install: - @mkdir -p $(sbindir) /tmp $(sbindir)/../working + @mkdir -p $(DESTDIR)$(sbindir) $(DESTDIR)/tmp $(DESTDIR)$(sbindir)/../working @echo "Installing system binary files ..." @strip ../bacula-fd.exe @strip ../../tools/smtp.exe @@ -78,9 +78,9 @@ install: @cp -f ../../tools/smtp.exe bin/ @cp -f ../../tools/testfind.exe bin/ @cp -f ../../console/console.exe bin/ - @cp -f bin/* $(sbindir) - @cp -f ../bacula-fd.conf $(sysconfdir)/bacula-fd.conf.new - @cp -f ../../console/console.conf $(sysconfdir)/console.conf.new + @cp -f bin/* $(DESTDIR)$(sbindir) + @cp -f ../bacula-fd.conf $(DESTDIR)$(sysconfdir)/bacula-fd.conf.new + @cp -f ../../console/console.conf $(DESTDIR)$(sysconfdir)/console.conf.new # Make a Win32 binary release binary-release: diff --git a/bacula/src/tools/Makefile.in b/bacula/src/tools/Makefile.in index d833303a7f..eae2bf9480 100644 --- a/bacula/src/tools/Makefile.in +++ b/bacula/src/tools/Makefile.in @@ -77,6 +77,7 @@ install: smtp uninstall: (cd $(DESTDIR)$(sbindir); $(RMF) smtp) + (cd $(DESTDIR)$(sbindir); $(RMF) dbcheck)