2 # debian/rules for the Debian xutils package.
3 # Copyright © 2004 Scott James Remnant <scott@netsplit.com>
4 # Copyright © 2005 Daniel Stone <daniel@fooishbar.org>
5 # Copyright © 2005 David Nusinow <dnusinow@debian.org>
7 # Uncomment this to turn on verbose mode.
10 # set this to the name of the main shlib's binary package
11 PACKAGE = x11-xkb-utils
13 include debian/xsfbs/xsfbs.mk
15 # This package contains multiple modules as shipped by upstream. Each module is
16 # contained in a subdirectory in the root dir of the package. You must list each
17 # subdirectory explicitly so that the build system knows what to build
18 XKB_SUBDIRS=setxkbmap xkbcomp xkbevd xkbprint xkbutils
19 SUBDIRS=$(XKB_SUBDIRS)
20 BUILD_STAMPS = $(addprefix $(STAMP_DIR)/build-,$(SUBDIRS))
23 ifneq (,$(filter noopt,$(DEB_BUILD_OPTIONS)))
28 ifneq (,$(filter parallel=%,$(DEB_BUILD_OPTIONS)))
29 NUMJOBS = $(patsubst parallel=%,%,$(filter parallel=%,$(DEB_BUILD_OPTIONS)))
30 MAKEFLAGS += -j$(NUMJOBS)
33 DEB_HOST_ARCH ?= $(shell dpkg-architecture -qDEB_HOST_ARCH)
34 DEB_HOST_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE)
35 DEB_BUILD_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE)
36 ifeq ($(DEB_BUILD_GNU_TYPE), $(DEB_HOST_GNU_TYPE))
37 confflags += --build=$(DEB_HOST_GNU_TYPE)
39 confflags += --build=$(DEB_HOST_GNU_TYPE) --host=$(DEB_HOST_GNU_TYPE)
43 build-stamp: $(BUILD_STAMPS)
46 $(STAMP_DIR)/build-%: $(STAMP_DIR)/genscripts $(STAMP_DIR)/patch
49 mkdir -p $*-obj-$(DEB_HOST_GNU_TYPE)
50 cd $* && autoreconf -i -v -f
51 cd $*-obj-$(DEB_HOST_GNU_TYPE) && \
52 ../$*/configure --prefix=/usr --mandir=\$${prefix}/share/man \
53 --infodir=\$${prefix}/share/info $(confflags) \
56 cd $*-obj-$(DEB_HOST_GNU_TYPE) && $(MAKE)
64 rm -f configure */Makefile.in
65 rm -f config.cache config.log config.status
66 rm -f */config.cache */config.log */config.status
67 rm -f conftest* */conftest*
68 rm -rf autom4te.cache */autom4te.cache
79 for FILE in $(SUBDIRS); do \
80 cd "$$FILE"-obj-$(DEB_HOST_GNU_TYPE) && $(MAKE) DESTDIR=$(CURDIR)/debian/tmp install ; \
84 # Build architecture-dependent files here.
85 binary-arch: build install
90 dh_install --sourcedir=debian/tmp --list-missing
103 # Build architecture-independent files here.
104 binary-indep: build install
107 binary: binary-indep binary-arch
108 .PHONY: build clean binary-indep binary-arch binary install