summaryrefslogtreecommitdiff
path: root/debian/rules
diff options
context:
space:
mode:
authorTom Grennan <tgrennan@vyatta.com>2007-09-20 18:43:23 -0700
committerTom Grennan <tgrennan@vyatta.com>2007-09-20 18:43:23 -0700
commit00b78e597b6e3aa1fd65ffdd7ea1ff2a2ac019d5 (patch)
treefcb84cdd6185730b49f58621ed751dae9e790d51 /debian/rules
parent64e83f470a7076b63bd9b76c7b6bb516cbe9bb92 (diff)
downloadvyatta-op-00b78e597b6e3aa1fd65ffdd7ea1ff2a2ac019d5.tar.gz
vyatta-op-00b78e597b6e3aa1fd65ffdd7ea1ff2a2ac019d5.zip
merge ChangeLog generation, repo info and autoreconf into
debian/autogen.sh that is in turn run from debian/rules
Diffstat (limited to 'debian/rules')
-rwxr-xr-xdebian/rules41
1 files changed, 26 insertions, 15 deletions
diff --git a/debian/rules b/debian/rules
index a0e3415..6c633e3 100755
--- a/debian/rules
+++ b/debian/rules
@@ -19,23 +19,29 @@ PKGDIR=$(CURDIR)/debian/$(PACKAGE)
CFLAGS = -Wall -g
+configure = ./configure
+configure += --host=$(DEB_HOST_GNU_TYPE)
+configure += --build=$(DEB_BUILD_GNU_TYPE)
+configure += --prefix=/opt/vyatta
+configure += --mandir=\$${prefix}/share/man
+configure += --infodir=\$${prefix}/share/info
+configure += CFLAGS="$(CFLAGS)"
+configure += LDFLAGS="-Wl,-z,defs"
+
ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
CFLAGS += -O0
else
CFLAGS += -O2
endif
+configure:
+ chmod +x debian/autogen.sh
+ debian/autogen.sh
+
config.status: configure
dh_testdir
- # Add here commands to configure the package.
-ifneq "$(wildcard /usr/share/misc/config.sub)" ""
- cp -f /usr/share/misc/config.sub config.sub
-endif
-ifneq "$(wildcard /usr/share/misc/config.guess)" ""
- cp -f /usr/share/misc/config.guess config.guess
-endif
- ./configure --host=$(DEB_HOST_GNU_TYPE) --build=$(DEB_BUILD_GNU_TYPE) --prefix=/opt/vyatta --mandir=\$${prefix}/share/man --infodir=\$${prefix}/share/info CFLAGS="$(CFLAGS)" LDFLAGS="-Wl,-z,defs"
-
+ rm -f config.cache
+ $(configure)
build: build-stamp
@@ -44,14 +50,19 @@ build-stamp: config.status
$(MAKE)
touch $@
-clean:
+clean: clean-patched
+
+# Clean everything up, including everything auto-generated
+# at build time that needs not to be kept around in the Debian diff
+clean-patched:
dh_testdir
dh_testroot
- rm -f build-stamp
-
- test -f Makefile && $(MAKE) distclean || true
- rm -f config.sub config.guess
-
+ if test -f Makefile ; then $(MAKE) clean distclean ; fi
+ rm -f build-stamp
+ rm -f config.status config.sub config.guess config.log
+ rm -f aclocal.m4 configure Makefile.in Makefile INSTALL
+ rm -f etc/default/vyatta
+ rm -rf config
dh_clean
install: build