Revision a2d7ea09 Makefile.am
b/Makefile.am | ||
---|---|---|
116 | 116 |
$(APIDOC_HS_DIR)/Ganeti/HTools \ |
117 | 117 |
$(APIDOC_HS_DIR)/Ganeti/HTools/Backend \ |
118 | 118 |
$(APIDOC_HS_DIR)/Ganeti/HTools/Program \ |
119 |
$(APIDOC_HS_DIR)/Ganeti/Query
|
|
119 |
$(APIDOC_HS_DIR)/Ganeti/Query |
|
120 | 120 |
|
121 | 121 |
BUILDTIME_DIR_AUTOCREATE = \ |
122 | 122 |
scripts \ |
... | ... | |
135 | 135 |
DIRCHECK_EXCLUDE = \ |
136 | 136 |
$(BUILDTIME_DIRS) \ |
137 | 137 |
ganeti-[0-9]*.[0-9]*.[0-9]* \ |
138 |
doc/html/_* |
|
138 |
doc/html/_* \ |
|
139 |
autom4te.cache |
|
139 | 140 |
|
140 | 141 |
# some helper vars |
141 | 142 |
COVERAGE_DIR = doc/coverage |
... | ... | |
639 | 640 |
@mkdir_p@ $(DESTDIR)$(iallocatorsdir) |
640 | 641 |
# FIXME: this is a hardcoded logic, instead of auto-resolving |
641 | 642 |
$(LN_S) -f ../../../bin/htools \ |
642 |
$(DESTDIR)$(iallocatorsdir)/hail
|
|
643 |
$(DESTDIR)$(iallocatorsdir)/hail |
|
643 | 644 |
for role in $(HS_BIN_ROLES); do \ |
644 |
$(LN_S) -f htools \ |
|
645 |
$(DESTDIR)$(bindir)/$$role ; \ |
|
645 |
$(LN_S) -f htools $(DESTDIR)$(bindir)/$$role ; \ |
|
646 | 646 |
done |
647 | 647 |
endif |
648 | 648 |
|
... | ... | |
1422 | 1422 |
stamp-srclinks: Makefile | stamp-directories |
1423 | 1423 |
set -e; \ |
1424 | 1424 |
for i in $(srclink_files); do \ |
1425 |
if test ! -f $$i -a -f $(abs_top_srcdir)/$$i; then \
|
|
1426 |
$(LN_S) $(abs_top_srcdir)/$$i $$i; \
|
|
1427 |
fi; \
|
|
1425 |
if test ! -f $$i -a -f $(abs_top_srcdir)/$$i; then \
|
|
1426 |
$(LN_S) $(abs_top_srcdir)/$$i $$i; \
|
|
1427 |
fi; \
|
|
1428 | 1428 |
done |
1429 | 1429 |
touch $@ |
1430 | 1430 |
|
... | ... | |
1435 | 1435 |
.PHONY: check-dirs |
1436 | 1436 |
check-dirs: $(GENERATED_FILES) |
1437 | 1437 |
@set -e; \ |
1438 |
find . -type d \( \( -name . \) -o \( \ |
|
1439 |
-name .git -o \ |
|
1440 |
-name autom4te.cache \ |
|
1441 |
\) -prune -o -print \) | { \ |
|
1442 |
error=; \ |
|
1443 |
while read dir; do \ |
|
1444 |
case "$$dir" in \ |
|
1445 |
$(strip $(patsubst %,(./%) ;;,$(DIRCHECK_EXCLUDE) $(DIRS))) \ |
|
1446 |
*) error=1; echo "Directory $$dir not listed in Makefile" >&2 ;; \ |
|
1447 |
esac; \ |
|
1448 |
done; \ |
|
1449 |
for dir in $(DIRS); do \ |
|
1450 |
if ! test -d "$$dir"; then \ |
|
1451 |
echo "Directory $$dir listed in DIRS does not exist" >&2; \ |
|
1452 |
error=1; \ |
|
1453 |
fi \ |
|
1454 |
done; \ |
|
1455 |
if test -n "$$error"; then exit 1; else exit 0; fi; \ |
|
1438 |
find . -type d \( -name . -o -name .git -prune -o -print \) | { \ |
|
1439 |
error=; \ |
|
1440 |
while read dir; do \ |
|
1441 |
case "$$dir" in \ |
|
1442 |
$(strip $(patsubst %,(./%) ;;,$(DIRCHECK_EXCLUDE) $(DIRS))) \ |
|
1443 |
*) error=1; echo "Directory $$dir not listed in Makefile" >&2 ;; \ |
|
1444 |
esac; \ |
|
1445 |
done; \ |
|
1446 |
for dir in $(DIRS); do \ |
|
1447 |
if ! test -d "$$dir"; then \ |
|
1448 |
echo "Directory $$dir listed in DIRS does not exist" >&2; \ |
|
1449 |
error=1; \ |
|
1450 |
fi \ |
|
1451 |
done; \ |
|
1452 |
test -z "$$error"; \ |
|
1456 | 1453 |
} |
1457 | 1454 |
|
1458 | 1455 |
.PHONY: check-local |
... | ... | |
1464 | 1461 |
PYTHONPATH=. $(RUN_IN_TEMPDIR) $(CURDIR)/$(CHECK_IMPORTS) . $(standalone_python_modules) |
1465 | 1462 |
@expver=$(VERSION_MAJOR).$(VERSION_MINOR); \ |
1466 | 1463 |
if test "`head -n 1 $(top_srcdir)/README`" != "Ganeti $$expver"; then \ |
1467 |
echo "Incorrect version in README, expected $$expver"; \
|
|
1468 |
exit 1; \
|
|
1464 |
echo "Incorrect version in README, expected $$expver"; \
|
|
1465 |
exit 1; \
|
|
1469 | 1466 |
fi; \ |
1470 | 1467 |
for file in doc/iallocator.rst doc/hooks.rst doc/virtual-cluster.rst \ |
1471 |
doc/security.rst; do \
|
|
1472 |
if test "`sed -ne '4 p' $(top_srcdir)/$$file`" != \
|
|
1473 |
"Documents Ganeti version $$expver"; then \
|
|
1474 |
echo "Incorrect version in $$file, expected $$expver"; \
|
|
1475 |
exit 1; \
|
|
1476 |
fi; \
|
|
1468 |
doc/security.rst; do \
|
|
1469 |
if test "`sed -ne '4 p' $(top_srcdir)/$$file`" != \
|
|
1470 |
"Documents Ganeti version $$expver"; then \
|
|
1471 |
echo "Incorrect version in $$file, expected $$expver"; \
|
|
1472 |
exit 1; \
|
|
1473 |
fi; \
|
|
1477 | 1474 |
done; \ |
1478 | 1475 |
if ! test -f $(top_srcdir)/doc/design-$$expver.rst; then \ |
1479 |
echo "File $(top_srcdir)/doc/design-$$expver.rst not found"; \
|
|
1480 |
exit 1; \
|
|
1476 |
echo "File $(top_srcdir)/doc/design-$$expver.rst not found"; \
|
|
1477 |
exit 1; \
|
|
1481 | 1478 |
fi; \ |
1482 | 1479 |
if test $$(wc --max-line-length < $(top_srcdir)/configure.ac) -gt 80; then \ |
1483 |
echo 'Longest line in configure.ac is longer than 80 characters' >&2; \
|
|
1480 |
echo 'Longest line in configure.ac is longer than 80 characters' >&2; \
|
|
1484 | 1481 |
fi |
1485 | 1482 |
|
1486 | 1483 |
.PHONY: hs-check |
... | ... | |
1534 | 1531 |
pep8: $(GENERATED_FILES) |
1535 | 1532 |
@test -n "$(PEP8)" || { echo 'pep8' not found during configure; exit 1; } |
1536 | 1533 |
$(PEP8) --ignore='$(PEP8_IGNORE)' --exclude='$(PEP8_EXCLUDE)' \ |
1537 |
--repeat $(pep8_python_code)
|
|
1534 |
--repeat $(pep8_python_code)
|
|
1538 | 1535 |
|
1539 | 1536 |
# FIXME: remove ignore "Use void" when GHC 6.x is deprecated |
1540 | 1537 |
.PHONY: hlint |
... | ... | |
1561 | 1558 |
# a distcheck hook rule for catching revision control directories |
1562 | 1559 |
distcheck-hook: |
1563 | 1560 |
if find $(top_distdir) -name .svn -or -name .git | grep .; then \ |
1564 |
echo "Found revision control files in final archive." 1>&2; \
|
|
1565 |
exit 1; \
|
|
1561 |
echo "Found revision control files in final archive." 1>&2; \
|
|
1562 |
exit 1; \
|
|
1566 | 1563 |
fi |
1567 | 1564 |
if find $(top_distdir) -name '*.py[co]' | grep .; then \ |
1568 |
echo "Found Python byte code in final archive." 1>&2; \
|
|
1569 |
exit 1; \
|
|
1565 |
echo "Found Python byte code in final archive." 1>&2; \
|
|
1566 |
exit 1; \
|
|
1570 | 1567 |
fi |
1571 | 1568 |
if find $(top_distdir) -name '*~' | grep .; then \ |
1572 |
echo "Found backup files in final archive." 1>&2; \
|
|
1573 |
exit 1; \
|
|
1569 |
echo "Found backup files in final archive." 1>&2; \
|
|
1570 |
exit 1; \
|
|
1574 | 1571 |
fi |
1575 | 1572 |
# Empty files or directories should not be distributed. They can cause |
1576 | 1573 |
# unnecessary warnings for packagers. Directories used by automake during |
1577 | 1574 |
# distcheck must be excluded. |
1578 | 1575 |
if find $(top_distdir) -empty -and -not \( \ |
1579 |
-path $(top_distdir)/_build -or \
|
|
1580 |
-path $(top_distdir)/_inst \) | grep .; then \
|
|
1581 |
echo "Found empty files or directories in final archive." 1>&2; \
|
|
1582 |
exit 1; \
|
|
1576 |
-path $(top_distdir)/_build -or \
|
|
1577 |
-path $(top_distdir)/_inst \) | grep .; then \
|
|
1578 |
echo "Found empty files or directories in final archive." 1>&2; \
|
|
1579 |
exit 1; \
|
|
1583 | 1580 |
fi |
1584 | 1581 |
if test -n "$(BUILD_RELEASE)" && \ |
1585 | 1582 |
grep -n -H -E '^\*.*unreleased' $(top_distdir)/NEWS; then \ |
1586 |
echo "Found unreleased version in NEWS." >&2; \
|
|
1587 |
exit 1; \
|
|
1583 |
echo "Found unreleased version in NEWS." >&2; \
|
|
1584 |
exit 1; \
|
|
1588 | 1585 |
fi |
1589 | 1586 |
|
1590 | 1587 |
# When building a release, stricter checks should be used |
... | ... | |
1607 | 1604 |
dist-release: dist |
1608 | 1605 |
set -e; \ |
1609 | 1606 |
for i in $(DIST_ARCHIVES); do \ |
1610 |
echo -n "Checking $$i ... "; \
|
|
1611 |
autotools/check-tar < $$i; \
|
|
1612 |
echo OK; \
|
|
1607 |
echo -n "Checking $$i ... "; \
|
|
1608 |
autotools/check-tar < $$i; \
|
|
1609 |
echo OK; \
|
|
1613 | 1610 |
done |
1614 | 1611 |
|
1615 | 1612 |
install-exec-local: |
... | ... | |
1627 | 1624 |
.PHONY: py-apidoc |
1628 | 1625 |
py-apidoc: epydoc.conf $(RUN_IN_TEMPDIR) $(GENERATED_FILES) |
1629 | 1626 |
$(RUN_IN_TEMPDIR) epydoc -v \ |
1630 |
--conf $(CURDIR)/epydoc.conf \
|
|
1631 |
--output $(CURDIR)/$(APIDOC_PY_DIR)
|
|
1627 |
--conf $(CURDIR)/epydoc.conf \
|
|
1628 |
--output $(CURDIR)/$(APIDOC_PY_DIR)
|
|
1632 | 1629 |
|
1633 | 1630 |
.PHONY: hs-apidoc |
1634 | 1631 |
hs-apidoc: $(HS_BUILT_SRCS) |
... | ... | |
1638 | 1635 |
{ echo 'haddock' not found during configure; exit 1; } |
1639 | 1636 |
rm -rf $(APIDOC_HS_DIR)/* |
1640 | 1637 |
for i in $(ALL_APIDOC_HS_DIRS); do \ |
1641 |
@mkdir_p@ $$i; \
|
|
1638 |
@mkdir_p@ $$i; \
|
|
1642 | 1639 |
done |
1643 | 1640 |
$(HSCOLOUR) -print-css > $(APIDOC_HS_DIR)/Ganeti/hscolour.css |
1644 | 1641 |
$(LN_S) ../hscolour.css $(APIDOC_HS_DIR)/Ganeti/HTools/hscolour.css |
... | ... | |
1657 | 1654 |
fi; \ |
1658 | 1655 |
RELSRCS="$(HS_LIB_SRCS:htools/%=%) $(patsubst htools/%,%,$(filter htools/%,$(HS_BUILT_SRCS)))"; \ |
1659 | 1656 |
for file in $$RELSRCS; do \ |
1660 |
hfile=`echo $$file|sed 's/\\.hs$$//'`.html; \
|
|
1661 |
$(HSCOLOUR) -css -anchor $$file > ../$(APIDOC_HS_DIR)/$$hfile ; \
|
|
1657 |
hfile=`echo $$file|sed 's/\\.hs$$//'`.html; \
|
|
1658 |
$(HSCOLOUR) -css -anchor $$file > ../$(APIDOC_HS_DIR)/$$hfile ; \
|
|
1662 | 1659 |
done ; \ |
1663 | 1660 |
$(HADDOCK) --odir ../$(APIDOC_HS_DIR) --html --ignore-all-exports -w \ |
1664 |
-t ganeti -p haddock-prologue \
|
|
1665 |
--source-module="%{MODULE/.//}.html" \
|
|
1666 |
--source-entity="%{MODULE/.//}.html#%{NAME}" \
|
|
1667 |
$$OPTGHC \
|
|
1668 |
$(filter-out Ganeti/HTools/ExtLoader.hs,$(HS_LIB_SRCS:htools/%=%))
|
|
1661 |
-t ganeti -p haddock-prologue \
|
|
1662 |
--source-module="%{MODULE/.//}.html" \
|
|
1663 |
--source-entity="%{MODULE/.//}.html#%{NAME}" \
|
|
1664 |
$$OPTGHC \
|
|
1665 |
$(filter-out Ganeti/HTools/ExtLoader.hs,$(HS_LIB_SRCS:htools/%=%))
|
|
1669 | 1666 |
|
1670 | 1667 |
.PHONY: TAGS |
1671 | 1668 |
TAGS: $(GENERATED_FILES) |
... | ... | |
1722 | 1719 |
--output=live-test.tix ; \ |
1723 | 1720 |
@mkdir_p@ ../$(COVERAGE_HS_DIR) ; \ |
1724 | 1721 |
hpc markup --destdir=../$(COVERAGE_HS_DIR) live-test \ |
1725 |
--srcdir=.. $(HPCEXCL) ; \
|
|
1722 |
--srcdir=.. $(HPCEXCL) ; \
|
|
1726 | 1723 |
hpc report --srcdir=.. live-test $(HPCEXCL) |
1727 | 1724 |
|
1728 | 1725 |
commit-check: distcheck lint apidoc |
Also available in: Unified diff