source: trunk/packages/xen-3.1/xen-3.1/debian/rules @ 34

Last change on this file since 34 was 34, checked in by hartmans, 17 years ago

Add xen and xen-common

  • Property svn:executable set to *
  • Property svn:mime-type set to text/script
File size: 2.3 KB
Line 
1#!/usr/bin/make -f
2
3# Uncomment this to turn on verbose mode.
4#export DH_VERBOSE=1
5
6DEB_HOST_ARCH  := $(shell dpkg-architecture -qDEB_HOST_ARCH)
7DEB_BUILD_ARCH := $(shell dpkg-architecture -qDEB_BUILD_ARCH)
8
9VERSION := $(shell dpkg-parsechangelog | perl -ne '/^Version:\s+(\S+)-[^-]+$$/ && print $$1;')
10
11include debian/rules.defs
12
13setup: $(STAMPS_DIR)/setup-base
14$(STAMPS_DIR)/setup-base: debian/control $(BUILD_DIR) $(STAMPS_DIR)
15        dh_testdir
16        $(MAKE) -f debian/rules.gen setup-$(DEB_HOST_ARCH)
17        touch $@
18
19build: debian/control $(STAMPS_DIR)/build-base
20$(STAMPS_DIR)/build-base: $(STAMPS_DIR)/setup-base
21        dh_testdir
22        $(MAKE) -f debian/rules.gen build-$(DEB_HOST_ARCH)
23        touch $@
24
25$(BUILD_DIR) $(STAMPS_DIR):
26        @[ -d $@ ] || mkdir $@
27
28maintainerclean:
29        rm -f debian/control* debian/rules.gen debian/xen-hypervisor-* debian/xen-utils-*
30        rm -rf $(filter-out .svn debian, $(wildcard * .[^.]*))
31
32clean: debian/control
33        dh_testdir
34        rm -rf $(BUILD_DIR) $(STAMPS_DIR)
35        dh_clean
36
37binary-indep:
38        dh_testdir
39        $(MAKE) -f debian/rules.gen binary-indep
40
41binary-arch:
42        dh_testdir
43        $(MAKE) -f debian/rules.gen binary-arch-$(DEB_HOST_ARCH)
44
45binary: binary-indep binary-arch
46
47DIR_ORIG = ../orig/xen-$(MAJOR)-$(VERSION)
48
49orig: $(DIR_ORIG)
50        rsync --delete --exclude debian --exclude .svn --link-dest=$(DIR_ORIG)/ -a $(DIR_ORIG)/ .
51
52# This is to make dpatch-edit-patch work
53unpatch: clean                                 
54
55CONTROL_FILES += debian/changelog $(wildcard debian/templates/control.*)
56CONTROL_FILES += $(wildcard debian/arch/defines) $(wildcard debian/arch/*/defines)
57GENCONTROL = $(__MODULES_DIR)gencontrol.py
58debian/control debian/rules.gen: $(CONTROL_FILES)
59        if [ -f debian/control ] && [ -f debian/control.md5sum ] && [ -f debian/rules.gen ]; then \
60                if md5sum $^ | diff - debian/control.md5sum > /dev/null; then true; else \
61                        $(MAKE) -f debian/rules debian/control-real; \
62                fi \
63        else \
64                $(MAKE) -f debian/rules debian/control-real; \
65        fi
66
67
68debian/control-real: $(CONTROL_FILES)
69        debian/bin/gencontrol.py $(KERNELVERSION) /usr/src/linux-support-$(KERNELVERSION)
70        md5sum $^ > debian/control.md5sum
71        @echo
72        @echo This target is made to fail intentionally, to make sure
73        @echo that it is NEVER run during the automated build. Please
74        @echo ignore the following error, the debian/control file has
75        @echo been generated SUCCESSFULLY.
76        @echo
77        exit 1
78
79.PHONY: clean build binary-indep binary-arch binary
Note: See TracBrowser for help on using the repository browser.