Generate bfd.h in current directory by grabbing 64-bit definition (if any)
from sysdep.h (and nothing else) and inserting it into bfd-in2.h. Remove ../include/bfd.h if found, in case it's left over from previous versions of this code.
This commit is contained in:
parent
58488bc652
commit
12f367a13e
1 changed files with 7 additions and 15 deletions
|
@ -67,7 +67,7 @@ SUBDIRS = doc
|
||||||
TARGETLIB = libbfd.a
|
TARGETLIB = libbfd.a
|
||||||
|
|
||||||
# bfd.h goes here, for now
|
# bfd.h goes here, for now
|
||||||
BFD_H = ../include/bfd.h
|
BFD_H = bfd.h
|
||||||
|
|
||||||
BFD_LIBS = libbfd.o opncls.o bfd.o archive.o targets.o cache.o \
|
BFD_LIBS = libbfd.o opncls.o bfd.o archive.o targets.o cache.o \
|
||||||
archures.o core.o section.o format.o syms.o reloc.o init.o \
|
archures.o core.o section.o format.o syms.o reloc.o init.o \
|
||||||
|
@ -311,24 +311,16 @@ gen-aout: $(srcdir)/gen-aout.c Makefile
|
||||||
|
|
||||||
BFDIN_H= $(srcdir)/bfd-in2.h
|
BFDIN_H= $(srcdir)/bfd-in2.h
|
||||||
|
|
||||||
bfd.h : $(BFD_H) ; @true
|
|
||||||
$(BFD_H): stmp-bfd.h ; @true
|
$(BFD_H): stmp-bfd.h ; @true
|
||||||
|
|
||||||
# The funny stuff here with the generated script is because I haven't
|
# The file ../include/bfd.h is from earlier attempts to get this right.
|
||||||
# figured out how to get sed to generate the correct sed script. If you
|
# If the file is still there, kill it.
|
||||||
# can get it to work, portably, please let me know!
|
|
||||||
stmp-bfd.h : $(BFDIN_H) Makefile
|
stmp-bfd.h : $(BFDIN_H) Makefile
|
||||||
rm -f sysdep.sed nsysdep.h
|
rm -f bfd.h2 64 ../include/bfd.h
|
||||||
echo "exec sed -e '/^\\$$/d' \\" > sysdep.sed
|
-grep HOST_64_BIT sysdep.h > 64
|
||||||
-grep -n '#include.*hosts/' sysdep.h \
|
sed -e 's/@WORDSIZE@/$(WORDSIZE)/' -e '/64-bit.*sysdep.h/ r 64' < $(BFDIN_H) > bfd.h2
|
||||||
| sed -e 's|\([0-9]*\):.*hosts/\(.*\)"| -e "\1r $(srcdir)/hosts/\2" -e \1d \\|' \
|
|
||||||
>> sysdep.sed
|
|
||||||
echo "" >> sysdep.sed
|
|
||||||
sh sysdep.sed < sysdep.h > nsysdep.h
|
|
||||||
sed -e 's/@WORDSIZE@/$(WORDSIZE)/' \
|
|
||||||
-e '/INSERT SYSDEP HERE/ r nsysdep.h' < $(BFDIN_H) > bfd.h2
|
|
||||||
test -d ../include || mkdir ../include
|
|
||||||
$(srcdir)/../move-if-change bfd.h2 $(BFD_H)
|
$(srcdir)/../move-if-change bfd.h2 $(BFD_H)
|
||||||
|
rm -f 64
|
||||||
touch stmp-bfd.h
|
touch stmp-bfd.h
|
||||||
|
|
||||||
# Could really use a "copy-if-change"...
|
# Could really use a "copy-if-change"...
|
||||||
|
|
Loading…
Reference in a new issue