* [PATCH] configure: replace ${CXXLAGS} with ${CXXFLAGS_for_sh}
@ 2016-05-03 17:23 Tomi Ollila
2016-05-06 18:11 ` [PATCH] configure: add set -u Tomi Ollila
0 siblings, 1 reply; 4+ messages in thread
From: Tomi Ollila @ 2016-05-03 17:23 UTC (permalink / raw)
To: notmuch; +Cc: tomi.ollila
Variable CXXLAGS expands to nothing, CXXFLAGS something unusable
here; CXXFLAGS_for_sh expands to what we expect here.
---
I was palying with a patch set that enables 'set -eu' in usable way
when I noticed this...
configure | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/configure b/configure
index 09e009b34115..0cbd64b1d26b 100755
--- a/configure
+++ b/configure
@@ -380,7 +380,7 @@ int main(int argc, char** argv) {
Xapian::WritableDatabase db("test.db",Xapian::DB_CREATE_OR_OPEN);
}
EOF
- ${CXX} ${CXXLAGS} ${xapian_cxxflags} _default_backend.cc -o _default_backend ${xapian_ldflags}
+ ${CXX} ${CXXFLAGS_for_sh} ${xapian_cxxflags} _default_backend.cc -o _default_backend ${xapian_ldflags}
./_default_backend
if [ -f test.db/iamglass ]; then
default_xapian_backend=glass
--
2.6.4
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [PATCH] configure: add set -u
2016-05-03 17:23 [PATCH] configure: replace ${CXXLAGS} with ${CXXFLAGS_for_sh} Tomi Ollila
@ 2016-05-06 18:11 ` Tomi Ollila
2016-05-07 22:27 ` David Bremner
2016-09-29 11:41 ` David Bremner
0 siblings, 2 replies; 4+ messages in thread
From: Tomi Ollila @ 2016-05-06 18:11 UTC (permalink / raw)
To: notmuch; +Cc: tomi.ollila
In case of any unset variable, make ./configure exit with nonzero value;
an attempt to expand an unset variable is a bug in the script
(usually a spelling mistake) and those should not pass through
unnoticed.
---
I was also doing set -e support but that has quite a few nontrivial
things in it. Set -u catches all lagging c++ compilers and so on ;).
Perhaps later.
This change requires id:1462296224-768-1-git-send-email-tomi.ollila@iki.fi
to be applied first, otherwise ./configure will not pass.
configure | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/configure b/configure
index 6231d2b..3753e7f 100755
--- a/configure
+++ b/configure
@@ -1,5 +1,7 @@
#! /bin/sh
+set -u
+
# Test whether this shell is capable of parameter substring processing.
( option='a/b'; : ${option#*/} ) 2>/dev/null || {
echo "
@@ -480,6 +482,7 @@ if pkg-config --exists valgrind; then
else
printf "No (but that's fine).\n"
have_valgrind=0
+ valgrind_cflags=
fi
printf "Checking for bash-completion (>= 1.90)... "
@@ -490,11 +493,11 @@ else
WITH_BASH=0
fi
-if [ -z "${EMACSLISPDIR}" ]; then
+if [ -z "${EMACSLISPDIR-}" ]; then
EMACSLISPDIR="\$(prefix)/share/emacs/site-lisp"
fi
-if [ -z "${EMACSETCDIR}" ]; then
+if [ -z "${EMACSETCDIR-}" ]; then
EMACSETCDIR="\$(prefix)/share/emacs/site-lisp"
fi
--
2.8.2
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] configure: add set -u
2016-05-06 18:11 ` [PATCH] configure: add set -u Tomi Ollila
@ 2016-05-07 22:27 ` David Bremner
2016-09-29 11:41 ` David Bremner
1 sibling, 0 replies; 4+ messages in thread
From: David Bremner @ 2016-05-07 22:27 UTC (permalink / raw)
To: Tomi Ollila, notmuch; +Cc: tomi.ollila
Tomi Ollila <tomi.ollila@iki.fi> writes:
> In case of any unset variable, make ./configure exit with nonzero value;
> an attempt to expand an unset variable is a bug in the script
> (usually a spelling mistake) and those should not pass through
> unnoticed.
pushed these two to master
d
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] configure: add set -u
2016-05-06 18:11 ` [PATCH] configure: add set -u Tomi Ollila
2016-05-07 22:27 ` David Bremner
@ 2016-09-29 11:41 ` David Bremner
1 sibling, 0 replies; 4+ messages in thread
From: David Bremner @ 2016-09-29 11:41 UTC (permalink / raw)
To: Tomi Ollila, notmuch
Tomi Ollila <tomi.ollila@iki.fi> writes:
> In case of any unset variable, make ./configure exit with nonzero value;
> an attempt to expand an unset variable is a bug in the script
> (usually a spelling mistake) and those should not pass through
> unnoticed.
> ---
>
> I was also doing set -e support but that has quite a few nontrivial
> things in it. Set -u catches all lagging c++ compilers and so on ;).
> Perhaps later.
This commit has an unintended consequence: on unknown platforms,
configure crashes and doesn't generate Makefile.config at all. In
particular this manifests on Debian/kfreebsd but I imagine there are
other platforms where people are just ignoring the "Notmuch might or
might not build correctly". I'm tempted to revert the commit for now,
and give ourselves some time after the release of 0.23 to figure out
(and test) the best solution.
d
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2016-09-29 11:41 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-05-03 17:23 [PATCH] configure: replace ${CXXLAGS} with ${CXXFLAGS_for_sh} Tomi Ollila
2016-05-06 18:11 ` [PATCH] configure: add set -u Tomi Ollila
2016-05-07 22:27 ` David Bremner
2016-09-29 11:41 ` David Bremner
Code repositories for project(s) associated with this public inbox
https://yhetil.org/notmuch.git/
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).