summaryrefslogtreecommitdiff
path: root/Makefile.am
blob: 519aa551a712ce4e5e934b199320a3b9f5b837b4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
# -*- Makefile -*-

PACKAGE          = ${PACKAGE_NAME}
ACLOCAL_AMFLAGS  = -I m4
SUBDIRS          = doc include src

pkgconfig_DATA   = libHX.pc

${pkgconfig_DATA}: ${top_builddir}/config.status

tmpdir := $(shell mktemp -dtu)
packer  = xz
packext = .tar.xz

.PHONY: tarball
tarball:
# do not use mkdir_p here.
	mkdir ${tmpdir};
	pushd ${top_srcdir} && git archive --prefix=${PACKAGE_NAME}-${PACKAGE_VERSION}/ HEAD | tar -C ${tmpdir} -x && popd;
	pushd ${tmpdir}/${PACKAGE_NAME}-${PACKAGE_VERSION} && ./autogen.sh && pushd doc/ && ./generate && popd && popd;
	tar --use=${packer} -C ${tmpdir} -cf ${PACKAGE_NAME}-${PACKAGE_VERSION}${packext} --owner=root --group=root ${PACKAGE_NAME}-${PACKAGE_VERSION}/;
	rm -Rf ${tmpdir};