Skip to content
Snippets Groups Projects
Commit 2ded3cb7 authored by charlet's avatar charlet
Browse files

* 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
parent 5329ca64
No related merge requests found
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> 2004-04-17 Nathanael Nerode <neroden@gcc.gnu.org>
* configure.ac: It's gnatlib-plain in the Makefile, not * configure.ac: It's gnatlib-plain in the Makefile, not
......
...@@ -117,84 +117,59 @@ ADA_TOOLS_FLAGS_TO_PASS=\ ...@@ -117,84 +117,59 @@ ADA_TOOLS_FLAGS_TO_PASS=\
"GNATLINK=../../gnatlink" \ "GNATLINK=../../gnatlink" \
"GNATBIND=../../gnatbind" "GNATBIND=../../gnatbind"
fyi:
echo $(tmake_file)
# Rules to build gnatlib. # 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: @default_gnatlib_target@
gnatlib-plain: gnatlib-plain gnatlib-sjlj gnatlib-zcx gnatlib-shared:
$(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:
$(MAKE) -C $(GCC_DIR)/ada $(FLAGS_TO_PASS) \ $(MAKE) -C $(GCC_DIR)/ada $(FLAGS_TO_PASS) \
GNATLIBFLAGS="$(GNATLIBFLAGS)" \ GNATLIBFLAGS="$(GNATLIBFLAGS)" \
GNATLIBCFLAGS="$(GNATLIBCFLAGS)" \ GNATLIBCFLAGS="$(GNATLIBCFLAGS)" \
GNATLIBLDFLAGS="$(GNATLIBLDFLAGS)" \
TARGET_LIBGCC2_CFLAGS="$(TARGET_LIBGCC2_CFLAGS)" \ TARGET_LIBGCC2_CFLAGS="$(TARGET_LIBGCC2_CFLAGS)" \
THREAD_KIND="$(THREAD_KIND)" \ THREAD_KIND="$(THREAD_KIND)" \
TRACE="$(TRACE)" \ TRACE="$(TRACE)" $@
gnatlib-shared ; \
.PHONY: rts-zfp rts-ravenscar .PHONY: rts-zfp rts-ravenscar
rts-zfp: rts-zfp rts-ravenscar:
$(MAKE) -C $(GCC_DIR)/ada $(FLAGS_TO_PASS) \
GNATMAKE=../gnatmake-cross \
rts-zfp
rts-ravenscar:
$(MAKE) -C $(GCC_DIR)/ada $(FLAGS_TO_PASS) \ $(MAKE) -C $(GCC_DIR)/ada $(FLAGS_TO_PASS) \
GNATMAKE=../gnatmake-cross \ GNATMAKE=../gnatmake-cross $@
rts-ravenscar
# Rules to build gnattools. # Rules to build gnattools.
# For cross builds of gnattools, # For cross builds of gnattools,
# put the host RTS dir first in the PATH to hide the default runtime # put the host RTS dir first in the PATH to hide the default runtime
# files that are among the sources # files that are among the sources
RTS_DIR:=$(strip $(subst \,/,$(shell gnatls -v | grep adalib ))) RTS_DIR:=$(strip $(subst \,/,$(shell gnatls -v | grep adalib )))
ifeq ($(build),$(target))
GNATTOOLS = gnattools-native
else
GNATTOOLS = gnattools-cross
endif
.PHONY: gnattools regnattools .PHONY: gnattools regnattools
gnattools: gnatlib gnattools: $(GNATTOOLS)
if test $(build) = $(target) ; then \
$(MAKE) -C $(GCC_DIR)/ada $(FLAGS_TO_PASS) $(ADA_FLAGS_TO_PASS) \ gnattools-native: gnatlib
ADA_INCLUDES="-I- -I../rts" \ $(MAKE) -C $(GCC_DIR)/ada $(FLAGS_TO_PASS) $(ADA_FLAGS_TO_PASS) \
CC="../../xgcc -B../../" STAGE_PREFIX=../../ gnattools1 ; \ ADA_INCLUDES="-I- -I../rts" \
$(MAKE) -C $(GCC_DIR)/ada $(ADA_TOOLS_FLAGS_TO_PASS) gnattools2 ; \ CC="../../xgcc -B../../" STAGE_PREFIX=../../ gnattools1
$(MAKE) -C $(GCC_DIR)/ada $(ADA_TOOLS_FLAGS_TO_PASS) gnattools3 ; \ $(MAKE) -C $(GCC_DIR)/ada $(ADA_TOOLS_FLAGS_TO_PASS) gnattools2
else \ $(MAKE) -C $(GCC_DIR)/ada $(ADA_TOOLS_FLAGS_TO_PASS) gnattools3
$(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
regnattools: regnattools:
$(MAKE) -C $(GCC_DIR)/ada $(ADA_TOOLS_FLAGS_TO_PASS) gnattools1-re $(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) gnattools2
$(MAKE) -C $(GCC_DIR)/ada $(ADA_TOOLS_FLAGS_TO_PASS) gnattools3 $(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 gnattools-cross: gnatlib
# *before* the rest of crossgnattools or *after* it. $(MAKE) -C $(GCC_DIR)/ada $(FLAGS_TO_PASS) $(ADA_FLAGS_TO_PASS) \
ada.all.cross: 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 \ if [ -f $(GCC_DIR)/gnatbind$(exeext) ] ; then \
mv $(GCC_DIR)/gnatbind$(exeext) $(GCC_DIR)/gnatbind-cross$(exeext); \ mv $(GCC_DIR)/gnatbind$(exeext) $(GCC_DIR)/gnatbind-cross$(exeext); \
fi fi
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment