Skip to content

Commit fbb9ca1

Browse files
authored
Merge pull request #640 from s88100/pwma-master
Build system *nix from V 4.2.5
2 parents 78464c7 + d20b8e4 commit fbb9ca1

24 files changed

+4814
-2980
lines changed

.travis.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,5 +13,5 @@ addons:
1313

1414
script:
1515
- ./autogen.sh
16-
- ./configure --disable-curses --disable-x11 --enable-sdl
16+
- ./configure --disable-curses --enable-sdl
1717
- make

Makefile

+59-13
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,73 @@
11
MKPATH=mk/
22
include $(MKPATH)buildsys.mk
33

4-
SUBDIRS = src lib docs
5-
CLEAN = config.status config.log *.dll *.exe
4+
SUBDIRS = src lib
5+
CLEAN = *.dll *.exe
6+
DISTCLEAN = config.status config.log docs/.deps \
7+
mk/buildsys.mk mk/extra.mk
8+
REPOCLEAN = aclocal.m4 autom4te.cache configure src/autoconf.h.in version
69

7-
.PHONY: tests manual clean-manual dist
10+
.PHONY: check tests manual manual-optional dist
11+
check: tests
812
tests:
913
$(MAKE) -C src tests
1014

11-
manual:
12-
$(MAKE) -C doc manual.html manual.pdf
15+
TAG = pwmangband-`cd scripts && ./version.sh`
16+
OUT = $(TAG).tar.gz
1317

14-
clean-manual:
15-
$(MAKE) -C doc clean
18+
all: manual-optional
1619

17-
TAG = pwmangband-`git describe`
18-
OUT = $(TAG).tar.gz
20+
manual: manual-optional
21+
@if test x"$(SPHINXBUILD)" = x || test x"$(SPHINXBUILD)" = xNOTFOUND ; then \
22+
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 DOC_HTML_THEME to a builtin Sphinx theme to use instead of what is configured in docs/conf.py. For instance, 'DOC_HTML_THEME=classic'." ; \
23+
exit 1 ; \
24+
fi
1925

20-
dist: manual
26+
manual-optional:
27+
@if test ! x"$(SPHINXBUILD)" = x && test ! x"$(SPHINXBUILD)" = xNOTFOUND ; then \
28+
env DOC_HTML_THEME="$(DOC_HTML_THEME)" $(MAKE) -C docs SPHINXBUILD="$(SPHINXBUILD)" html ; \
29+
fi
30+
31+
dist:
2132
git checkout-index --prefix=$(TAG)/ -a
22-
git describe > $(TAG)/version
33+
scripts/version.sh > $(TAG)/version
2334
$(TAG)/autogen.sh
2435
rm -rf $(TAG)/autogen.sh $(TAG)/autom4te.cache
25-
cp doc/manual.html doc/manual.pdf $(TAG)/doc/
26-
tar --exclude .gitignore --exclude *.dll -czvf $(OUT) $(TAG)
36+
tar --exclude .gitignore --exclude *.dll --exclude .github \
37+
--exclude .travis.yml -czvf $(OUT) $(TAG)
2738
rm -rf $(TAG)
39+
40+
# If this isn't a --with-no-install build, build and install the documentation
41+
# if sphinx-build is available.
42+
install-extra:
43+
@if test x"$(NOINSTALL)" != xyes && test ! x"$(SPHINXBUILD)" = x && test ! x"$(SPHINXBUILD)" = xNOTFOUND ; then \
44+
for x in `find docs/_build/html -mindepth 1 \! -type d \! -name .buildinfo -print`; do \
45+
i=`echo $$x | sed -e s%^docs/_build/html/%%`; \
46+
${INSTALL_STATUS}; \
47+
if ${MKDIR_P} $$(dirname ${DESTDIR}${docdatadir}/$$i) && ${INSTALL} -m 644 $$x ${DESTDIR}${docdatadir}/$$i; then \
48+
${INSTALL_OK}; \
49+
else \
50+
${INSTALL_FAILED}; \
51+
fi \
52+
done \
53+
fi
54+
55+
# Hack to clean up in docs since it isn't included in SUBDIRS.
56+
pre-clean:
57+
@if test ! x"$(SPHINXBUILD)" = x && test ! x"$(SPHINXBUILD)" = xNOTFOUND ; then \
58+
$(MAKE) -C docs SPHINXBUILD="$(SPHINXBUILD)" clean ; \
59+
fi
60+
61+
# Hack to clean up test results in tests.
62+
pre-distclean:
63+
@find tests -name run.out -exec rm {} \;
64+
65+
# Remove the files generated by autogen.sh and the version stamp file.
66+
# In general, this should not be used when working with a distributed
67+
# source archive (.tar.gz) since those archives do not include autogen.sh for
68+
# rebuilding the configure script.
69+
repoclean: distclean
70+
for i in "" $(REPOCLEAN) ; do \
71+
test x"$$i" = x"" && continue; \
72+
if test -d "$$i" || test -f "$$i" ; then rm -rf "$$i" ; fi \
73+
done

0 commit comments

Comments
 (0)