#!/usr/bin/make -f PERL ?= /usr/bin/perl VER := $(shell head -1 debian/changelog | sed -e 's/^.*(//' -e 's/).*$$//') tmp := $(CURDIR)/debian/lintian profiles := profiles/debian/main.profile \ profiles/debian/ftp-master-auto-reject.profile neededfiles := debian/rules frontend/lintian $(profiles) \ $(wildcard commands/*) pod2man := pod2man --center "Debian Package Checker" --release "Lintian v$(VER)" pod2mansources := $(wildcard man/*.pod) docsource := doc/lintian.xml README.md man/lintian.pod.in \ $(pod2mansources) allchecks := $(wildcard checks/*) allcollect := $(wildcard collection/*) tagfiles := $(wildcard t/changes/*.changes t/*/*/tags) testfiles := $(wildcard t/tests/*/desc) perlprovides := data/fields/perl-provides autoreject_data := $(wildcard private/build-time-data/*) # Work/output dir for tests # private/runtests gets TEST_WORK_DIR from environment export TEST_WORK_DIR ?= $(CURDIR)/debian/test-out CLEAN_TEST_WORK_DIR ?= 1 ifeq (,$(filter nocheck,$(DEB_BUILD_OPTIONS))) testtarget = runtests else testtarget = endif ifneq (,$(filter parallel=%,$(DEB_BUILD_OPTIONS))) jobs = $(patsubst parallel=%,%,$(filter parallel=%,$(DEB_BUILD_OPTIONS))) PAR_ARGS=-j $(jobs) endif profiles: $(profiles); $(profiles): $(allchecks) $(autoreject_data) private/generate-profiles.pl private/generate-profiles.pl api-doc: private/generate-html-docs doc/api.html .PHONY: runtests runtests: $(neededfiles) $(allchecks) $(allcollect) $(tagfiles) $(testfiles) @echo .... building test packages .... t/bin/build-test-packages \ $(PAR_ARGS) \ --work-dir="$(TEST_WORK_DIR)" @echo .... running tests .... t/bin/runtests \ $(PAR_ARGS) \ --unattended \ --keep-going \ --work-dir="$(TEST_WORK_DIR)" runtests-translation: $(neededfiles) $(allchecks) @echo .... running translation tests .... t/bin/runtests \ $(PAR_ARGS) \ --unattended \ --keep-going \ --work-dir="$(TEST_WORK_DIR)" \ t \ translation-check-descs # this target is only run manually refresh-perl-provides: perl private/refresh-perl-provides > $(perlprovides) generate-docs: generate-docs-stamp generate-docs-stamp: $(docsource) dh_testdir cd doc && LC_ALL=C docbook2html -V "%use-id-as-filename%" -o lintian.html lintian.xml cd doc && LC_ALL=C jw -b txt lintian.xml # docbook does not set a charset and we rely on UTF-8. Make this explicit to avoid #802721 find doc/lintian.html/ -type f -name '*.html' -exec perl -pe 's/(