fixes after Bruno's testing

2009-04-27  Paolo Bonzini  <bonzini@gnu.org>

	* configure.ac: Link readin.in2 into builddir.
	* configure: Regenerate.
	* doc/Makefile.am: Do not distribute sed.html.  Do not update
	sed.texi if the output does not change.
	* sed/Makefile.am: Order libraries according to their dependencies.
	* sed/compile.c (get_openfile): Declare FAIL as int.
	* sed/sed.c: Avoid printf ("") if REG_PERL is not defined.
	* testsuite/eval.in2: Do not include in the repository.
	* testsuite/Makefile.am: Clean always eval.in2 and never readin.in2.
	* testsuite/Makefile.tests: Provide a default empty definition of TIME
	and remove rules for readin.in2.
This commit is contained in:
Paolo Bonzini 2009-04-27 10:29:02 +02:00
parent 9e971bab12
commit 8172184989
11 changed files with 44 additions and 37 deletions

View File

@ -1,3 +1,17 @@
2009-04-27 Paolo Bonzini <bonzini@gnu.org>
* configure.ac: Link readin.in2 into builddir.
* configure: Regenerate.
* doc/Makefile.am: Do not distribute sed.html. Do not update
sed.texi if the output does not change.
* sed/Makefile.am: Order libraries according to their dependencies.
* sed/compile.c (get_openfile): Declare FAIL as int.
* sed/sed.c: Avoid printf ("") if REG_PERL is not defined.
* testsuite/eval.in2: Do not include in the repository.
* testsuite/Makefile.am: Clean always eval.in2 and never readin.in2.
* testsuite/Makefile.tests: Provide a default empty definition of TIME
and remove rules for readin.in2.
2009-03-31 Paolo Bonzini <bonzini@gnu.org>
* bootstrap.sh.in: Add __bool_true_false_are_defined.

View File

@ -83,6 +83,9 @@ if test "x$have_lstat" = xyes -a "x$have_readlink" = xyes; then
AC_DEFINE(ENABLE_FOLLOW_SYMLINKS, ,[Follow symlinks when processing in place])
fi
if test "$srcdir" != .; then
AC_CONFIG_LINKS([testsuite/readin.in2:testsuite/readin.in2])
fi
AC_CONFIG_FILES([bootstrap.sh], chmod +x bootstrap.sh)
AC_CONFIG_FILES([testsuite/version.good:testsuite/version.gin])
AC_CONFIG_FILES([Makefile doc/Makefile \

View File

@ -2,9 +2,8 @@
info_TEXINFOS = sed.texi
sed_TEXINFOS = config.texi version.texi
dist_man_MANS = sed.1
dist_noinst_DATA = sed.x sed-in.texi
dist_noinst_DATA = sed.x sed-in.texi s-texi
dist_noinst_SCRIPTS = groupify.sed
dist_doc_DATA = sed.html
TEXI2DVI = $(top_srcdir)/build-aux/texi2dvi --expand
HELP2MAN = $(top_srcdir)/build-aux/help2man
SED = $(top_builddir)/sed/sed
@ -15,9 +14,16 @@ AM_MAKEINFOHTMLFLAGS = --no-split
# scripts we group comments with lines following them;
# since mantaining the "@group...@end group" manually
# is a burden, we do this automatically
$(srcdir)/sed.texi: sed-in.texi $(srcdir)/groupify.sed
$(srcdir)/sed.texi: $(srcdir)/s-texi
$(srcdir)/s-texi: sed-in.texi $(srcdir)/groupify.sed
sed -nf $(srcdir)/groupify.sed \
< $(srcdir)/sed-in.texi > $(srcdir)/sed.texi
< $(srcdir)/sed-in.texi > $(srcdir)/sed-tmp.texi
if cmp $(srcdir)/sed.texi $(srcdir)/sed-tmp.texi; then \
rm -f $(srcdir)/sed-tmp.texi; \
else \
mv -f $(srcdir)/sed-tmp.texi $(srcdir)/sed.texi; \
fi
echo stamp > $(srcdir)/s-texi
sed.1: $(top_srcdir)/sed/sed.c $(top_srcdir)/configure.ac $(srcdir)/sed.x
$(HELP2MAN) --name "stream editor for filtering and transforming text" \

1
doc/s-texi Normal file
View File

@ -0,0 +1 @@
stamp

View File

@ -9,7 +9,7 @@ noinst_HEADERS = sed.h utils.h
AM_CPPFLAGS = -I$(top_srcdir)/lib -I$(top_srcdir) -I$(top_builddir)/lib \
-DLOCALEDIR=\"$(localedir)\"
sed_LDADD = @INTLLIBS@ @LIB_ACL@ ../lib/libsed.a
sed_LDADD = ../lib/libsed.a @INTLLIBS@ @LIB_ACL@
sed_DEPENDENCIES = ../lib/libsed.a
$(PROGRAMS): $(LDADD)

View File

@ -373,12 +373,12 @@ read_filename()
return b;
}
static struct output *get_openfile P_((struct output **file_ptrs, const char *mode, bool fail));
static struct output *get_openfile P_((struct output **file_ptrs, const char *mode, int fail));
static struct output *
get_openfile(file_ptrs, mode, fail)
struct output **file_ptrs;
const char *mode;
bool fail;
int fail;
{
struct buffer *b;
char *file_name;

View File

@ -147,7 +147,9 @@ Usage: %s [OPTION]... {script-only-if-no-other-script} [input-file]...\n\
disable all GNU extensions.\n"));
fprintf(out, _(" -r, --regexp-extended\n\
use extended regular expressions in the script.\n"));
#ifdef REG_PERL
fprintf(out, PERL_HELP);
#endif
fprintf(out, _(" -s, --separate\n\
consider files as separate rather than as a single continuous\n\
long stream.\n"));

View File

@ -19,7 +19,7 @@
#include "config.h"
#include <stdio.h>
#include <stdarg.h>
#include <errno.h>
#ifndef errno
extern int errno;
@ -61,34 +61,24 @@ static struct open_file *open_files = NULL;
static void do_ck_fclose P_((FILE *fp));
/* Print an error message and exit */
#if !defined __STDC__ || !(__STDC__-0)
# include <varargs.h>
# define VSTART(l,a) va_start(l)
void
panic(str, va_alist)
char *str;
va_dcl
#else /*__STDC__*/
# include <stdarg.h>
# define VSTART(l,a) va_start(l, a)
void
panic(const char *str, ...)
#endif /* __STDC__ */
{
va_list iggy;
va_list ap;
fprintf(stderr, "%s: ", myname);
VSTART(iggy, str);
va_start(ap, str);
#ifndef HAVE_VPRINTF
# ifndef HAVE_DOPRNT
fputs(str, stderr); /* not great, but perhaps better than nothing... */
# else /* HAVE_DOPRNT */
_doprnt(str, &iggy, stderr);
_doprnt(str, &ap, stderr);
# endif /* HAVE_DOPRNT */
#else /* HAVE_VFPRINTF */
vfprintf(stderr, str, iggy);
vfprintf(stderr, str, ap);
#endif /* HAVE_VFPRINTF */
va_end(iggy);
va_end(ap);
putc('\n', stderr);
/* Unlink the temporary files. */

View File

@ -1,4 +1,4 @@
CLEANFILES = tmp* core *.core $(EXTRA_PROGRAMS) *.*out *.log
CLEANFILES = tmp* core *.core $(EXTRA_PROGRAMS) *.*out *.log eval.in2
TESTS = $(check_PROGRAMS) $(SEDTESTS)
SEDTESTS =
@ -94,9 +94,6 @@ EXTRA_DIST = \
y-bracket.good y-bracket.sed y-bracket.inp \
y-newline.good y-newline.sed y-newline.inp
clean-local:
test x$(srcdir) = x. || rm -f readin.in2 eval.in2
# automake makes `check' depend on $(TESTS). Declare
# dummy targets for $(TESTS) so that make does not complain.

View File

@ -8,6 +8,8 @@ SED = ../sed/sed
SEDENV = LC_ALL=C $(TIME)
#TIME=time
TIME=
CMP=cmp
RM=rm -f
@ -110,10 +112,7 @@ writeout::
$(CMP) $(srcdir)/wrtout2.good $@.wout
@$(RM) $@.1out $@.wout
readin.in2: $(srcdir)/readin.in2
cat $(srcdir)/readin.in2 > $@
readin:: readin.in2
readin::
$(SEDENV) $(SED) -f $(srcdir)/$@.sed < $(srcdir)/$@.inp >$@.out
$(CMP) $(srcdir)/$@.good $@.out
@$(RM) $@.out

View File

@ -1,5 +0,0 @@
17380: 2 2 5 11 79
abcd
cpu
abcd
cpu