when there is no longer anything to take away. -- Antoine de Saint-Exupery
Date: 18 Sep 2002 09:20:38 +0200 In-Reply-To: <[EMAIL PROTECTED]> Message-ID: <[EMAIL PROTECTED]> Lines: 72 User-Agent: Gnus/5.0808 (Gnus v5.8.8) Emacs/20.7 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Quoting Osamu Aoki <[EMAIL PROTECTED]>: > On Wed, Sep 18, 2002 at 08:33:04AM +0200, Turbo Fredriksson wrote: > > I'm packaging Nagios. It builds tree packages from one source: > > 'nagios-text', 'nagios-pgsql' and 'nagios-mysql'. The differences > > is quite obvious: Compile the source three times, each time with > > different ./configure options. > > > > The problem I'm facing is that I want to 'scratch' the source > > after each build. Actually: build first package, move it aside, > > build second package - move it aside etc. > > I would do waisteful buld as follows: > > 1. copy sources to a subdirectory sub-1/ > 2. create 2 more by cp -a sub-1/ sub-2/ > 3. build 3 ./configure -with-whatever in each sub-?/ > 4. install to 3 locations to create 3 packages I tried this the first time, but there's a problem with this. Part of the 'rules' file: ----- s n i p ----- binary-nagios-text: $(patched) dh_testdir -a @( cd build-tree/nagios-[0-9]*/; \ $(CONFIGURE); \ set -e; $(MAKE) all && echo $?; \ cd .. && mv nagios-[0-9]* ../binary/binary-nagios-text; \ ) binary-nagios-pgsql: $(patched) dh_testdir -a @( cd build-tree/nagios-[0-9]*/; \ $(CONFIGURE) --with-pgsql-comments \ --with-pgsql-downtime \ --with-pgsql-extinfo \ --with-pgsql-retention \ --with-pgsql-status \ --with-pgsql-xdata; \ set -e; $(MAKE) all && echo $?; \ cd .. && mv nagios-[0-9]* ../binary/binary-nagios-pgsql; \ ) [...] build: duplicate binary-nagios-text binary-nagios-pgsql binary-nagios-mysql [empty target] binary-arch: build install [...] ----- s n i p ----- Both (actually there's three targets like this) depend on '$(patched). The '$(patched)' part comes from 'debian/scripts/dbs-build.mk' (see http://www.bayour.com/misc/dbs-build.mk.txt and http://www.bayour.com/misc/rules.txt). This unpacks the source and patches it. This system is nice, because I don't have to patch the pristine sources, I include the patches separately in the 'debian/patches'... But since the targets '$(STAMP_DIR)/created' and '$(STAMP_DIR)/unpack' fullfills the FIRST time, it won't be done again. Therefor I'd like to either REMOVE those files (that the targets creates) so that 'binary-nagios-pgsql' can be run properly. Or force 'make' to do them any way. I've been playing with '.PHONY', but I can't get it to work... -- tritium Delta Force SEAL Team 6 Cuba FBI smuggle Ft. Meade Khaddafi kibo munitions toluene nuclear domestic disruption Noriega AK-47 [See http://www.aclu.org/echelonwatch/index.html for more about this]