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
|
#!/usr/bin/make -f
%:
dh $@ -Dsrc --with ocaml
include /usr/share/dpkg/pkg-info.mk
POLYGEN_SEED = $(shell expr $(SOURCE_DATE_EPOCH) % 1073741823)
POLYGEN = src/polygen -seed $(POLYGEN_SEED)
export POLYGEN
# If we have the optimising compiler, build natively with debugging because
# we can strip it later. if we don't, disable debugging because stripping
# the non-native binaries removes the bytecode and leaves you with the
# interpreter, and a somewhat useless binary... =)
override_dh_auto_build:
dh_auto_build -- NATIVE=false
# Hook in the build system the creation of the manpage
# Invoking polygen to extract the metadata from the grammars will also generate
# the .grm.o files, that we can later install.
$(POLYGEN) debian/man.grm > polygen.1
find $(CURDIR)/grm/ -name \*.grm | LC_ALL=C sort | debian/make_polygen-data_manpage > polygen-data.6
override_dh_install:
dh_install
# grammar data files
debian/install-grammars $(CURDIR)/grm/ita debian/polygen-data/usr/share/polygen/ita
debian/install-grammars $(CURDIR)/grm/eng debian/polygen-data/usr/share/polygen/eng
debian/install-grammars $(CURDIR)/grm/fra debian/polygen-data/usr/share/polygen/fra
override_dh_clean:
dh_clean
find $(CURDIR)/grm/ -name \*.grm.o -delete
|