debian swirl logo

Back to the packages list styx

#!/usr/bin/make -f

include /usr/share/cdbs/1/rules/debhelper.mk
include /usr/share/cdbs/1/class/autotools.mk

DEB_CONFIGURE_INCLUDEDIR := /usr/include/styx
DEB_CONFIGURE_EXTRA_FLAGS := --datadir=/usr/share/doc/styx-doc \
			     ac_cv_htmldir= /usr/share/doc/styx-doc/html \
			     ac_cv_sgmldir= /usr/share/doc/styx-doc/sgml

build/styx:: debian/styx.1
debian/styx.1: debian/styx.sgml
		docbook-to-man $< > $@

clean::
		rm -f debian/styx.1

build/styx-doc:: debian/styx-xml.tar.gz
debian/styx-xml.tar.gz:
		set -e; \
		for args in "pgmxml/*.c                 debian/styx-xml" \
			    "spexml/*.sty spexml/*.lex  debian/styx-xml/spe" \
			    "genxml/xml_test_cim.c      debian/styx-xml/gen" \
			    "libxml/*.[ch]              debian/styx-xml/lib"; do \
		    install -d $${args##*[[:space:]]}; \
		    install -m 644 -p $$args; \
		done
		install -m 755 debian/styx-xml.mx debian/styx-xml/mx
	GZIP= -9 tar -czf $@ --owner=root --group=root -C debian styx-xml

clean::
		rm -rf debian/styx-xml debian/styx-xml.tar.gz

# Disable default target since we want to do install-{exec,data} separately.
DEB_MAKE_INSTALL_TARGET := 

common-install-arch::
		$(MAKE) install-exec DESTDIR=$(DEB_DESTDIR)
		mkdir -p debian/libstyx2/usr/share/lintian/overrides/
		install -o root -g root -m 0644 debian/libstyx2.lintian \
  debian/libstyx2/usr/share/lintian/overrides/libstyx2



install/styx-dev::
		set -e; \
		for dir in libbase modstd pgm inc; do \
		    $(MAKE) -C $$dir install-data DESTDIR=$(CURDIR)/debian/styx-dev; \
		done

install/styx-doc:: debian/styx-xml.tar.gz
		set -e; \
		for dir in doc examples spe pat; do \
		    $(MAKE) -C $$dir install-data DESTDIR=$(CURDIR)/debian/styx-doc; \
		done
		find debian/styx-doc -size 0 | xargs rm -f

# empty dependency_libs in .la files
binary-install/styx-dev::
		sed -i "/dependency_libs/ s/'.*'/''/" $(CURDIR)/debian/styx-dev/usr/lib/*.la

DEB_DH_MAKESHLIBS_ARGS_ALL := -V
DEB_SHLIBDEPS_INCLUDE := debian/libstyx2/usr/lib

Builds:

libstyx2
runtime libraries for styx
styx
combined parser/scanner generator for c/c++
styx-dev
combined parser/scanner generator development files
styx-doc
combined parser/scanner generator documentation