Skip to contentSkip to conversation

configure: Stop using AM_MAINTAINER_MODE

PATCH In review Emil Velikov 2 participants 6 messages Mar 9, 2015 – Mar 10, 2015

lore
Share & tools
lore
#0 lore raw

PATCH 1/2 configure: Stop using AM_MAINTAINER_MODE

By using it, any modifications to configure.ac or the Makefile.am files won't trigger a rebuild of the makefiles. Drop the switch from the autogen.sh as well.

---
 autogen.sh   | 2 +-
 configure.ac | 1 -
 2 files changed, 1 insertion(+), 2 deletions(-)
autogen.sh +1 -1
index 3f190ba..30d679f 100755
@@ -3,4 +3,4 @@
 test -n "$srcdir" || srcdir=`dirname "$0"`
 test -n "$srcdir" || srcdir=.
 autoreconf --force --install --verbose "$srcdir"
-test -n "$NOCONFIGURE" || "$srcdir/configure" --enable-maintainer-mode "$@"
+test -n "$NOCONFIGURE" || "$srcdir/configure" "$@"
configure.ac +0 -1
index 8afee83..00685fd 100644
@@ -30,7 +30,6 @@ AC_CONFIG_MACRO_DIR([m4])
 AC_CONFIG_AUX_DIR([build-aux])
 
 AM_INIT_AUTOMAKE([1.10 foreign dist-bzip2])
-AM_MAINTAINER_MODE([enable])
 
 # Enable quiet compiles on automake 1.11.
 m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])
Signature · 6 lines
2.3.1

_______________________________________________
dri-devel mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/dri-devel
#1 lore raw

PATCH 2/2 autogen.sh: handle out-of-tree invokation

---
 autogen.sh | 16 ++++++++++++----
 1 file changed, 12 insertions(+), 4 deletions(-)
autogen.sh +12 -4
index 30d679f..c896097 100755
@@ -1,6 +1,14 @@
 #! /bin/sh
 
-test -n "$srcdir" || srcdir=`dirname "$0"`
-test -n "$srcdir" || srcdir=.
-autoreconf --force --install --verbose "$srcdir"
-test -n "$NOCONFIGURE" || "$srcdir/configure" "$@"
+srcdir=`dirname "$0"`
+test -z "$srcdir" && srcdir=.
+
+ORIGDIR=`pwd`
+cd "$srcdir"
+
+autoreconf --force --verbose --install || exit 1
+cd "$ORIGDIR" || exit $?
+
+if test -z "$NOCONFIGURE"; then
+    "$srcdir"/configure "$@"
+fi
Signature · 6 lines
2.3.1

_______________________________________________
dri-devel mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/dri-devel
#2 lore raw
In reply to Emil Velikov
Quoted 4 lines · Emil Velikov

By using it, any modifications to configure.ac or the Makefile.am files won't trigger a rebuild of the makefiles. Drop the switch from the autogen.sh as well.

Since it was set to enabled in configure.ac, the above is not true, unless you explicitly pass --disable-maintainer-mode to configure.

Cheers,
Julien
_______________________________________________
dri-devel mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/dri-devel

#3 lore raw

Hi Julien,

Quoted 9 lines · Julien Cristau
Quoted 4 lines · Emil Velikov

By using it, any modifications to configure.ac or the Makefile.am files won't trigger a rebuild of the makefiles. Drop the switch from the autogen.sh as well.

Since it was set to enabled in configure.ac, the above is not true, unless you explicitly pass --disable-maintainer-mode to configure.

Hmm... you're absolutely correct here. The following commit message should be more appropriate.

AM_MAINTAINER_MODE can be used to disable generation of rebuild rules. This is not something we want to condone/support, considering it can cause greater problems than the perceived benefits. Additionally the Automake manual leans towards avoiding the use of AM_MAINTAINER_MODE.

http://www.gnu.org/software/automake/manual/html_node/maintainer_002dmode.html

That is unless you're in favour of keeping it ? Afaics at least some X components tend to avoid it.

Cheers,
Emil
_______________________________________________
dri-devel mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/dri-devel

#4 lore raw
Quoted 19 lines · Emil Velikov

Hi Julien,

Quoted 9 lines · Julien Cristau
Quoted 4 lines · Emil Velikov

By using it, any modifications to configure.ac or the Makefile.am files won't trigger a rebuild of the makefiles. Drop the switch from the autogen.sh as well.

Since it was set to enabled in configure.ac, the above is not true, unless you explicitly pass --disable-maintainer-mode to configure.

Hmm... you're absolutely correct here. The following commit message should be more appropriate.

AM_MAINTAINER_MODE can be used to disable generation of rebuild rules. This is not something we want to condone/support, considering it can cause greater problems than the perceived benefits. Additionally the Automake manual leans towards avoiding the use of AM_MAINTAINER_MODE.

Quoted 6 lines

http://www.gnu.org/software/automake/manual/html_node/maintainer_002dmode.html

That is unless you're in favour of keeping it ? Afaics at least some X components tend to avoid it.

I don't really care whether it stays or goes, but your new commit message looks good to me :)

Cheers,
Julien
_______________________________________________
dri-devel mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/dri-devel

#5 lore raw
Quoted 21 lines · Julien Cristau
Quoted 19 lines · Emil Velikov

Hi Julien,

Quoted 9 lines · Julien Cristau
Quoted 4 lines · Emil Velikov

By using it, any modifications to configure.ac or the Makefile.am files won't trigger a rebuild of the makefiles. Drop the switch from the autogen.sh as well.

Since it was set to enabled in configure.ac, the above is not true, unless you explicitly pass --disable-maintainer-mode to configure.

Hmm... you're absolutely correct here. The following commit message should be more appropriate.

AM_MAINTAINER_MODE can be used to disable generation of rebuild rules. This is not something we want to condone/support, considering it can cause greater problems than the perceived benefits. Additionally the Automake manual leans towards avoiding the use of AM_MAINTAINER_MODE.

Quoted 9 lines
Quoted 6 lines

http://www.gnu.org/software/automake/manual/html_node/maintainer_002dmode.html

That is unless you're in favour of keeping it ? Afaics at least some X components tend to avoid it.

I don't really care whether it stays or goes, but your new commit message looks good to me :)

Ack. Thanks for spotting that silly mistake.

-Emil
_______________________________________________
dri-devel mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/dri-devel