This is the mail archive of the binutils@sources.redhat.com mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]