diff options
author | Morgan Deters <mdeters@gmail.com> | 2009-12-17 00:02:12 +0000 |
---|---|---|
committer | Morgan Deters <mdeters@gmail.com> | 2009-12-17 00:02:12 +0000 |
commit | 73fd355fd1a9f6cacfc3170d29e29fccc94ab539 (patch) | |
tree | e88c1a48887ec1053d7fff40a9cb6ba5b8501e87 /Makefile.am | |
parent | 426b8722e6e32f7fab46769e4d71184bf510fd0e (diff) |
support nonstandard, unconfigured builds (e.g., "./configure debug" followed by "make production ASSERTIONS=1")
Diffstat (limited to 'Makefile.am')
-rw-r--r-- | Makefile.am | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/Makefile.am b/Makefile.am index 76130be45..07a91f21a 100644 --- a/Makefile.am +++ b/Makefile.am @@ -5,8 +5,15 @@ ACLOCAL_AMFLAGS = -I config SUBDIRS = src test doc contrib +@mk_include@ @top_srcdir@/Makefile.reconf_args + .PHONY: production debug default competition -production: ; (cd @top_srcdir@ && ./configure --with-build=production && $(MAKE)) -debug: ; (cd @top_srcdir@ && ./configure --with-build=debug && $(MAKE)) -default: ; (cd @top_srcdir@ && ./configure --with-build=default && $(MAKE)) -competition:; (cd @top_srcdir@ && ./configure --with-build=competition && $(MAKE)) +production debug default competition: + cd @top_srcdir@; \ + dir="builds/`config/config.guess`/`config/build-type $@ $(BTARGS)`"; \ + if test -e "$$dir"; then \ + cd "$$dir" && $(MAKE); \ + else \ + ./configure --with-build=$@ $(CONFARGS) && $(MAKE); \ + fi + |