1 # Top level -*- makefile -*- fragment for GNU Ada (GNAT).
2 # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
3 # 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013
4 # Free Software Foundation, Inc.
6 #This file is part of GCC.
8 #GCC is free software; you can redistribute it and/or modify
9 #it under the terms of the GNU General Public License as published by
10 #the Free Software Foundation; either version 3, or (at your option)
13 #GCC is distributed in the hope that it will be useful,
14 #but WITHOUT ANY WARRANTY; without even the implied warranty of
15 #MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 #GNU General Public License for more details.
18 #You should have received a copy of the GNU General Public License
19 #along with GCC; see the file COPYING3. If not see
20 #<http://www.gnu.org/licenses/>.
22 # This file provides the language dependent support in the main Makefile.
23 # Each language makefile fragment must provide the following targets:
25 # foo.all.cross, foo.start.encap, foo.rest.encap,
26 # foo.install-common, foo.install-man, foo.install-info, foo.install-pdf,
27 # foo.install-html, foo.info, foo.dvi, foo.pdf, foo.html, foo.uninstall,
28 # foo.mostlyclean, foo.clean, foo.distclean,
29 # foo.maintainer-clean, foo.stage1, foo.stage2, foo.stage3, foo.stage4
31 # where `foo' is the name of the language.
33 # It should also provide rules for:
35 # - making any compiler driver (eg: g++)
36 # - the compiler proper (eg: cc1plus)
37 # - define the names for selecting the language in LANGUAGES.
47 # Extra flags to pass to recursive makes.
48 COMMON_ADAFLAGS= -gnatpg
49 ifeq ($(TREECHECKING),)
52 CHECKING_ADAFLAGS= -gnata
54 WARN_ADAFLAGS= -W -Wall
56 # For native builds, the base compiler might be old and we need to arrange for
57 # style warnings not to be flagged as errors during stage1. Cross compilers
58 # need to be built by a recent/matching native so we might as well leave the
59 # checks fully active.
62 ADAFLAGS= $(COMMON_ADAFLAGS) -gnatwns
64 ADAFLAGS= $(COMMON_ADAFLAGS)
68 $(CFLAGS) $(ADA_CFLAGS) $(ADAFLAGS) $(CHECKING_ADAFLAGS) $(WARN_ADAFLAGS)
69 FORCE_DEBUG_ADAFLAGS = -g
71 ADA_INCLUDES = -nostdinc -I- -I. -Iada -I$(srcdir)/ada -I$(srcdir)/ada/gcc-interface
72 GNATLIBFLAGS= -W -Wall -gnatpg -nostdinc
73 GNATLIBCFLAGS= -g -O2 $(TCFLAGS)
74 ADA_INCLUDE_DIR = $(libsubdir)/adainclude
75 ADA_RTL_OBJ_DIR = $(libsubdir)/adalib
78 # We do not want the WARN_CFLAGS of the compiler in Ada as it is for C/C++.
79 COMMON_FLAGS_TO_PASS = $(filter-out $(WARN_CFLAGS), $(FLAGS_TO_PASS))
81 "ADA_FOR_BUILD=$(ADA_FOR_BUILD)" \
82 "ADA_INCLUDE_DIR=$(ADA_INCLUDE_DIR)" \
83 "ADA_RTL_OBJ_DIR=$(ADA_RTL_OBJ_DIR)" \
84 "ADAFLAGS=$(ADAFLAGS) $(WARN_ADAFLAGS)" \
85 "ADA_FOR_TARGET=$(ADA_FOR_TARGET)" \
86 "INSTALL=$(INSTALL)" \
87 "INSTALL_DATA=$(INSTALL_DATA)" \
88 "INSTALL_PROGRAM=$(INSTALL_PROGRAM)"
90 # List of Ada tools to build and install
91 ADA_TOOLS=gnatbind gnatchop gnat gnatkr gnatlink gnatls gnatmake \
92 gnatname gnatprep gnatxref gnatfind gnatclean
94 # Say how to compile Ada programs.
95 .SUFFIXES: .ada .adb .ads
97 # FIXME: need to add $(ADA_CFLAGS) to .c.o suffix rule
98 # Use mildly strict warnings for this front end and add special flags.
99 ada-warn = $(ADA_CFLAGS) $(filter-out -pedantic, $(STRICT_WARN))
100 # Unresolved warnings in specific files.
101 ada/adaint.o-warn = -Wno-error
103 ada/%.o: ada/gcc-interface/%.c
107 # Function that dumps the dependencies of an Ada object file by parsing the
108 # associated ALI file. We match the lines starting with D to achieve that.
109 ADA_DEPS=case $@ in \
111 *)a="`echo $@ | sed -e 's/.o$$/.ali/'`"; \
112 echo "$@: `cat $$a | \
113 sed -ne 's;^D \([a-z0-9_\.-]*\).*;ada/\1;gp' | \
114 tr -d '\015' | tr '\n' ' '`" > $(dir $@)/$(DEPDIR)/$(patsubst %.o,%.Po,$(notdir $@));; \
118 $(CC) -c $(ALL_ADAFLAGS) $(ADA_INCLUDES) $< $(OUTPUT_OPTION)
122 $(CC) -c $(ALL_ADAFLAGS) $(ADA_INCLUDES) $< $(OUTPUT_OPTION)
125 # Define the names for selecting Ada in LANGUAGES.
126 ada: gnat1$(exeext) gnatbind$(exeext)
128 # Tell GNU Make to ignore these, if they exist.
131 # Compute the FLAGS to pass for gnattools, now linked with a C++ driver as
132 # we're linking against at least libcommon which contains C++ compiled code.
133 # We need to use the same driver to link as the one that was used to produce
134 # the objects, which depends on whether we're bootstrapping or not. The CXX
135 # variable conveys what we need for this, set to "g++" if not bootstrapping,
136 # ".../xg++" otherwise.
138 # There are too many Ada sources to check against here. Let's
139 # always force the recursive make.
140 ifeq ($(build), $(host))
141 ifeq ($(host), $(target))
142 # This is a regular native. So use the compiler from our current build
144 ADA_TOOLS_FLAGS_TO_PASS=\
145 CC="../../xgcc -B../../" \
147 $(COMMON_FLAGS_TO_PASS) $(ADA_FLAGS_TO_PASS) \
148 ADA_INCLUDES="-I- -I../rts" \
149 GNATMAKE="../../gnatmake" \
150 GNATLINK="../../gnatlink" \
151 GNATBIND="../../gnatbind"
153 # This is a regular cross compiler. Use the native compiler to compile
156 # put the host RTS dir first in the PATH to hide the default runtime
157 # files that are among the sources
158 ifneq ($(findstring ada,$(LANGUAGES)),)
159 RTS_DIR:=$(strip $(subst \,/,$(shell gnatls -v | grep adalib )))
162 ADA_TOOLS_FLAGS_TO_PASS=\
165 $(COMMON_FLAGS_TO_PASS) $(ADA_FLAGS_TO_PASS) \
166 ADA_INCLUDES="-I$(RTS_DIR)/../adainclude -I$(RTS_DIR)" \
167 GNATMAKE="gnatmake" \
168 GNATBIND="gnatbind" \
169 GNATLINK="gnatlink" \
173 # Build is different from host so we are either building a canadian cross
174 # or a cross-native compiler. We provide defaults for tools targeting the
175 # host platform, but they can be overriden by just setting <tool>_FOR_HOST
177 GNATMAKE_FOR_HOST=$(host)-gnatmake
178 GNATBIND_FOR_HOST=$(host)-gnatbind
179 GNATLINK_FOR_HOST=$(host)-gnatlink
180 GNATLS_FOR_HOST=$(host)-gnatls
182 ifeq ($(host), $(target))
183 # This is a cross native. All the sources are taken from the currently
185 ADA_TOOLS_FLAGS_TO_PASS=\
188 $(COMMON_FLAGS_TO_PASS) $(ADA_FLAGS_TO_PASS) \
189 ADA_INCLUDES="-I../rts" \
190 GNATMAKE="$(GNATMAKE_FOR_HOST)" \
191 GNATBIND="$(GNATBIND_FOR_HOST)" \
192 GNATLINK="$(GNATLINK_FOR_HOST)" \
195 # This is a canadian cross. We should use a toolchain running on the
196 # build platform and targeting the host platform.
197 ifneq ($(findstring ada,$(LANGUAGES)),)
198 RTS_DIR:=$(strip $(subst \,/,$(shell $(GNATLS_FOR_HOST) -v | grep adalib )))
200 ADA_TOOLS_FLAGS_TO_PASS=\
203 $(COMMON_FLAGS_TO_PASS) $(ADA_FLAGS_TO_PASS) \
204 ADA_INCLUDES="-I$(RTS_DIR)/../adainclude -I$(RTS_DIR)" \
205 GNATMAKE="$(GNATMAKE_FOR_HOST)" \
206 GNATBIND="$(GNATBIND_FOR_HOST)" \
207 GNATLINK="$(GNATLINK_FOR_HOST)" \
212 # Strip -Werror during linking for the LTO bootstrap
213 GCC_LINKERFLAGS = $(filter-out -Werror, $(ALL_LINKERFLAGS))
215 GCC_LINK=$(LINKER) $(GCC_LINKERFLAGS) $(LDFLAGS)
216 GCC_LLINK=$(LLINKER) $(GCC_LINKERFLAGS) $(LDFLAGS)
218 # Lists of files for various purposes.
220 # Languages-specific object files for Ada.
222 # Object files for gnat1 from C sources.
223 GNAT1_C_OBJS = ada/adadecode.o ada/adaint.o ada/argv.o ada/cio.o \
224 ada/cstreams.o ada/env.o ada/init.o ada/initialize.o ada/raise.o \
225 ada/seh_init.o ada/targext.o ada/cuintp.o ada/decl.o \
226 ada/misc.o ada/utils.o ada/utils2.o ada/trans.o ada/targtyps.o
228 # Object files from Ada sources that are used by gnat1
297 ada/get_spark_xrefs.o \
326 ada/put_spark_xrefs.o \
453 # Object files for gnat executables
454 GNAT1_ADA_OBJS = $(GNAT_ADA_OBJS) ada/back_end.o ada/gnat1drv.o
456 GNAT1_OBJS = $(GNAT1_C_OBJS) $(GNAT1_ADA_OBJS) ada/b_gnat1.o
585 # Language-independent object files.
586 ADA_BACKEND = $(BACKEND) attribs.o
588 # List of target dependent sources, overridden below as necessary
591 # Needs to be built with CC=gcc
592 # Since the RTL should be built with the latest compiler, remove the
593 # stamp target in the parent directory whenever gnat1 is rebuilt
594 gnat1$(exeext): $(TARGET_ADA_SRCS) $(GNAT1_OBJS) $(ADA_BACKEND) libcommon-target.a $(LIBDEPS)
595 +$(GCC_LLINK) -o $@ $(GNAT1_OBJS) $(ADA_BACKEND) \
596 libcommon-target.a $(LIBS) $(SYSLIBS) $(BACKENDLIBS) $(CFLAGS)
597 $(RM) stamp-gnatlib2-rts stamp-tools
599 gnatbind$(exeext): ada/b_gnatb.o $(CONFIG_H) $(GNATBIND_OBJS) ggc-none.o libcommon-target.a $(LIBDEPS)
600 +$(GCC_LINK) -o $@ ada/b_gnatb.o $(GNATBIND_OBJS) ggc-none.o libcommon-target.a $(LIBS) $(SYSLIBS) $(CFLAGS)
602 # use target-gcc target-gnatmake target-gnatbind target-gnatlink
603 gnattools: $(GCC_PARTS) $(CONFIG_H) prefix.o force
604 $(MAKE) -C ada $(ADA_TOOLS_FLAGS_TO_PASS) gnattools1
605 $(MAKE) -C ada $(ADA_TOOLS_FLAGS_TO_PASS) gnattools2
608 $(MAKE) -C ada $(ADA_TOOLS_FLAGS_TO_PASS) gnattools1-re
609 $(MAKE) -C ada $(ADA_TOOLS_FLAGS_TO_PASS) gnattools2
611 cross-gnattools: force
612 $(MAKE) -C ada $(ADA_TOOLS_FLAGS_TO_PASS) gnattools1-re
613 $(MAKE) -C ada $(ADA_TOOLS_FLAGS_TO_PASS) gnattools2
614 $(MAKE) -C ada $(ADA_TOOLS_FLAGS_TO_PASS) gnattools4
616 canadian-gnattools: force
617 $(MAKE) -C ada $(ADA_TOOLS_FLAGS_TO_PASS) gnattools1-re
618 $(MAKE) -C ada $(ADA_TOOLS_FLAGS_TO_PASS) gnattools2
619 $(MAKE) -C ada $(ADA_TOOLS_FLAGS_TO_PASS) gnattools4
621 gnatlib gnatlib-sjlj gnatlib-zcx gnatlib-shared: force
622 $(MAKE) -C ada $(COMMON_FLAGS_TO_PASS) \
623 GNATLIBFLAGS="$(GNATLIBFLAGS)" \
624 GNATLIBCFLAGS="$(GNATLIBCFLAGS)" \
625 TARGET_LIBGCC2_CFLAGS="$(TARGET_LIBGCC2_CFLAGS)" \
626 THREAD_KIND="$(THREAD_KIND)" \
628 FORCE_DEBUG_ADAFLAGS="$(FORCE_DEBUG_ADAFLAGS)" \
631 # use only for native compiler
632 gnatlib_and_tools: gnatlib gnattools
637 for tool in $(ADA_TOOLS) ; do \
638 if [ -f $$tool$(exeext) ] ; \
640 $(MV) $$tool$(exeext) $$tool-cross$(exeext); \
651 cd $(srcdir)/ada && etags -o TAGS.sub *.c *.h *.ads *.adb && \
652 etags --include TAGS.sub --include ../TAGS.sub
655 # Generate documentation.
657 doc/gnat_ugn.info: ada/gnat_ugn.texi ada/projects.texi \
658 $(gcc_docdir)/include/fdl.texi $(gcc_docdir)/include/gcc-common.texi \
660 if [ x$(BUILD_INFO) = xinfo ]; then \
662 $(MAKEINFO) $(MAKEINFOFLAGS) -I$(gcc_docdir)/include \
663 -I$(srcdir)/ada -o $@ $<; \
666 doc/gnat_rm.info: ada/gnat_rm.texi $(gcc_docdir)/include/fdl.texi \
667 $(gcc_docdir)/include/gcc-common.texi gcc-vers.texi
668 if [ x$(BUILD_INFO) = xinfo ]; then \
670 $(MAKEINFO) $(MAKEINFOFLAGS) -I$(gcc_docdir)/include \
671 -I$(srcdir)/ada -o $@ $<; \
674 doc/gnat-style.info: ada/gnat-style.texi $(gcc_docdir)/include/fdl.texi \
675 $(gcc_docdir)/include/gcc-common.texi gcc-vers.texi
676 if [ x$(BUILD_INFO) = xinfo ]; then \
678 $(MAKEINFO) $(MAKEINFOFLAGS) -I$(gcc_docdir)/include \
679 -I$(srcdir)/ada -o $@ $<; \
682 ADA_INFOFILES = doc/gnat_ugn.info doc/gnat_rm.info doc/gnat-style.info
684 ada.info: $(ADA_INFOFILES)
686 ada.srcinfo: $(ADA_INFOFILES)
687 -$(CP) $^ $(srcdir)/doc
689 ada.install-info: $(DESTDIR)$(infodir)/gnat_ugn.info \
690 $(DESTDIR)$(infodir)/gnat_rm.info \
691 $(DESTDIR)$(infodir)/gnat-style.info
693 ada.dvi: doc/gnat_ugn.dvi \
694 doc/gnat_rm.dvi doc/gnat-style.dvi
696 ADA_PDFFILES = doc/gnat_ugn.pdf \
697 doc/gnat_rm.pdf doc/gnat-style.pdf
699 ada.pdf: $(ADA_PDFFILES)
701 ada.install-pdf: $(ADA_PDFFILES)
703 test -z "$(pdfdir)/gcc" || $(mkinstalldirs) "$(DESTDIR)$(pdfdir)/gcc"
704 @list='$(ADA_PDFFILES)'; for p in $$list; do \
705 if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
706 f=$(pdf__strip_dir) \
707 echo " $(INSTALL_DATA) '$$d$$p' '$(DESTDIR)$(pdfdir)/gcc/$$f'"; \
708 $(INSTALL_DATA) "$$d$$p" "$(DESTDIR)$(pdfdir)/gcc/$$f"; \
715 doc/gnat_ugn.dvi: ada/gnat_ugn.texi ada/projects.texi \
716 $(gcc_docdir)/include/fdl.texi \
717 $(gcc_docdir)/include/gcc-common.texi gcc-vers.texi
718 $(TEXI2DVI) -c -I $(abs_docdir)/include -o $@ $<
720 doc/gnat_rm.dvi: ada/gnat_rm.texi $(gcc_docdir)/include/fdl.texi \
721 $(gcc_docdir)/include/gcc-common.texi gcc-vers.texi
722 $(TEXI2DVI) -c -I $(abs_docdir)/include -o $@ $<
724 doc/gnat-style.dvi: ada/gnat-style.texi $(gcc_docdir)/include/fdl.texi
725 $(TEXI2DVI) -c -I $(abs_docdir)/include -o $@ $<
727 doc/gnat_ugn.pdf: ada/gnat_ugn.texi ada/projects.texi \
728 $(gcc_docdir)/include/fdl.texi \
729 $(gcc_docdir)/include/gcc-common.texi gcc-vers.texi
730 $(TEXI2PDF) -c -I $(abs_docdir)/include -o $@ $<
732 doc/gnat_rm.pdf: ada/gnat_rm.texi $(gcc_docdir)/include/fdl.texi \
733 $(gcc_docdir)/include/gcc-common.texi gcc-vers.texi
734 $(TEXI2PDF) -c -I $(abs_docdir)/include -o $@ $<
736 doc/gnat-style.pdf: ada/gnat-style.texi $(gcc_docdir)/include/fdl.texi
737 $(TEXI2PDF) -c -I $(abs_docdir)/include -o $@ $<
741 # gnat1 is installed elsewhere as part of $(COMPILERS).
743 # Install the binder program as gnatbind (native) or $(prefix)gnatbind
744 # (cross). $(prefix) comes from the --program-prefix configure option,
745 # or from the --target option if the former is not specified.
746 # Do the same for the rest of the Ada tools (gnatchop, gnat, gnatkr,
747 # gnatlink, gnatls, gnatmake, gnatname, gnatprep, gnatxref, gnatfind,
749 # gnatdll is only used on Windows.
750 # vxaddr2line is only used for cross VxWorks ports (it calls the underlying
753 $(MKDIR) $(DESTDIR)$(bindir)
754 -if [ -f gnat1$(exeext) ] ; \
756 for tool in $(ADA_TOOLS) ; do \
757 install_name=`echo $$tool|sed '$(program_transform_name)'`$(exeext); \
758 $(RM) $(DESTDIR)$(bindir)/$$install_name; \
759 if [ -f $$tool-cross$(exeext) ] ; \
761 $(INSTALL_PROGRAM) $$tool-cross$(exeext) $(DESTDIR)$(bindir)/$$install_name; \
763 $(INSTALL_PROGRAM) $$tool$(exeext) $(DESTDIR)$(bindir)/$$install_name; \
766 $(RM) $(DESTDIR)$(bindir)/gnatdll$(exeext); \
767 $(INSTALL_PROGRAM) gnatdll$(exeext) $(DESTDIR)$(bindir)/gnatdll$(exeext); \
768 if [ -f vxaddr2line$(exeext) ] ; \
770 $(RM) $(DESTDIR)$(bindir)/vxaddr2line$(exeext); \
771 $(INSTALL_PROGRAM) vxaddr2line$(exeext) $(DESTDIR)$(bindir)/vxaddr2line$(exeext); \
776 # Finally, install the library
778 -if [ -f gnat1$(exeext) ] ; \
780 $(MAKE) $(COMMON_FLAGS_TO_PASS) $(ADA_FLAGS_TO_PASS) install-gnatlib; \
784 $(MAKE) -C ada $(COMMON_FLAGS_TO_PASS) $(ADA_FLAGS_TO_PASS) install-gnatlib$(LIBGNAT_TARGET)
787 $(MAKE) -C ada $(COMMON_FLAGS_TO_PASS) $(ADA_FLAGS_TO_PASS) install-gnatlib-obj
793 for tool in $(ADA_TOOLS) ; do \
794 install_name=`echo $$tool|sed '$(program_transform_name)'`$(exeext); \
795 -$(RM) $(DESTDIR)$(bindir)/$$install_name; \
797 -$(RM) $(DESTDIR)$(tooldir)/bin/gnatdll$(exeext)
798 -$(RM) $(DESTDIR)$(tooldir)/bin/vxaddr2line$(exeext)
801 # A lot of the ancillary files are deleted by the main makefile.
802 # We just have to delete files specific to us.
805 -$(RM) ada/*$(objext) ada/*.ali ada/b_gnat*.ads ada/b_gnat*.adb
806 -$(RM) ada/*$(coverageexts)
807 -$(RM) ada/sdefault.adb ada/stamp-sdefault ada/stamp-snames
812 -$(RM) gnatchop$(exeext)
814 -$(RM) gnatdll$(exeext)
815 -$(RM) gnatkr$(exeext)
816 -$(RM) gnatlink$(exeext)
817 -$(RM) gnatls$(exeext)
818 -$(RM) gnatmake$(exeext)
819 -$(RM) gnatname$(exeext)
820 -$(RM) gnatprep$(exeext)
821 -$(RM) gnatfind$(exeext)
822 -$(RM) gnatxref$(exeext)
823 -$(RM) gnatclean$(exeext)
828 ada.maintainer-clean:
833 -$(RM) ada/treeprs.ads
834 -$(RM) ada/snames.ads ada/snames.adb ada/snames.h
837 # The main makefile has already created stage?/ada
839 ada.stage1: stage1-start
840 -$(MV) ada/*$(objext) ada/*.ali ada/b_gnat*.ad* stage1/ada
841 -$(MV) ada/stamp-* stage1/ada
842 ada.stage2: stage2-start
843 -$(MV) ada/*$(objext) ada/*.ali ada/b_gnat*.ad* stage2/ada
844 -$(MV) ada/stamp-* stage2/ada
845 ada.stage3: stage3-start
846 -$(MV) ada/*$(objext) ada/*.ali ada/b_gnat*.ad* stage3/ada
847 -$(MV) ada/stamp-* stage3/ada
848 ada.stage4: stage4-start
849 -$(MV) ada/*$(objext) ada/*.ali ada/b_gnat*.ad* stage4/ada
850 -$(MV) ada/stamp-* stage4/ada
851 ada.stageprofile: stageprofile-start
852 -$(MV) ada/*$(objext) ada/*.ali ada/b_gnat*.ad* stageprofile/ada
853 -$(MV) ada/stamp-* stageprofile/ada
854 ada.stagefeedback: stagefeedback-start
855 -$(MV) ada/*$(objext) ada/*.ali ada/b_gnat*.ad* stagefeedback/ada
856 -$(MV) ada/stamp-* stagefeedback/ada
858 lang_checks += check-gnat
860 check-ada: check-acats check-gnat
861 check-ada-subtargets: check-acats-subtargets check-gnat-subtargets
863 ACATSDIR = $(TESTSUITEDIR)/ada/acats
865 check_acats_targets = $(patsubst %,check-acats%, 0 1 2)
868 @test -d $(ACATSDIR) || mkdir -p $(ACATSDIR); \
869 rootme=`${PWD_COMMAND}`; export rootme; \
870 EXPECT=$(EXPECT); export EXPECT; \
871 if [ -z "$(CHAPTERS)" ] && [ "$(filter -j, $(MFLAGS))" = "-j" ]; \
873 $(MAKE) $(check_acats_targets); \
874 for idx in 0 1 2; do \
875 mv -f $(ACATSDIR)$$idx/acats.sum $(ACATSDIR)$$idx/acats.sum.sep; \
876 mv -f $(ACATSDIR)$$idx/acats.log $(ACATSDIR)$$idx/acats.log.sep; \
878 $(SHELL) $(srcdir)/../contrib/dg-extract-results.sh \
879 $(ACATSDIR)0/acats.sum.sep $(ACATSDIR)1/acats.sum.sep \
880 $(ACATSDIR)2/acats.sum.sep > $(ACATSDIR)/acats.sum; \
881 $(SHELL) $(srcdir)/../contrib/dg-extract-results.sh -L \
882 $(ACATSDIR)0/acats.log.sep $(ACATSDIR)1/acats.log.sep \
883 $(ACATSDIR)2/acats.log.sep > $(ACATSDIR)/acats.log; \
886 testdir=`cd ${srcdir}/${ACATSDIR} && ${PWD_COMMAND}`; \
887 export testdir; cd $(ACATSDIR) && $(SHELL) $${testdir}/run_acats $(CHAPTERS)
889 check-acats-subtargets:
890 @echo $(check_acats_targets)
892 # Parallelized check-acats
893 $(check_acats_targets): check-acats%:
894 test -d $(ACATSDIR)$* || mkdir -p $(ACATSDIR)$*; \
895 testdir=`cd ${srcdir}/${ACATSDIR} && ${PWD_COMMAND}`; \
897 0) chapters="`cd $$testdir/tests; echo [a-b]* c[0-4]*`";; \
898 1) chapters="`cd $$testdir/tests; echo c[5-9ab]*`";; \
899 2) chapters="`cd $$testdir/tests; echo c[c-z]* [d-z]*`";; \
901 export testdir; cd $(ACATSDIR)$* && $(SHELL) $${testdir}/run_acats $$chapters
903 .PHONY: check-acats $(check_acats_targets)
905 # Compiling object files from source files.
907 # Ada language specific files.
909 ada/b_gnat1.adb : $(GNAT1_ADA_OBJS)
910 # Old gnatbind do not allow a path for -o.
911 $(GNATBIND) $(ADA_INCLUDES) -o b_gnat1.adb -n ada/gnat1drv.ali
912 $(MV) b_gnat1.adb b_gnat1.ads ada/
914 ada/b_gnat1.o : ada/b_gnat1.adb
915 # Do not use ADAFLAGS to get rid of -gnatg which generates a lot
917 $(CC) -c $(CFLAGS) $(ADA_CFLAGS) -gnatp -gnatws $(ADA_INCLUDES) \
920 ada/b_gnatb.adb : $(GNATBIND_OBJS) ada/gnatbind.o ada/interfac.o
921 # Old gnatbind do not allow a path for -o.
922 $(GNATBIND) $(ADA_INCLUDES) -o b_gnatb.adb ada/gnatbind.ali
923 $(MV) b_gnatb.adb b_gnatb.ads ada/
925 ada/b_gnatb.o : ada/b_gnatb.adb
926 $(CC) -c $(CFLAGS) $(ADA_CFLAGS) -gnatp -gnatws $(ADA_INCLUDES) \
929 include $(srcdir)/ada/Make-generated.in
931 update-sources : ada/treeprs.ads ada/einfo.h ada/sinfo.h ada/nmake.adb \
933 $(RM) $(addprefix $(srcdir)/ada/,$(notdir $^))
934 $(CP) $^ $(srcdir)/ada
936 ada/sdefault.o : ada/ada.ads ada/a-except.ads ada/a-unccon.ads \
937 ada/a-uncdea.ads ada/alloc.ads ada/debug.ads ada/hostparm.ads ada/namet.ads \
938 ada/opt.ads ada/osint.ads ada/output.ads ada/sdefault.ads ada/sdefault.adb \
939 ada/s-exctab.ads ada/s-memory.ads ada/s-os_lib.ads ada/s-parame.ads \
940 ada/s-stalib.ads ada/s-strops.ads ada/s-sopco3.ads ada/s-sopco4.ads \
941 ada/s-sopco5.ads ada/s-string.ads ada/s-traent.ads ada/s-unstyp.ads \
942 ada/s-wchcon.ads ada/system.ads ada/table.adb ada/table.ads ada/tree_io.ads \
943 ada/types.ads ada/unchdeal.ads ada/unchconv.ads
945 # Special flags - see gcc-interface/Makefile.in for the template.
947 ada/a-except.o : ada/a-except.adb ada/a-except.ads
948 $(CC) -c $(ALL_ADAFLAGS) $(FORCE_DEBUG_ADAFLAGS) -O1 -fno-inline \
949 $(ADA_INCLUDES) $< $(OUTPUT_OPTION)
952 ada/s-excdeb.o : ada/s-excdeb.adb ada/s-excdeb.ads
953 $(CC) -c $(ALL_ADAFLAGS) $(FORCE_DEBUG_ADAFLAGS) -O0 \
954 $(ADA_INCLUDES) $< $(OUTPUT_OPTION)
957 ada/s-assert.o : ada/s-assert.adb ada/s-assert.ads
958 $(CC) -c $(ALL_ADAFLAGS) $(FORCE_DEBUG_ADAFLAGS) $(ADA_INCLUDES) \
962 ada/a-tags.o : ada/a-tags.adb ada/a-tags.ads
963 $(CC) -c $(ALL_ADAFLAGS) $(FORCE_DEBUG_ADAFLAGS) $(ADA_INCLUDES) \
967 # Dependencies for windows specific tool (mdll)
969 ada/mdll.o : ada/mdll.adb ada/mdll.ads ada/mdll-fil.ads ada/mdll-utl.ads
970 $(CC) -c $(ALL_ADAFLAGS) $(ADA_INCLUDES) $< $(OUTPUT_OPTION)
972 ada/mdll-fil.o : ada/mdll-fil.adb ada/mdll.ads ada/mdll-fil.ads
973 $(CC) -c $(ALL_ADAFLAGS) $(ADA_INCLUDES) $< $(OUTPUT_OPTION)
975 ada/mdll-utl.o : ada/mdll-utl.adb ada/mdll.ads ada/mdll-utl.ads ada/sdefault.ads ada/types.ads
976 $(CC) -c $(ALL_ADAFLAGS) $(ADA_INCLUDES) $< $(OUTPUT_OPTION)
978 ada_generated_files = ada/sinfo.h ada/einfo.h ada/nmake.adb ada/nmake.ads \
979 ada/treeprs.ads ada/snames.ads ada/snames.adb ada/snames.h
981 # When building from scratch we don't have dependency files, the only thing
982 # we need to ensure is that the generated files are created first.
983 $(GNAT1_ADA_OBJS) $(GNATBIND_OBJS): | $(ada_generated_files)
985 # Manually include the auto-generated dependencies for the Ada host objects.
986 ADA_DEPFILES = $(foreach obj,$(GNAT1_ADA_OBJS) $(GNATBIND_OBJS),\
987 $(dir $(obj))/$(DEPDIR)/$(patsubst %.o,%.Po,$(notdir $(obj))))
988 -include $(ADA_DEPFILES)
990 # Automatically include the auto-generated dependencies for the C host objects.
991 ada_OBJS = $(GNAT1_C_OBJS)