forked from angband/angband
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
53 lines (44 loc) · 1.96 KB
/
Makefile
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
MKPATH=mk/
include $(MKPATH)buildsys.mk
SUBDIRS = src lib
CLEAN = *.dll *.exe
DISTCLEAN = config.status config.log docs/.deps \
mk/buildsys.mk mk/extra.mk
REPOCLEAN = aclocal.m4 autom4te.cache configure src/autoconf.h.in version
.PHONY: tests dist
tests:
$(MAKE) -C src tests
TAG = xygos-`cd scripts && ./version.sh`
OUT = $(TAG).tar.gz
manual:
@if test ! x"$(SPHINXBUILD)" = x && test ! x"$(SPHINXBUILD)" = xNOTFOUND ; then \
env ANGBAND_SPHINX_BUILTIN="$(ANGBAND_SPHINX_BUILTIN)" $(MAKE) -C docs SPHINXBUILD="$(SPHINXBUILD)" html ; \
else \
echo "sphinx-build was not found during configuration. If it is not installed, you will have to install it. You can either rerun the configuration or set SPHINXBUILD on the command line when running make to inform make how to run sphinx-build. You may also want to set ANGBAND_SPHINX_BUILTIN to a builtin Sphinx theme to use instead of what is configured in docs/conf.py. For instance, 'ANGBAND_SPHINX_BUILTIN=classic'." ; \
exit 1 ; \
fi
dist:
git checkout-index --prefix=$(TAG)/ -a
scripts/version.sh > $(TAG)/version
$(TAG)/autogen.sh
rm -rf $(TAG)/autogen.sh $(TAG)/autom4te.cache
tar --exclude .gitignore --exclude *.dll --exclude .github \
--exclude .travis.yml -czvf $(OUT) $(TAG)
rm -rf $(TAG)
# Hack to clean up in docs since it isn't included in SUBDIRS.
pre-clean:
@if test ! x"$(SPHINXBUILD)" = x && test ! x"$(SPHINXBUILD)" = xNOTFOUND ; then \
$(MAKE) -C docs SPHINXBUILD="$(SPHINXBUILD)" clean ; \
fi
# Hack to clean up test results in tests.
pre-distclean:
@find tests -name run.out -exec rm {} \;
# Remove the files generated by autogen.sh and the version stamp file.
# In general, this should not be used when working with a distributed
# source archive (.tar.gz) since those archives do not include autogen.sh for
# rebuilding the configure script.
repoclean: distclean
for i in "" $(REPOCLEAN) ; do \
test x"$$i" = x"" && continue; \
if test -d "$$i" || test -f "$$i" ; then rm -rf "$$i" ; fi \
done