This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
headers.sed can't handle embedded tabs
- From: Doug Evans <dje at transmeta dot com>
- To: binutils at sources dot redhat dot com
- Date: Mon, 12 Aug 2002 17:07:17 -0700
- Subject: headers.sed can't handle embedded tabs
Is anyone else seeing the top of the files generated by "make headers"
containing incorrect text?
doc/Makefile quotes the file dependency list to passed to sed.
e.g.
echo "$(LIBBFD_H_DEP)" | sed -f $(srcdir)/header.sed > $@
With that I'm getting this for libbfd.h.
/* DO NOT EDIT! -*- buffer-read-only: t -*- This file is automatically
generated from "proto.str chew".
Run "make headers" in your build bfd/ to regenerate. */
If I remove the quoting, as in,
- echo "$(LIBBFD_H_DEP)" | sed -f $(srcdir)/header.sed > $@
+ echo $(LIBBFD_H_DEP) | sed -f $(srcdir)/header.sed > $@
I get the expected
/* DO NOT EDIT! -*- buffer-read-only: t -*- This file is automatically
generated from "libbfd-in.h", "init.c", "libbfd.c", "cache.c",
"reloc.c", "archures.c" and "elf.c".
Run "make headers" in your build bfd/ to regenerate. */
Some experimentation reveals it's this line of headers.sed.
s|[^ ]*/||g
Maybe ya want to support tabs in there.
Maybe ya want to not quote the arg to echo.
I'll leave it to you to fix as you wish.