aboutsummaryrefslogtreecommitdiff
path: root/ld/Makefile.in
diff options
context:
space:
mode:
Diffstat (limited to 'ld/Makefile.in')
-rw-r--r--ld/Makefile.in37
1 files changed, 17 insertions, 20 deletions
diff --git a/ld/Makefile.in b/ld/Makefile.in
index 2181f43..d385014 100644
--- a/ld/Makefile.in
+++ b/ld/Makefile.in
@@ -41,9 +41,10 @@ man9dir = $(mandir)/man9
infodir = $(prefix)/info
includedir = $(prefix)/include
docdir = $(datadir)/doc
+# We put the scripts in the directory $(scriptdir)/ldscripts.
# We can't put the scripts in $(datadir) because the SEARCH_DIR
# directives need to be different for native and cross linkers.
-scriptdir = $(tooldir)/lib/ld
+scriptdir = $(tooldir)/lib
gcclibdir = $(libdir)/gcc/$(target_alias)
@@ -112,6 +113,9 @@ LINTFLAGS = $(INCLUDES) $(EXTRA_DEF)
.SUFFIXES: .y $(SUFFIXES) .cc
+# Suppress smart makes who think they know how to automake Yacc files
+.y.c:
+
.cc.o:
$(C++) -c -I$(srcdir) $(CFLAGS) $<
@@ -162,23 +166,17 @@ BFDSOURCES=../../bfd/common/*.c
SOURCES= $(LDSOURCES) $(BFDSOURCES)
LINTSOURCES= $(LDCSOURCES) $(BFDSOURCES) $(GENERATED_SOURCES)
-STAGESTUFF = emulations/* $(GENERATED_SOURCES) $(GENERATED_HEADERS) $(OFILES)
+STAGESTUFF = ldscripts/* $(GENERATED_SOURCES) $(GENERATED_HEADERS) $(OFILES)
all: $(LD_PROG)
info: ld.info
-# This somewhat odd makefile construction prevents a parallel gnu make
-# from spinning off two bison processes concurrently. This is
-# important because yacc uses static file names and multiple instances
-# will collide.
-ldgram.h ldgram.c: ldgram-files
-ldgram-files: ldgram.y
+ldgram.h ldgram.c: ldgram.y
$(BISON) $(BISONFLAGS) -d $(srcdir)/ldgram.y
mv -f y.tab.c ldgram.c
mv -f y.tab.h ldgram.h
-
DEF_EMUL = ` if [ -z "$(EMUL)" ] ; then \
echo "you must set a default emulation" 1>&2 ; \
exit 1 ; \
@@ -187,7 +185,7 @@ DEF_EMUL = ` if [ -z "$(EMUL)" ] ; then \
fi`
ldmain.o: ldmain.c
- $(CC) -c $(INCLUDES) $(HDEFINES) $(TDEFINES) $(CDEFINES) $(DEF_EMUL) -DSCRIPTDIR='"$(scriptdir)"' $(CFLAGS) $<
+ $(CC) -c $(INCLUDES) $(HDEFINES) $(TDEFINES) $(CDEFINES) $(DEF_EMUL) $(CFLAGS) $<
ldemul-list.h:
(echo "/* This file is automatically generated. DO NOT EDIT! */";\
@@ -314,18 +312,18 @@ installcheck:
# Rules for testing by relinking ld itself.
ld-partial.o: ld.new
- ./ld.new -Lemulations $(HOSTING_EMU) -o ld-partial.o -r $(OFILES)
+ ./ld.new -L. $(HOSTING_EMU) -o ld-partial.o -r $(OFILES)
ld1: ld-partial.o
- ./ld.new -Lemulations $(HOSTING_EMU) -o ld1 $(HOSTING_CRT0) ld-partial.o $(BFDLIB) $(LIBIBERTY) $(HOSTING_LIBS)
+ ./ld.new -L. $(HOSTING_EMU) -o ld1 $(HOSTING_CRT0) ld-partial.o $(BFDLIB) $(LIBIBERTY) $(HOSTING_LIBS)
ld1-full: ld.new
- ./ld.new -Lemulations $(HOSTING_EMU) -o ld1-full $(HOSTING_CRT0) $(OFILES) $(BFDLIB) $(LIBIBERTY) $(HOSTING_LIBS)
+ ./ld.new -L. $(HOSTING_EMU) -o ld1-full $(HOSTING_CRT0) $(OFILES) $(BFDLIB) $(LIBIBERTY) $(HOSTING_LIBS)
ld2: ld1
- ./ld1 -Lemulations $(HOSTING_EMU) -o ld2 $(HOSTING_CRT0) $(OFILES) $(BFDLIB) $(LIBIBERTY) $(HOSTING_LIBS)
+ ./ld1 -L. $(HOSTING_EMU) -o ld2 $(HOSTING_CRT0) $(OFILES) $(BFDLIB) $(LIBIBERTY) $(HOSTING_LIBS)
ld3: ld2
- ./ld2 -Lemulations $(HOSTING_EMU) -o ld3 $(HOSTING_CRT0) $(OFILES) $(BFDLIB) $(LIBIBERTY) $(HOSTING_LIBS)
+ ./ld2 -L. $(HOSTING_EMU) -o ld3 $(HOSTING_CRT0) $(OFILES) $(BFDLIB) $(LIBIBERTY) $(HOSTING_LIBS)
bootstrap: ld3
cmp ld2 ld3
@@ -333,7 +331,7 @@ bootstrap: ld3
# A test program for C++ constructors and destructors.
cdtest: cdtest-main.o cdtest-func.o cdtest-foo.o ld.new
- ./ld.new -Lemulations $(HOSTING_EMU) -o cdtest $(HOSTING_CRT0) \
+ ./ld.new -L. $(HOSTING_EMU) -o cdtest $(HOSTING_CRT0) \
cdtest-main.o cdtest-func.o cdtest-foo.o $(HOSTING_LIBS)
check-cdtest: cdtest $(srcdir)/cdtest.exp
@@ -441,7 +439,6 @@ ld-index.me: ld.me
ldlex.o: ldlex.c ldgram.h
ldgram.o: ldgram.c
-ldgram.c:ldgram.y
ldexp.o: ldexp.c ldgram.h
ldctor.o: ldctor.c ldgram.h
ldlang.o: ldlang.c ldgram.h
@@ -501,7 +498,7 @@ mostlyclean:
clean: mostlyclean
-rm -f $(LD_PROG)
distclean: clean
- -rm -f Makefile config.status TAGS sysdep.h
+ -rm -fr Makefile config.status TAGS sysdep.h ldscripts
realclean: distclean
-rm -f $(LDDISTSTUFF)
@@ -527,8 +524,8 @@ objdump:objdump.c
install:
$(INSTALL_XFORM) ld.new $(bindir)/ld
$(INSTALL_XFORM1) $(srcdir)/ld.1 $(man1dir)/ld.1
- for f in emulations/*; do \
- $(INSTALL_DATA) $$f $(scriptdir)/`basename $$f` ; \
+ for f in ldscripts/*; do \
+ $(INSTALL_DATA) $$f $(scriptdir)/$$f ; \
done
-n=`t='$(program_transform_name)'; echo ld | sed -e "" $$t`; \
rm -f $(tooldir)/bin/ld; \