#!/usr/bin/make -f # -*- mode: Makefile; coding: utf-8 -*- DEB_HOST_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE) DEB_BUILD_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE) install_program = install -p -o root -g root -m 755 FILES_TO_CLEAN = TAGS tags debian/files debian/substvars MISC/texinfo/flex.info DIRS_TO_CLEAN = debian/html CFLAGS = -Wall -g ifneq (,$(filter noopt,$(DEB_BUILD_OPTIONS))) CFLAGS += -O0 else CFLAGS += -O2 endif ifeq (,$(findstring nostrip,$(DEB_BUILD_OPTIONS))) LDFLAGS += -s endif build: build-arch build-indep build-arch: build-arch-stamp build-arch-stamp: dh_testdir 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 ac_cv_lib_util_getloadavg=no ./configure --verbose --prefix=/usr \ --build $(DEB_BUILD_GNU_TYPE) --host $(DEB_HOST_GNU_TYPE) $(MAKE) CFLAGS="$(CFLAGS)" LDFLAGS="$(LDFLAGS)" $(MAKE) -C po $(MAKE) check touch $@ build-indep: build-indep-stamp build-indep-stamp: dh_testdir test -d debian/html || mkdir debian/html (cd debian/html; \ texi2html -doctype html2 -expandinfo -glossary -menu \ -split_chapter -o . -verbose \ ../../MISC/texinfo/flex.texi) touch $@ binary: binary-arch binary-indep binary-indep: build-indep dh_testdir dh_testroot dh_prep -i dh_installchangelogs -i NEWS dh_installdocs -i dh_link -i dh_compress -i dh_fixperms -i dh_installdeb -i dh_gencontrol -i dh_md5sums -i dh_builddeb -i binary-arch: build-arch dh_testdir dh_testroot dh_prep -a dh_installchangelogs -a NEWS dh_installdocs -a $(MAKE) install prefix=debian/flex-old/usr \ infodir=debian/flex-old/usr/share/info \ mandir=debian/flex-old/usr/share/man/man1 \ INSTALL_PROGRAM="$(install_program)" $(MAKE) install -C po DESTDIR=$(CURDIR)/debian/flex-old prefix=usr (cd MISC/texinfo && makeinfo --no-split flex.texi;) dh_installinfo -a dh_installman -a dh_link -a dh_strip -a dh_compress -a dh_fixperms -a dh_installdeb -a dh_shlibdeps -a dh_gencontrol -a dh_md5sums -a dh_builddeb -a clean: dh_testdir dh_testroot rm -f build-indep-stamp build-arch-stamp $(MAKE) clean -C po || true -test -f Makefile && $(MAKE) distclean -rm -f $(FILES_TO_CLEAN) -rm -rf $(DIRS_TO_CLEAN) rm -f config.sub config.guess -rm -f core `find . \( -name '*.orig' -o -name '*.rej' -o -name '*~' \ -o -name '*.bak' -o -name '#*#' -o -name '.*.orig' \ -o -name '.*.rej' -o -name '.SUMS' -o -size 0 \) -print` TAGS dh_clean .PHONY: build build-arch build-indep binary binary-arch binary-indep clean