1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106
|
#!/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
|