7
7
# Uncomment this to turn on verbose mode.
10
# set this to the name of the main shlib's binary package
13
include debian/xsfbs/xsfbs.mk
15
12
# This package contains multiple modules as shipped by upstream. Each module is # contained in a subdirectory in the root dir of the package. You must list each
16
13
# subdirectory explicitly so that the build system knows what to build
17
14
DEF_SUBDIRS=bitmap ico oclock rendercheck transset x11perf xbiff xcalc xclipboard xclock xconsole xcursorgen xditview xedit xeyes xgc xload xlogo xmag xman xmore xwd xwud
18
15
SUBDIRS=$(DEF_SUBDIRS)
16
CONFIG_STAMPS = $(addprefix $(STAMP_DIR)/configure-, $(SUBDIRS))
19
17
BUILD_STAMPS = $(addprefix $(STAMP_DIR)/build-,$(SUBDIRS))
22
ifneq (,$(filter noopt,$(DEB_BUILD_OPTIONS)))
27
ifneq (,$(filter parallel=%,$(DEB_BUILD_OPTIONS)))
28
NUMJOBS = $(patsubst parallel=%,%,$(filter parallel=%,$(DEB_BUILD_OPTIONS)))
29
MAKEFLAGS += -j$(NUMJOBS)
32
DEB_HOST_ARCH ?= $(shell dpkg-architecture -qDEB_HOST_ARCH)
33
DEB_HOST_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE)
34
DEB_BUILD_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE)
35
ifeq ($(DEB_BUILD_GNU_TYPE), $(DEB_HOST_GNU_TYPE))
36
confflags += --build=$(DEB_HOST_GNU_TYPE)
38
confflags += --build=$(DEB_BUILD_GNU_TYPE) --host=$(DEB_HOST_GNU_TYPE)
42
build-stamp: $(BUILD_STAMPS)
45
$(STAMP_DIR)/build-%: $(STAMP_DIR)/genscripts $(STAMP_DIR)/patch
49
../$*/configure --prefix=/usr --mandir=\$${prefix}/share/man \
50
--infodir=\$${prefix}/share/info $(confflags) \
52
MANCONF="/etc/manpath.config"
53
cd $*-build && $(MAKE)
59
rm -f config.cache config.log config.status
60
rm -f */config.cache */config.log */config.status
61
rm -f conftest* */conftest*
62
rm -rf autom4te.cache */autom4te.cache
20
dh $@ --with autotools-dev,quilt --parallel
22
override_dh_auto_configure: $(CONFIG_STAMPS)
24
$(STAMP_DIR)/configure-%:
26
dh_auto_configure -D$* -B$*-build -- \
27
--disable-silent-rules \
28
MANCONF="/etc/manpath.config"
31
override_dh_auto_build: $(BUILD_STAMPS)
35
dh_auto_build -D$* -B$*-build
38
override_dh_auto_clean: $(addprefix clean-, $(SUBDIRS))
42
dh_auto_clean -D$* -B$*-build
44
override_dh_auto_install:
72
45
for FILE in $(SUBDIRS); do \
73
46
cd "$$FILE"-build && $(MAKE) DESTDIR=$(CURDIR)/debian/tmp install ; \
77
# Build architecture-dependent files here.
78
binary-arch: build install
83
dh_install --sourcedir=debian/tmp --list-missing
96
# Build architecture-independent files here.
97
binary-indep: build install
100
binary: binary-indep binary-arch
101
.PHONY: build clean binary-indep binary-arch binary install
51
dh_install --list-missing
103
53
.PHONY: get-tarballs
104
54
get-tarballs: $(addprefix get-tarball-,$(SUBDIRS))