aboutsummaryrefslogtreecommitdiff
path: root/libada
diff options
context:
space:
mode:
authorArnaud Charlet <charlet@act-europe.fr>2004-04-19 17:24:27 +0200
committerArnaud Charlet <charlet@gcc.gnu.org>2004-04-19 17:24:27 +0200
commitc2b5e13ba5e3d5dbd7cf0e43a529ca3f7bc40518 (patch)
tree0d6ebe3186c9115906b60794c163d33dd9e1194d /libada
parent7324bf49ceb4aaca385ae0c32095901b96a2c969 (diff)
downloadgcc-c2b5e13ba5e3d5dbd7cf0e43a529ca3f7bc40518.zip
gcc-c2b5e13ba5e3d5dbd7cf0e43a529ca3f7bc40518.tar.gz
gcc-c2b5e13ba5e3d5dbd7cf0e43a529ca3f7bc40518.tar.bz2
Makefile.in: Fix errors introduced in previous change (in particular...
* Makefile.in: Fix errors introduced in previous change (in particular, errors when building gnattools were ignored). Code clean up and simplification. update comments. Remove temporary debug code introduced by mistake in previous check in. Prefer GNU Make syntax over complex and error-prone sh syntax. (gnatlib-zcx): New target. (ada.all.cross): Merged with gnattools-cross target. From-SVN: r80857
Diffstat (limited to 'libada')
-rw-r--r--libada/ChangeLog11
-rw-r--r--libada/Makefile.in83
2 files changed, 40 insertions, 54 deletions
diff --git a/libada/ChangeLog b/libada/ChangeLog
index 7578860..0028f1c 100644
--- a/libada/ChangeLog
+++ b/libada/ChangeLog
@@ -1,3 +1,14 @@
+2004-04-19 Arnaud Charlet <charlet@act-europe.fr>
+
+ * Makefile.in: Fix errors introduced in previous change (in particular,
+ errors when building gnattools were ignored).
+ Code clean up and simplification.
+ update comments.
+ Remove temporary debug code introduced by mistake in previous check in.
+ Prefer GNU Make syntax over complex and error-prone sh syntax.
+ (gnatlib-zcx): New target.
+ (ada.all.cross): Merged with gnattools-cross target.
+
2004-04-17 Nathanael Nerode <neroden@gcc.gnu.org>
* configure.ac: It's gnatlib-plain in the Makefile, not
diff --git a/libada/Makefile.in b/libada/Makefile.in
index 5af0d51..5e41f92 100644
--- a/libada/Makefile.in
+++ b/libada/Makefile.in
@@ -117,84 +117,59 @@ ADA_TOOLS_FLAGS_TO_PASS=\
"GNATLINK=../../gnatlink" \
"GNATBIND=../../gnatbind"
-fyi:
- echo $(tmake_file)
-
# Rules to build gnatlib.
-.PHONY: gnatlib gnatlib-plain gnatlib-sjlj gnatlib-shared
+.PHONY: gnatlib gnatlib-plain gnatlib-sjlj gnatlib-zcx gnatlib-shared
gnatlib: @default_gnatlib_target@
-gnatlib-plain:
- $(MAKE) -C $(GCC_DIR)/ada $(FLAGS_TO_PASS) \
- GNATLIBFLAGS="$(GNATLIBFLAGS)" \
- GNATLIBCFLAGS="$(GNATLIBCFLAGS)" \
- TARGET_LIBGCC2_CFLAGS="$(TARGET_LIBGCC2_CFLAGS)" \
- THREAD_KIND="$(THREAD_KIND)" \
- TRACE="$(TRACE)" \
- gnatlib ; \
-
-gnatlib-sjlj:
- $(MAKE) -C $(GCC_DIR)/ada $(FLAGS_TO_PASS) \
- GNATLIBFLAGS="$(GNATLIBFLAGS)" \
- GNATLIBCFLAGS="$(GNATLIBCFLAGS)" \
- TARGET_LIBGCC2_CFLAGS="$(TARGET_LIBGCC2_CFLAGS)" \
- THREAD_KIND="$(THREAD_KIND)" \
- TRACE="$(TRACE)" \
- gnatlib-sjlj ; \
-
-gnatlib-shared:
+gnatlib-plain gnatlib-sjlj gnatlib-zcx gnatlib-shared:
$(MAKE) -C $(GCC_DIR)/ada $(FLAGS_TO_PASS) \
GNATLIBFLAGS="$(GNATLIBFLAGS)" \
GNATLIBCFLAGS="$(GNATLIBCFLAGS)" \
- GNATLIBLDFLAGS="$(GNATLIBLDFLAGS)" \
TARGET_LIBGCC2_CFLAGS="$(TARGET_LIBGCC2_CFLAGS)" \
THREAD_KIND="$(THREAD_KIND)" \
- TRACE="$(TRACE)" \
- gnatlib-shared ; \
+ TRACE="$(TRACE)" $@
.PHONY: rts-zfp rts-ravenscar
-rts-zfp:
- $(MAKE) -C $(GCC_DIR)/ada $(FLAGS_TO_PASS) \
- GNATMAKE=../gnatmake-cross \
- rts-zfp
-
-rts-ravenscar:
+rts-zfp rts-ravenscar:
$(MAKE) -C $(GCC_DIR)/ada $(FLAGS_TO_PASS) \
- GNATMAKE=../gnatmake-cross \
- rts-ravenscar
+ GNATMAKE=../gnatmake-cross $@
# Rules to build gnattools.
# For cross builds of gnattools,
# put the host RTS dir first in the PATH to hide the default runtime
# files that are among the sources
RTS_DIR:=$(strip $(subst \,/,$(shell gnatls -v | grep adalib )))
+
+ifeq ($(build),$(target))
+ GNATTOOLS = gnattools-native
+else
+ GNATTOOLS = gnattools-cross
+endif
+
.PHONY: gnattools regnattools
-gnattools: gnatlib
- if test $(build) = $(target) ; then \
- $(MAKE) -C $(GCC_DIR)/ada $(FLAGS_TO_PASS) $(ADA_FLAGS_TO_PASS) \
- ADA_INCLUDES="-I- -I../rts" \
- CC="../../xgcc -B../../" STAGE_PREFIX=../../ gnattools1 ; \
- $(MAKE) -C $(GCC_DIR)/ada $(ADA_TOOLS_FLAGS_TO_PASS) gnattools2 ; \
- $(MAKE) -C $(GCC_DIR)/ada $(ADA_TOOLS_FLAGS_TO_PASS) gnattools3 ; \
- else \
- $(MAKE) -C $(GCC_DIR)/ada $(FLAGS_TO_PASS) $(ADA_FLAGS_TO_PASS) \
- ADA_INCLUDES="-I$(RTS_DIR)../adainclude -I$(RTS_DIR)" \
- GNATMAKE="gnatmake" \
- GNATBIND="gnatbind" \
- GNATLINK="gnatlink" \
- LIBGNAT="" \
- gnattools1-re gnattools2 gnattools4 ; \
- $(MAKE) $(FLAGS_TO_PASS) ada.all.cross ; \
- fi
+gnattools: $(GNATTOOLS)
+
+gnattools-native: gnatlib
+ $(MAKE) -C $(GCC_DIR)/ada $(FLAGS_TO_PASS) $(ADA_FLAGS_TO_PASS) \
+ ADA_INCLUDES="-I- -I../rts" \
+ CC="../../xgcc -B../../" STAGE_PREFIX=../../ gnattools1
+ $(MAKE) -C $(GCC_DIR)/ada $(ADA_TOOLS_FLAGS_TO_PASS) gnattools2
+ $(MAKE) -C $(GCC_DIR)/ada $(ADA_TOOLS_FLAGS_TO_PASS) gnattools3
regnattools:
$(MAKE) -C $(GCC_DIR)/ada $(ADA_TOOLS_FLAGS_TO_PASS) gnattools1-re
$(MAKE) -C $(GCC_DIR)/ada $(ADA_TOOLS_FLAGS_TO_PASS) gnattools2
$(MAKE) -C $(GCC_DIR)/ada $(ADA_TOOLS_FLAGS_TO_PASS) gnattools3
-# It's unclear whether this is even needed, and if so whether it should run
-# *before* the rest of crossgnattools or *after* it.
-ada.all.cross:
+gnattools-cross: gnatlib
+ $(MAKE) -C $(GCC_DIR)/ada $(FLAGS_TO_PASS) $(ADA_FLAGS_TO_PASS) \
+ ADA_INCLUDES="-I$(RTS_DIR)../adainclude -I$(RTS_DIR)" \
+ GNATMAKE="gnatmake" \
+ GNATBIND="gnatbind" \
+ GNATLINK="gnatlink" \
+ LIBGNAT="" \
+ gnattools1-re gnattools2 gnattools4
+ # rename cross tools, as expected by the GCC makefile when installing
if [ -f $(GCC_DIR)/gnatbind$(exeext) ] ; then \
mv $(GCC_DIR)/gnatbind$(exeext) $(GCC_DIR)/gnatbind-cross$(exeext); \
fi