diff options
author | Rob Austein <sra@hactrn.net> | 2014-04-08 23:14:52 +0000 |
---|---|---|
committer | Rob Austein <sra@hactrn.net> | 2014-04-08 23:14:52 +0000 |
commit | 1786df7be1be1a8c7af23d0701cafcb9d8fb6d48 (patch) | |
tree | 5c5e7e4396558eda91117f791f0e25d46b983dc8 /Makefile.in | |
parent | 4b18b371047d97257a908803e0c60bf1f3619222 (diff) |
First cut at revised top-level rules and macros. Tediously verbose at
the moment, clean that up later, but seems to work as intended.
svn path=/branches/tk685/; revision=5769
Diffstat (limited to 'Makefile.in')
-rw-r--r-- | Makefile.in | 128 |
1 files changed, 109 insertions, 19 deletions
diff --git a/Makefile.in b/Makefile.in index 4465ef9e..bd08aae9 100644 --- a/Makefile.in +++ b/Makefile.in @@ -24,36 +24,126 @@ abs_top_srcdir = @abs_top_srcdir@ abs_top_builddir= @abs_top_builddir@ srcdir = @srcdir@ -SUBDIRS = @TOP_LEVEL_SUBDIRS@ +OPENSSL_TARGET = @OPENSSL_TARGET@ +RP_TARGET = @RP_TARGET@ +CA_TARGET = @CA_TARGET@ SETUP_PY_INSTALL_LAYOUT = @SETUP_PY_INSTALL_LAYOUT@ +POW_SO = rpki/POW/_POW.so + +# Generic targets. The macros are to deal with ./configure options. + default: all -test:: all +all: VERSION rpki/autoconf.py setup_autoconf.py ${RP_TARGET}-all ${CA_TARGET}-all + +clean: ${RP_TARGET}-clean ${CA_TARGET}-clean + rm -rf build dist autom4te.cache rpki/autoconf.py setup_autoconf.py setup_autoconf.pyc + +test: all ${RP_TARGET}-test ${CA_TARGET}-test + +distclean: clean ${RP_TARGET}-distclean ${CA_TARGET}-distclean + rm -f Makefile config.log config.status + +install: ${RP_TARGET}-install ${CA_TARGET}-install + +deinstall: ${RP_TARGET}-deinstall ${CA_TARGET}-deinstall + +uninstall: deinstall + +# Harmless do-nothing targets to simplify the macro-based mess above. + +noop-all noop-clean noop-test noop-distclean noop-install noop-deinstall: + @true + +# Targets for the RP package. This includes the libraries, thus the bulk +# of the code, although some of it won't run without dependencies and setup +# that only come with the CA package. + +rp-all: h-all schemas-all ${OPENSSL_TARGET}-all rpki-all + cd rp; ${MAKE} all + +rp-clean: ${OPENSSL_TARGET}-clean rpki-clean + cd rp; ${MAKE} clean + +rp-test: ${OPENSSL_TARGET}-test rpki-test + cd rp; ${MAKE} test + +rp-distclean: ${OPENSSL_TARGET}-distclean rpki-distclean + cd rp; ${MAKE} distclean + +rp-install: rpki-install + cd rp; ${MAKE} install + +rp-deinstall: rpki-deinstall + cd rp; ${MAKE} deinstall + + +# Targets for the CA package. + +ca-all: + cd ca; ${MAKE} all -all:: VERSION rpki/autoconf.py setup_autoconf.py +ca-clean: + cd ca; ${MAKE} clean -all install clean test distclean deinstall uninstall:: - @for i in ${SUBDIRS}; do echo "Making $@ in $$i"; (cd $$i && ${MAKE} $@); done +ca-test: + cd ca; ${MAKE} test -export: - svn export http://subvert-rpki.hactrn.net/ - tar czf subvert-rpki.hactrn.net-$$(date +%Y.%m.%d).tar.gz subvert-rpki.hactrn.net - rm -rf subvert-rpki.hactrn.net +ca-distclean: + cd ca; ${MAKE} distclean -clean distclean:: - rm -rf build autom4te.cache rpki/autoconf.py setup_autoconf.py setup_autoconf.pyc ${POW_SO} build dist +ca-install: + cd ca; ${MAKE} install + +ca-deinstall: + cd ca; ${MAKE} deinstall + +# Supporting targets. First pass on a lot of this is going to look +# very silly, will simplify after this is working. + +h-all: + cd h; ${MAKE} all + +schemas-all: + cd schemas; ${MAKE} all + +openssl-all: + cd openssl; ${MAKE} all + +openssl-clean: + cd openssl; ${MAKE} clean + +openssl-test: + cd openssl; ${MAKE} test + +openssl-distclean: + cd openssl; ${MAKE} distclean + + +rpki-all: setup_autoconf.py ${POW_SO} build/stamp + +rpki-clean: + rm -rf build dist ${POW_SO} find . -type f -name '*.py[co]' -delete -distclean:: - rm -rf Makefile config.log config.status +rpki-test: unit-tests + +rpki-distclean: + @true + +rpki-install: + @false + +rpki-deinstall: + @false + +### VERSION: .FORCE ${PYTHON} buildtools/make-version.py -.FORCE: - rpki/autoconf.py: Makefile @echo 'Generating $@'; \ (echo '# Automatically generated. DO NOT EDIT.'; \ @@ -85,10 +175,6 @@ setup_autoconf.py: rpki/autoconf.py SETUP_PY_ROOT = `${PYTHON} -c 'import sys; print "--root " + sys.argv[1] if sys.argv[1] else ""' '${DESTDIR}'` -POW_SO = rpki/POW/_POW.so - -all:: setup_autoconf.py ${POW_SO} build/stamp - .FORCE: ${POW_SO}: .FORCE setup_autoconf.py @@ -98,6 +184,10 @@ build/stamp: .FORCE setup_autoconf.py ${PYTHON} setup.py build touch $@ +unit-tests: all + @echo Running unit tests + PWD=`pwd`; for i in rpki/*.py; do echo "[$$i]"; PYTHONPATH=$$PWD ${PYTHON} $$i; done + lint: find rpki -name '*.py' | xargs pylint --rcfile ${abs_top_srcdir}/buildtools/pylint.rc |