[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[bug-gnulib] improve gnulib-tool output
From: |
Eric Blake |
Subject: |
[bug-gnulib] improve gnulib-tool output |
Date: |
Thu, 12 May 2005 19:51:10 -0600 |
User-agent: |
Mozilla/5.0 (Windows; U; Win98; en-US; rv:1.4) Gecko/20030624 Netscape/7.1 (ax) |
When bootstrapping m4 CVS HEAD, I noticed that gnulib-tool is rather repetitive:
You may need to add #include directives for the following .h files.
#include <alloca.h>
#include <alloca.h>
#include <assert.h>
#include "error.h"
#include "exit.h"
#include "exitfail.h"
#include <stdlib.h>
#include "gettext.h"
#include <stdlib.h>
#include "obstack.h"
#include "progname.h"
#include "regex.h"
#include "stat-macros.h"
#include <stdbool.h>
#include "strndup.h"
#include <stdlib.h>
#include "xalloc.h"
#include "xalloc.h"
#include "xstrndup.h"
The patch below reduces the clutter and sorts the output.
Meanwhile, I reported an issue in bootstrapping m4 in my environment, where
m4 expected to find the actual gnulib-tool on my PATH rather than a just a
symlink to my CVS snapshot in a different directory:
http://lists.gnu.org/archive/html/m4-patches/2005-05/msg00019.html
Would it make sense to give meaning to `configure; make; make install'
within gnulib to install gnulib-tool onto the user's preferred location?
And would an option such as `gnulib-tool --location' that outputs the
location of gnulib's database be a useful addition?
2005-05-12 Eric Blake <address@hidden> (tiny change)
* gnulib-tool (func_import): Sort and uniquify recommended includes.
Index: gnulib-tool
===================================================================
RCS file: /cvsroot/gnulib/gnulib/gnulib-tool,v
retrieving revision 1.44
diff -u -p -r1.44 gnulib-tool
--- gnulib-tool 21 Apr 2005 22:10:05 -0000 1.44
+++ gnulib-tool 13 May 2005 01:56:31 -0000
@@ -700,7 +700,7 @@ func_import ()
echo "You may need to add #include directives for the following .h files."
for module in $modules; do
func_get_include_directive "$module" | sed -e '/^$/d;' -e 's/^/ /'
- done
+ done | LC_ALL=C sort -u
echo
echo "Don't forget to add \"$sourcebase/Makefile\""
echo "to AC_CONFIG_FILES in \"$configure_ac\" and to mention"
--
Someday, I might put a cute statement here.
Eric Blake address@hidden
- [bug-gnulib] improve gnulib-tool output,
Eric Blake <=