summaryrefslogtreecommitdiff
path: root/libada
diff options
context:
space:
mode:
authorcharlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4>2004-04-19 15:24:27 +0000
committercharlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4>2004-04-19 15:24:27 +0000
commit2ded3cb7e378570a3f6df0d50ebc744ad56e4e2e (patch)
tree0d6ebe3186c9115906b60794c163d33dd9e1194d /libada
parent5329ca6475e92c4a485d941efe57819159434b5e (diff)
downloadgcc-2ded3cb7e378570a3f6df0d50ebc744ad56e4e2e.tar.gz
* 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. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@80857 138bc75d-0d04-0410-961f-82ee72b054a4
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 75788607aa4..0028f1ca8a7 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 5af0d5186bc..5e41f92c0f5 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