forked from souffle-lang/souffle
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile.am
71 lines (60 loc) · 1.73 KB
/
Makefile.am
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
# Souffle - A Datalog Compiler
# Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
# Licensed under the Universal Permissive License v 1.0 as shown at:
# - https://opensource.org/licenses/UPL
# - <souffle root>/licenses/SOUFFLE-UPL.txt
# add macros
ACLOCAL_AMFLAGS = -I m4
# directories
if JAVAI
java_dirs=interfaces
else
java_dirs=
endif
SUBDIRS = src tests $(java_dirs)
# add doxygen support to the makefile
include $(top_srcdir)/aminclude.am
# add doxygen configuration to the distribution
EXTRA_DIST = doxygen.cfg
# Debian packaging
if DEBIAN_PACKAGE
dpkg_dir = packaging
dist_src = $(PACKAGE)-$(VERSION).tar.gz
deb_src = $(PACKAGE)_$(VERSION).orig.tar.gz
package:
@which "$(DEBUILD)" 2>&1 > /dev/null || { echo "No debuild executable found" 1>&2 && exit 1; }
rm -rf $(dpkg_dir)
$(MKDIR_P) $(dpkg_dir)
$(MAKE) dist
tar -xvf $(dist_src) -C $(dpkg_dir)
cp -r debian $(dpkg_dir)/$(distdir)
mv $(dist_src) $(dpkg_dir)/$(deb_src)
cd $(dpkg_dir)/$(distdir) && DEB_BUILD_OPTIONS=nocheck $(DEBUILD) -us -uc
clean-local:
-rm -rf $(dpkg_dir)
endif
# MacOS packaging
if OSX_PACKAGE
package:
@test -d $(distdir) \
&& { echo "$(distdir) directory exists. (Re)move it before creating a MacOS package" 2>&1 && exit 1; } \
|| true
$(MAKE) distdir \
&& pushd $(distdir) \
&& $(MKDIR_P) `pwd`/pkg \
&& ./configure --prefix `pwd`/pkg \
&& $(MAKE) -j8 install \
&& $(PKGBUILD) \
--root `pwd`/pkg \
--identifier com.oracle.souffle \
--version $(VERSION) \
--install-location /usr/local \
--scripts $(abs_top_srcdir)/osx \
$(abs_top_builddir)/$(distdir).pkg \
&& popd \
&& rm -rf $(distdir)
clean-local:
-rm -f $(abs_top_builddir)/$(distdir).pkg
endif
# Man pages
dist_man1_MANS = $(wildcard $(srcdir)/man/*.1)