diff options
author | Rob Austein <sra@hactrn.net> | 2010-12-28 19:14:25 +0000 |
---|---|---|
committer | Rob Austein <sra@hactrn.net> | 2010-12-28 19:14:25 +0000 |
commit | 31e451b448ad5bad4237776172675fc6a74e0205 (patch) | |
tree | 27cb301578c614656f3e2ab10758a00d842c64a6 | |
parent | e53a56120ca7aeafa2c85bfb6dc502709fbef74f (diff) |
Conditionalize which subdirectories we build, based on what configure
finds and what configure options are enabled.
Building with system OpenSSL doesn't quite work yet, still too many
hardwired paths in Makefiles.
svn path=/Makefile.in; revision=3578
-rw-r--r-- | Makefile.in | 6 | ||||
-rwxr-xr-x | configure | 29 | ||||
-rw-r--r-- | configure.ac | 21 | ||||
-rw-r--r-- | pow/Makefile | 6 | ||||
-rw-r--r-- | pywrap/Makefile (renamed from pow/pywrap/Makefile) | 0 | ||||
-rw-r--r-- | pywrap/build.py (renamed from pow/pywrap/build.py) | 2 | ||||
-rw-r--r-- | pywrap/pywrap.c (renamed from pow/pywrap/pywrap.c) | 0 |
7 files changed, 48 insertions, 16 deletions
diff --git a/Makefile.in b/Makefile.in index 20b0ef5a..96571de3 100644 --- a/Makefile.in +++ b/Makefile.in @@ -1,10 +1,6 @@ # $Id$ -# This top-level Makefile doesn't really need to be run through -# autoconf at all yet, but the need to run ./configure is more obvious -# if there's no Makefile at the top.... - -SUBDIRS = openssl rcynic utils pow rpkid +SUBDIRS = @TOP_LEVEL_SUBDIRS@ all install clean test: @for i in ${SUBDIRS}; do echo "Making $@ in $$i"; (cd $$i && ${MAKE} $@); done @@ -700,6 +700,7 @@ OPENSSL_CONFIG_COMMAND XSLTPROC AWK PYTHON +TOP_LEVEL_SUBDIRS PYWRAP LIBOBJS LTLIBOBJS' @@ -4532,20 +4533,40 @@ fi # If any of this fails, we need to tell the user and give useful hint # on what to do next (doc reference, whatever). +TOP_LEVEL_SUBDIRS="" + +if test $build_openssl = yes +then + TOP_LEVEL_SUBDIRS="$TOP_LEVEL_SUBDIRS openssl" +fi + +TOP_LEVEL_SUBDIRS="$TOP_LEVEL_SUBDIRS rcynic utils" + if test $build_pywrap = yes then - # Eventually this should be the installation directory, but - # we're not there yet. + TOP_LEVEL_SUBDIRS="$TOP_LEVEL_SUBDIRS pywrap" +fi +if test $build_python = yes +then + TOP_LEVEL_SUBDIRS="$TOP_LEVEL_SUBDIRS pow rpkid" +fi + + + +if test $build_pywrap = yes +then + # Eventually this should be the installation directory, but + # for now we're still running out of the build tree. PYWRAP=`pwd`/pow/pywrap/pywrap else + # If we don't need pywrap, just make it expand to python PYWRAP=$PYTHON fi if test $build_python = yes then - # These are plain Python scripts, do not require pywrap ac_config_files="$ac_config_files rpkid/backup-sql:buildtools/python-header:rpkid/backup-sql.py" @@ -4577,8 +4598,6 @@ then ac_config_files="$ac_config_files rpkid/tests/testpoke:buildtools/pywrap-header:rpkid/tests/testpoke.py" - - fi # This isn't the complete list of Makefiles (let alone setup.py, etc diff --git a/configure.ac b/configure.ac index ac41e703..54cc89a4 100644 --- a/configure.ac +++ b/configure.ac @@ -233,6 +233,27 @@ fi # If any of this fails, we need to tell the user and give useful hint # on what to do next (doc reference, whatever). +TOP_LEVEL_SUBDIRS="" + +if test $build_openssl = yes +then + TOP_LEVEL_SUBDIRS="$TOP_LEVEL_SUBDIRS openssl" +fi + +TOP_LEVEL_SUBDIRS="$TOP_LEVEL_SUBDIRS rcynic utils" + +if test $build_pywrap = yes +then + TOP_LEVEL_SUBDIRS="$TOP_LEVEL_SUBDIRS pywrap" +fi + +if test $build_python = yes +then + TOP_LEVEL_SUBDIRS="$TOP_LEVEL_SUBDIRS pow rpkid" +fi +AC_SUBST(TOP_LEVEL_SUBDIRS) + + if test $build_pywrap = yes then # Eventually this should be the installation directory, but diff --git a/pow/Makefile b/pow/Makefile index c5d267d2..6b58d9da 100644 --- a/pow/Makefile +++ b/pow/Makefile @@ -12,19 +12,15 @@ SOURCES = POW-${VERSION}/lib/__init__.py \ POW-${VERSION}/dumpasn1.cfg \ POW-${VERSION}/POW.c -all: ${STAMP} pywrap/pywrap +all: ${STAMP} ${STAMP}: ${SOURCES} cd POW-${VERSION}; python setup.py build ln -sf POW-${VERSION}/build/lib.* buildlib touch $@ -pywrap/pywrap: - cd pywrap; ${MAKE} pywrap - clean: rm -rf POW-${VERSION}/build buildlib - cd pywrap; ${MAKE} $@ install: @echo Not attempting to install modified POW, if you want that, do it yourself diff --git a/pow/pywrap/Makefile b/pywrap/Makefile index 7c37faab..7c37faab 100644 --- a/pow/pywrap/Makefile +++ b/pywrap/Makefile diff --git a/pow/pywrap/build.py b/pywrap/build.py index d514be91..23bd4cdf 100644 --- a/pow/pywrap/build.py +++ b/pywrap/build.py @@ -25,7 +25,7 @@ import os, subprocess, sys from distutils.sysconfig import (get_config_var as getvar, get_python_inc as getinc) -openssl_dir = os.path.realpath(os.path.join(os.getcwd(), "../../openssl/openssl")) +openssl_dir = os.path.realpath(os.path.join(os.getcwd(), "../openssl/openssl")) cmd = getvar("CC").split() diff --git a/pow/pywrap/pywrap.c b/pywrap/pywrap.c index 10638721..10638721 100644 --- a/pow/pywrap/pywrap.c +++ b/pywrap/pywrap.c |