Code

configure and build in ./debian/build.
authorSebastian Harl <sh@tokkee.org>
Sat, 14 Oct 2006 12:09:39 +0000 (12:09 +0000)
committerSebastian Harl <sh@tokkee.org>
Sat, 14 Oct 2006 12:09:39 +0000 (12:09 +0000)
debian/rules

index fa2988fdaeff49df44c7f44e259f07b4dacdfdcd..bbbe4db939b694516e720716572ffc2b017cf18a 100755 (executable)
@@ -13,24 +13,28 @@ DEB_BUILD_GNU_TYPE  ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE)
 
 CFLAGS = -Wall -g
 
+BUILDDIR = ./debian/build/
+
 ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
        CFLAGS += -O0
 else
        CFLAGS += -O2
 endif
 
-config.status: configure
+$(BUILDDIR)/config.status: configure
        dh_testdir
-       CFLAGS="$(CFLAGS)" ./configure --host=$(DEB_HOST_GNU_TYPE) \
+       [ -e $(BUILDDIR) ] || mkdir $(BUILDDIR)
+       cd $(BUILDDIR) && CFLAGS="$(CFLAGS)" ../../configure \
+                       --host=$(DEB_HOST_GNU_TYPE) \
                        --build=$(DEB_BUILD_GNU_TYPE) \
                        --prefix=/usr
 
 build: build-stamp
 
-build-stamp: config.status
+build-stamp: $(BUILDDIR)/config.status
        dh_testdir
        
-       $(MAKE)
+       $(MAKE) -C $(BUILDDIR)
        
        touch build-stamp
 
@@ -38,9 +42,8 @@ clean:
        dh_testdir
        dh_testroot
        rm -f build-stamp 
-       rm -f config.sub config.guess
        
-       -$(MAKE) distclean
+       rm -rf $(BUILDDIR)
        
        dh_clean 
 
@@ -49,7 +52,7 @@ install: build
        dh_testroot
        dh_clean -k 
        
-       $(MAKE) install DESTDIR=$(CURDIR)/debian/fusedav
+       $(MAKE) -C $(BUILDDIR) install DESTDIR=$(CURDIR)/debian/fusedav
 
 binary-indep:
        # nothing to do here