Skip to content

Commit

Permalink
Start whacking Makefiles
Browse files Browse the repository at this point in the history
svn path=/branches/tk685/; revision=5758
  • Loading branch information
sraustein committed Apr 6, 2014
1 parent fe0bf50 commit cc30a7e
Show file tree
Hide file tree
Showing 23 changed files with 323 additions and 601 deletions.
86 changes: 82 additions & 4 deletions Makefile.in
Original file line number Diff line number Diff line change
@@ -1,16 +1,38 @@
# $Id$

PYTHON = @PYTHON@
CFLAGS = @CFLAGS@
LDFLAGS = @LDFLAGS@ @POW_LDFLAGS@
LIBS = @LIBS@

abs_top_builddir = @abs_top_builddir@
PYTHON = @PYTHON@
INSTALL = @INSTALL@ -m 555

SUBDIRS = @TOP_LEVEL_SUBDIRS@
prefix = @prefix@
exec_prefix = @exec_prefix@
datarootdir = @datarootdir@
datadir = @datadir@
localstatedir = @localstatedir@
sharedstatedir = @sharedstatedir@
sysconfdir = @sysconfdir@
bindir = @bindir@
sbindir = @sbindir@
libexecdir = @libexecdir@
sysconfdir = @sysconfdir@

abs_builddir = @abs_builddir@
abs_top_srcdir = @abs_top_srcdir@
abs_top_builddir= @abs_top_builddir@
srcdir = @srcdir@

SUBDIRS = @TOP_LEVEL_SUBDIRS@

SETUP_PY_INSTALL_LAYOUT = @SETUP_PY_INSTALL_LAYOUT@

default: all

test:: all

all:: VERSION
all:: VERSION rpki/autoconf.py setup_autoconf.py

all install clean test distclean deinstall uninstall::
@for i in ${SUBDIRS}; do echo "Making $@ in $$i"; (cd $$i && ${MAKE} $@); done
Expand All @@ -30,3 +52,59 @@ VERSION: .FORCE
${PYTHON} buildtools/make-version.py

.FORCE:

rpki/autoconf.py: Makefile
@echo 'Generating $@'; \
(echo '# Automatically generated. DO NOT EDIT.'; \
echo ; \
echo 'bindir = "${bindir}"'; \
echo 'datarootdir = "${datarootdir}"'; \
echo 'localstatedir = "${localstatedir}"'; \
echo 'sbindir = "${sbindir}"'; \
echo 'sharedstatedir = "${sharedstatedir}"'; \
echo 'sysconfdir = "${sysconfdir}"'; \
echo 'libexecdir = "${libexecdir}"'; \
echo ; \
echo 'WSGI_DAEMON_PROCESS = "${WSGI_DAEMON_PROCESS}"'; \
echo 'WSGI_PROCESS_GROUP = "${WSGI_PROCESS_GROUP}"'; \
echo 'RCYNIC_HTML_DIR = "${RCYNIC_HTML_DIR}"'; \
echo 'APACHE_VERSION = "${APACHE_VERSION}"'; \
echo 'WSGI_PYTHON_EGG_CACHE_DIR = "${WSGI_PYTHON_EGG_CACHE_DIR}"'; \
echo 'WSGI_PYTHON_EGG_CACHE_USER = "${WSGI_PYTHON_EGG_CACHE_USER}"'; \
) > $@

clean::
rm -f rpki/autoconf.py

setup_autoconf.py: rpki/autoconf.py
@echo 'Generating $@'; \
(cat rpki/autoconf.py; \
echo ; \
echo 'CFLAGS = """${CFLAGS}"""'; \
echo 'LDFLAGS = """${LDFLAGS}"""'; \
echo 'LIBS = """${LIBS}"""'; \
) > $@

clean::
rm -f setup_autoconf.py setup_autoconf.pyc

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
${PYTHON} setup.py build_ext --inplace

build/stamp: .FORCE setup_autoconf.py
${PYTHON} setup.py build
touch $@

clean::
rm -rf ${POW_SO} build dist

clean::
find . -type f -name '*.py[co]' -delete
4 changes: 2 additions & 2 deletions buildtools/make-version.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@
sys.stderr.write("Warning: Could not determine software version\n")

if old is None or v != old:
with open("rpki/version.py", "w") as f:
f.write("VERSION = \"%s\"\n" % v)
with open("VERSION", "w") as f:
f.write(v + "\n")
with open("rpkid/rpki/version.py", "w") as f:
f.write("VERSION = \"%s\"\n" % v)
87 changes: 3 additions & 84 deletions ca/Makefile.in
Original file line number Diff line number Diff line change
Expand Up @@ -33,58 +33,12 @@ APACHE_VERSION = @APACHE_VERSION@
WSGI_PYTHON_EGG_CACHE_DIR = @WSGI_PYTHON_EGG_CACHE_DIR@
WSGI_PYTHON_EGG_CACHE_USER = @WSGI_PYTHON_EGG_CACHE_USER@

RPKID_INSTALL_TARGETS = @RPKID_INSTALL_TARGETS@

SETUP_PY_INSTALL_LAYOUT = @SETUP_PY_INSTALL_LAYOUT@

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:: rpki/autoconf.py setup_autoconf.py rpki/relaxng.py myrpki.rng rpki/sql_schemas.py ${POW_SO} build/stamp

.FORCE:

${POW_SO}: .FORCE setup_autoconf.py
${PYTHON} setup.py build_ext --inplace

build/stamp: .FORCE setup_autoconf.py
${PYTHON} setup.py build
touch $@
CA_INSTALL_TARGETS = @CA_INSTALL_TARGETS@

clean::
rm -rf ${POW_SO} build dist

RNGS = left-right-schema.rng up-down-schema.rng publication-schema.rng myrpki.rng router-certificate-schema.rng

rpki/relaxng.py: ${abs_top_srcdir}/buildtools/make-relaxng.py ${RNGS}
${PYTHON} ${abs_top_srcdir}/buildtools/make-relaxng.py ${RNGS} >$@.tmp
mv $@.tmp $@

left-right-schema.rng: left-right-schema.rnc
${TRANG} left-right-schema.rnc left-right-schema.rng

up-down-schema.rng: up-down-schema.rnc
${TRANG} up-down-schema.rnc up-down-schema.rng

publication-schema.rng: publication-schema.rnc
${TRANG} publication-schema.rnc publication-schema.rng

myrpki.rng: myrpki.rnc
${TRANG} myrpki.rnc myrpki.rng

router-certificate-schema.rng: router-certificate-schema.rnc
${TRANG} router-certificate-schema.rnc router-certificate-schema.rng

rpki/sql_schemas.py: ${abs_top_srcdir}/buildtools/make-sql-schemas.py rpkid.sql pubd.sql
${PYTHON} ${abs_top_srcdir}/buildtools/make-sql-schemas.py >$@.tmp
mv $@.tmp $@

clean::
find . -type f -name '*.py[co]' -delete
cd tests; $(MAKE) $@

install:: ${RPKID_INSTALL_TARGETS}
install:: ${CA_INSTALL_TARGETS}

install-always:: all
${PYTHON} setup.py install ${SETUP_PY_ROOT} ${SETUP_PY_INSTALL_LAYOUT} --record installed
Expand Down Expand Up @@ -171,7 +125,7 @@ distclean:: clean docclean

all:: examples/rpki.conf

examples/rpki.conf: rpki/autoconf.py rpki-confgen rpki-confgen.xml
examples/rpki.conf: ${abs_top_srcdir}/rpki/autoconf.py rpki-confgen rpki-confgen.xml
${PYTHON} rpki-confgen \
--read-xml rpki-confgen.xml \
--autoconf \
Expand All @@ -185,41 +139,6 @@ examples/rpki.conf: rpki/autoconf.py rpki-confgen rpki-confgen.xml
clean::
rm -f examples/rpki.conf

rpki/autoconf.py: Makefile
@echo 'Generating $@'; \
(echo '# Automatically generated. DO NOT EDIT.'; \
echo ; \
echo 'bindir = "${bindir}"'; \
echo 'datarootdir = "${datarootdir}"'; \
echo 'localstatedir = "${localstatedir}"'; \
echo 'sbindir = "${sbindir}"'; \
echo 'sharedstatedir = "${sharedstatedir}"'; \
echo 'sysconfdir = "${sysconfdir}"'; \
echo 'libexecdir = "${libexecdir}"'; \
echo ; \
echo 'WSGI_DAEMON_PROCESS = "${WSGI_DAEMON_PROCESS}"'; \
echo 'WSGI_PROCESS_GROUP = "${WSGI_PROCESS_GROUP}"'; \
echo 'RCYNIC_HTML_DIR = "${RCYNIC_HTML_DIR}"'; \
echo 'APACHE_VERSION = "${APACHE_VERSION}"'; \
echo 'WSGI_PYTHON_EGG_CACHE_DIR = "${WSGI_PYTHON_EGG_CACHE_DIR}"'; \
echo 'WSGI_PYTHON_EGG_CACHE_USER = "${WSGI_PYTHON_EGG_CACHE_USER}"'; \
) > $@

clean::
rm -f rpki/autoconf.py

setup_autoconf.py: rpki/autoconf.py
@echo 'Generating $@'; \
(cat rpki/autoconf.py; \
echo ; \
echo 'CFLAGS = """${CFLAGS}"""'; \
echo 'LDFLAGS = """${LDFLAGS}"""'; \
echo 'LIBS = """${LIBS}"""'; \
) > $@

clean::
rm -f setup_autoconf.py setup_autoconf.pyc

install-postconf: \
install-user install-egg-cache install-conf install-apache install-mysql install-django install-bpki install-cron

Expand Down
1 change: 1 addition & 0 deletions ca/rpki
73 changes: 31 additions & 42 deletions configure
Original file line number Diff line number Diff line change
Expand Up @@ -582,7 +582,7 @@ PACKAGE_STRING='rpkitools 1.0'
PACKAGE_BUGREPORT=''
PACKAGE_URL=''

ac_unique_file="rcynic/rcynic.c"
ac_unique_file="rp/rcynic/rcynic.c"
# Factoring default headers for most tests.
ac_includes_default="\
#include <stdio.h>
Expand Down Expand Up @@ -629,7 +629,7 @@ TOP_LEVEL_SUBDIRS
WSGI_PYTHON_EGG_CACHE_USER
WSGI_PYTHON_EGG_CACHE_DIR
SETUP_PY_INSTALL_LAYOUT
RPKID_INSTALL_TARGETS
CA_INSTALL_TARGETS
RTR_ORIGIN_INSTALL_TARGETS
RCYNIC_INSTALL_TARGETS
RCYNIC_HTML_DIR
Expand Down Expand Up @@ -714,7 +714,7 @@ PATH_SEPARATOR
SHELL'
ac_subst_files='RCYNIC_MAKE_RULES
RTR_ORIGIN_MAKE_RULES
RPKID_MAKE_RULES'
CA_MAKE_RULES'
ac_user_opts='
enable_option_checking
with_system_openssl
Expand Down Expand Up @@ -4571,28 +4571,28 @@ $as_echo "$enable_target_installation" >&6; }
# rcynic jail setup is complicated enough that it's simplest to have
# different rule sets for different platforms. Icky, but....
# rpki-rtr isn't as complicated, but has similar issues, same hack.
# rpkid isn't as complicated either, but same hack.
# ca isn't as complicated either, but same hack.
case $host_os in
darwin*)
RCYNIC_MAKE_RULES='rcynic/rules.darwin.mk'
RTR_ORIGIN_MAKE_RULES='rtr-origin/rules.darwin.mk'
RPKID_MAKE_RULES='rpkid/rules.darwin.mk'
RCYNIC_MAKE_RULES='rp/rcynic/rules.darwin.mk'
RTR_ORIGIN_MAKE_RULES='rp/rtr-origin/rules.darwin.mk'
CA_MAKE_RULES='ca/rules.darwin.mk'
;;
freebsd*)
RCYNIC_MAKE_RULES='rcynic/rules.freebsd.mk'
RTR_ORIGIN_MAKE_RULES='rtr-origin/rules.freebsd.mk'
RPKID_MAKE_RULES='rpkid/rules.freebsd.mk'
RCYNIC_MAKE_RULES='rp/rcynic/rules.freebsd.mk'
RTR_ORIGIN_MAKE_RULES='rp/rtr-origin/rules.freebsd.mk'
CA_MAKE_RULES='ca/rules.freebsd.mk'
;;
linux*)
RCYNIC_MAKE_RULES='rcynic/rules.linux.mk'
RTR_ORIGIN_MAKE_RULES='rtr-origin/rules.linux.mk'
RPKID_MAKE_RULES='rpkid/rules.linux.mk'
RCYNIC_MAKE_RULES='rp/rcynic/rules.linux.mk'
RTR_ORIGIN_MAKE_RULES='rp/rtr-origin/rules.linux.mk'
CA_MAKE_RULES='ca/rules.linux.mk'
;;
*)
RCYNIC_MAKE_RULES='rcynic/rules.unknown.mk'
RTR_ORIGIN_MAKE_RULES='rtr-origin/rules.unknown.mk'
RPKID_MAKE_RULES='rpkid/rules.unknown.mk'
RCYNIC_MAKE_RULES='rp/rcynic/rules.unknown.mk'
RTR_ORIGIN_MAKE_RULES='rp/rtr-origin/rules.unknown.mk'
CA_MAKE_RULES='ca/rules.unknown.mk'
;;
esac
Expand Down Expand Up @@ -4629,7 +4629,7 @@ esac
RCYNIC_INSTALL_TARGETS='install-always'
RTR_ORIGIN_INSTALL_TARGETS='install-always'
RPKID_INSTALL_TARGETS='install-always'
CA_INSTALL_TARGETS='install-always'
if test $use_rcynic_jail = yes
then
Expand All @@ -4640,7 +4640,7 @@ if test $enable_target_installation = yes
then
RCYNIC_INSTALL_TARGETS="$RCYNIC_INSTALL_TARGETS install-postconf"
RTR_ORIGIN_INSTALL_TARGETS="$RTR_ORIGIN_INSTALL_TARGETS install-postconf"
RPKID_INSTALL_TARGETS="$RPKID_INSTALL_TARGETS install-postconf"
CA_INSTALL_TARGETS="$CA_INSTALL_TARGETS install-postconf"
fi
Expand Down Expand Up @@ -4992,20 +4992,14 @@ fi
TOP_LEVEL_SUBDIRS="h"
test $build_openssl = yes && TOP_LEVEL_SUBDIRS="$TOP_LEVEL_SUBDIRS openssl"
test $build_rp_tools = yes && TOP_LEVEL_SUBDIRS="$TOP_LEVEL_SUBDIRS rcynic utils rtr-origin"
test $build_ca_tools = yes && TOP_LEVEL_SUBDIRS="$TOP_LEVEL_SUBDIRS rpkid"
test $build_rp_tools = yes && TOP_LEVEL_SUBDIRS="$TOP_LEVEL_SUBDIRS rp"
test $build_ca_tools = yes && TOP_LEVEL_SUBDIRS="$TOP_LEVEL_SUBDIRS ca"
ac_config_files="$ac_config_files Makefile h/Makefile"
ac_config_files="$ac_config_files Makefile h/Makefile schemas/Makefile"
if test "X$RCYNIC_STATIC_RSYNC" != "X"
then
ac_config_files="$ac_config_files rcynic/static-rsync/Makefile"
fi
# OpenSSL has its own build system that bears no relationship to
# anything but itself, and our use of it is a bit weird, so this is a
# BFMI (Brute Force and Massive Ignorance) job.
Expand Down Expand Up @@ -5062,13 +5056,13 @@ fi
if test $build_rp_tools = yes
then
ac_config_files="$ac_config_files rcynic/Makefile utils/Makefile utils/find_roa/Makefile utils/hashdir/Makefile utils/print_rpki_manifest/Makefile utils/print_roa/Makefile utils/scan_roas/Makefile utils/scan_routercerts/Makefile utils/uri/Makefile rtr-origin/Makefile"
ac_config_files="$ac_config_files rp/Makefile rp/rcynic/Makefile rp/rcynic/static-rsync/Makefile rp/utils/Makefile rp/rtr-origin/Makefile"
fi
if test $build_ca_tools = yes
then
ac_config_files="$ac_config_files rpkid/Makefile rpkid/tests/Makefile"
ac_config_files="$ac_config_files ca/Makefile ca/tests/Makefile"
fi
Expand Down Expand Up @@ -5809,21 +5803,16 @@ do
case $ac_config_target in
"Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;;
"h/Makefile") CONFIG_FILES="$CONFIG_FILES h/Makefile" ;;
"rcynic/static-rsync/Makefile") CONFIG_FILES="$CONFIG_FILES rcynic/static-rsync/Makefile" ;;
"schemas/Makefile") CONFIG_FILES="$CONFIG_FILES schemas/Makefile" ;;
"openssl/Makefile") CONFIG_FILES="$CONFIG_FILES openssl/Makefile" ;;
"openssl/tests/Makefile") CONFIG_FILES="$CONFIG_FILES openssl/tests/Makefile" ;;
"rcynic/Makefile") CONFIG_FILES="$CONFIG_FILES rcynic/Makefile" ;;
"utils/Makefile") CONFIG_FILES="$CONFIG_FILES utils/Makefile" ;;
"utils/find_roa/Makefile") CONFIG_FILES="$CONFIG_FILES utils/find_roa/Makefile" ;;
"utils/hashdir/Makefile") CONFIG_FILES="$CONFIG_FILES utils/hashdir/Makefile" ;;
"utils/print_rpki_manifest/Makefile") CONFIG_FILES="$CONFIG_FILES utils/print_rpki_manifest/Makefile" ;;
"utils/print_roa/Makefile") CONFIG_FILES="$CONFIG_FILES utils/print_roa/Makefile" ;;
"utils/scan_roas/Makefile") CONFIG_FILES="$CONFIG_FILES utils/scan_roas/Makefile" ;;
"utils/scan_routercerts/Makefile") CONFIG_FILES="$CONFIG_FILES utils/scan_routercerts/Makefile" ;;
"utils/uri/Makefile") CONFIG_FILES="$CONFIG_FILES utils/uri/Makefile" ;;
"rtr-origin/Makefile") CONFIG_FILES="$CONFIG_FILES rtr-origin/Makefile" ;;
"rpkid/Makefile") CONFIG_FILES="$CONFIG_FILES rpkid/Makefile" ;;
"rpkid/tests/Makefile") CONFIG_FILES="$CONFIG_FILES rpkid/tests/Makefile" ;;
"rp/Makefile") CONFIG_FILES="$CONFIG_FILES rp/Makefile" ;;
"rp/rcynic/Makefile") CONFIG_FILES="$CONFIG_FILES rp/rcynic/Makefile" ;;
"rp/rcynic/static-rsync/Makefile") CONFIG_FILES="$CONFIG_FILES rp/rcynic/static-rsync/Makefile" ;;
"rp/utils/Makefile") CONFIG_FILES="$CONFIG_FILES rp/utils/Makefile" ;;
"rp/rtr-origin/Makefile") CONFIG_FILES="$CONFIG_FILES rp/rtr-origin/Makefile" ;;
"ca/Makefile") CONFIG_FILES="$CONFIG_FILES ca/Makefile" ;;
"ca/tests/Makefile") CONFIG_FILES="$CONFIG_FILES ca/tests/Makefile" ;;
*) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
esac
Expand Down
Loading

0 comments on commit cc30a7e

Please sign in to comment.