aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAvatar Saleem Abdulrasool <compnerd@compnerd.org> 2016-01-17 12:14:38 -0800
committerAvatar Saleem Abdulrasool <compnerd@compnerd.org> 2016-01-17 12:16:56 -0800
commitab3bf63b75173ebf0fa3de6361ad4ae27f154894 (patch)
treebe45d7e5b5e57c821603a82331c2e0e576f3765b
parentcd722e33ba845a494ae19a6a45dfe4f60217a7a5 (diff)
downloadpaludis-ab3bf63b75173ebf0fa3de6361ad4ae27f154894.tar.gz
paludis-ab3bf63b75173ebf0fa3de6361ad4ae27f154894.tar.xz
build: support out-of-tree builds better
This adjusts the invocation of do_m4.bash to take two parameters, the m4 generator and the destination location. Doing so permits an out-of-tree build of paludis when the .m4 files are adjusted and the build needs to re-run the m4 files. While in the area, fix up a tiny bug with the generation of comparison_policy.hh.
-rwxr-xr-xautotools_prepare.bash10
-rw-r--r--hooks/Makefile.am.m42
-rwxr-xr-xmisc/do_m4.bash4
-rw-r--r--paludis/Makefile.am.m46
-rw-r--r--paludis/util/Makefile.am.m44
5 files changed, 13 insertions, 13 deletions
diff --git a/autotools_prepare.bash b/autotools_prepare.bash
index 642c447..8af91e9 100755
--- a/autotools_prepare.bash
+++ b/autotools_prepare.bash
@@ -9,9 +9,9 @@ fi
trap 'echo "exiting." ; exit 250' 15
KILL_PID=$$
-misc/do_m4.bash paludis/Makefile.am || exit $?
-misc/do_m4.bash paludis/paludis.hh || exit $?
-misc/do_m4.bash paludis/util/util.hh || exit $?
-misc/do_m4.bash paludis/util/Makefile.am || exit $?
-misc/do_m4.bash hooks/Makefile.am || exit $?
+misc/do_m4.bash paludis/Makefile.am.m4 paludis/Makefile.am || exit $?
+misc/do_m4.bash paludis/paludis.hh.m4 paludis/paludis.hh || exit $?
+misc/do_m4.bash paludis/util/util.hh.m4 paludis/util/util.hh || exit $?
+misc/do_m4.bash paludis/util/Makefile.am.m4 paludis/util/Makefile.am || exit $?
+misc/do_m4.bash hooks/Makefile.am.m4 hooks/Makefile.am || exit $?
diff --git a/hooks/Makefile.am.m4 b/hooks/Makefile.am.m4
index 39b9ee6..3094544 100644
--- a/hooks/Makefile.am.m4
+++ b/hooks/Makefile.am.m4
@@ -306,7 +306,7 @@ uninstall-local :
rm -f $(DESTDIR)/$(libexecdir)/paludis/hooks/*/log.bash
Makefile.am : Makefile.am.m4
- $(top_srcdir)/misc/do_m4.bash Makefile.am
+ $(top_srcdir)/misc/do_m4.bash $(abs_srcdir)/Makefile.am.m4 $(abs_builddir)/Makefile.am
all-local :
chmod +x $(builddir)/news.hook $(builddir)/eselect_env_update.bash
diff --git a/misc/do_m4.bash b/misc/do_m4.bash
index 63a042e..a924d93 100755
--- a/misc/do_m4.bash
+++ b/misc/do_m4.bash
@@ -16,8 +16,8 @@ get_m4() {
kill $KILL_PID
}
-echo ">>> $(get_m4 ) -I. -I.. -I../.. -E ${1}.m4 > ${1}"
-if ! $(get_m4 ) -I. -I.. -I../.. -E ${1}.m4 > ${1} ; then
+echo ">>> $(get_m4) -I. -I.. -I../.. -E ${1} > ${2}"
+if ! $(get_m4) -I. -I.. -I../.. -E ${1} > ${2} ; then
echo "oops!" 1>&2
exit 127
fi
diff --git a/paludis/Makefile.am.m4 b/paludis/Makefile.am.m4
index 72c1af1..da050b4 100644
--- a/paludis/Makefile.am.m4
+++ b/paludis/Makefile.am.m4
@@ -168,11 +168,11 @@ paludis_includedir = $(includedir)/paludis-$(PALUDIS_PC_SLOT)/paludis/
paludis_include_HEADERS = headerlist seheaderlist
Makefile.am : Makefile.am.m4 files.m4
- $(top_srcdir)/misc/do_m4.bash Makefile.am
+ $(top_srcdir)/misc/do_m4.bash $(abs_srcdir)/Makefile.am.m4 $(abs_builddir)/Makefile.am
paludis.hh : paludis.hh.m4 files.m4
- $(top_srcdir)/misc/do_m4.bash paludis.hh
+ $(top_srcdir)/misc/do_m4.bash $(abs_srcdir)/paludis.hh.m4 $(abs_builddir)/paludis.hh
comparison_policy.hh : comparison_policy.hh.m4
- $(top_srcdir)/misc/do_m4.bash comparison_policy.hh.m4
+ $(top_srcdir)/misc/do_m4.bash $(abs_srcdir)/comparison_policy.hh.m4 $(abs_builddir)/comparison_policy.hh
diff --git a/paludis/util/Makefile.am.m4 b/paludis/util/Makefile.am.m4
index bc4f550..36f82af 100644
--- a/paludis/util/Makefile.am.m4
+++ b/paludis/util/Makefile.am.m4
@@ -83,10 +83,10 @@ paludis_util_includedir = $(includedir)/paludis-$(PALUDIS_PC_SLOT)/paludis/util/
paludis_util_include_HEADERS = headerlist seheaderlist
Makefile.am : Makefile.am.m4 files.m4
- $(top_srcdir)/misc/do_m4.bash Makefile.am
+ $(top_srcdir)/misc/do_m4.bash $(abs_srcdir)/Makefile.am.m4 $(abs_builddir)/Makefile.am
util.hh : util.hh.m4 files.m4
- $(top_srcdir)/misc/do_m4.bash util.hh
+ $(top_srcdir)/misc/do_m4.bash $(abs_srcdir)/Makefile.am.m4 $(abs_builddir)/util.hh
libexecpaludisdir = $(libexecdir)/paludis
libexecpaludis_SCRIPTS = echo_functions.bash