summaryrefslogtreecommitdiffstats
path: root/testsuites/ada
diff options
context:
space:
mode:
authorChris Johns <chrisj@rtems.org>2017-12-23 18:18:56 +1100
committerSebastian Huber <sebastian.huber@embedded-brains.de>2018-01-25 08:45:26 +0100
commit2afb22b7e1ebcbe40373ff7e0efae7d207c655a9 (patch)
tree44759efe9374f13200a97e96d91bd9a2b7e5ce2a /testsuites/ada
parentMAINTAINERS: Add myself to Write After Approval. (diff)
downloadrtems-2afb22b7e1ebcbe40373ff7e0efae7d207c655a9.tar.bz2
Remove make preinstall
A speciality of the RTEMS build system was the make preinstall step. It copied header files from arbitrary locations into the build tree. The header files were included via the -Bsome/build/tree/path GCC command line option. This has at least seven problems: * The make preinstall step itself needs time and disk space. * Errors in header files show up in the build tree copy. This makes it hard for editors to open the right file to fix the error. * There is no clear relationship between source and build tree header files. This makes an audit of the build process difficult. * The visibility of all header files in the build tree makes it difficult to enforce API barriers. For example it is discouraged to use BSP-specifics in the cpukit. * An introduction of a new build system is difficult. * Include paths specified by the -B option are system headers. This may suppress warnings. * The parallel build had sporadic failures on some hosts. This patch removes the make preinstall step. All installed header files are moved to dedicated include directories in the source tree. Let @RTEMS_CPU@ be the target architecture, e.g. arm, powerpc, sparc, etc. Let @RTEMS_BSP_FAMILIY@ be a BSP family base directory, e.g. erc32, imx, qoriq, etc. The new cpukit include directories are: * cpukit/include * cpukit/score/cpu/@RTEMS_CPU@/include * cpukit/libnetworking The new BSP include directories are: * bsps/include * bsps/@RTEMS_CPU@/include * bsps/@RTEMS_CPU@/@RTEMS_BSP_FAMILIY@/include There are build tree include directories for generated files. The include directory order favours the most general header file, e.g. it is not possible to override general header files via the include path order. The "bootstrap -p" option was removed. The new "bootstrap -H" option should be used to regenerate the "headers.am" files. Update #3254.
Diffstat (limited to 'testsuites/ada')
-rw-r--r--testsuites/ada/ada.am8
-rw-r--r--testsuites/ada/configure.ac2
-rw-r--r--testsuites/ada/samples/base_mp/node1/Makefile.am2
-rw-r--r--testsuites/ada/samples/base_mp/node2/Makefile.am2
-rw-r--r--testsuites/ada/samples/base_sp/Makefile.am2
-rw-r--r--testsuites/ada/samples/hello/Makefile.am2
-rw-r--r--testsuites/ada/samples/nsecs/Makefile.am2
-rw-r--r--testsuites/ada/samples/ticker/Makefile.am2
-rw-r--r--testsuites/ada/sptests/spname01/Makefile.am2
9 files changed, 11 insertions, 13 deletions
diff --git a/testsuites/ada/ada.am b/testsuites/ada/ada.am
index 17084fb753..33d0c3ae2f 100644
--- a/testsuites/ada/ada.am
+++ b/testsuites/ada/ada.am
@@ -2,18 +2,14 @@ SUFFIXES = .adb .ali .ads .adp
GNATMAKE = @GNATMAKE@
-AM_ADAFLAGS = -I$(PROJECT_ROOT)/lib/include/adainclude \
--I$(PROJECT_ROOT)/@RTEMS_BSP@/lib/include/adainclude \
+AM_ADAFLAGS = -I$(RTEMS_SOURCE_ROOT)/cpukit/include/adainclude \
-I$(top_srcdir)/support
GNATCOMPILE = $(GNATMAKE) \
-bargs -Mgnat_main \
-margs $(AM_ADAFLAGS) $(ADAFLAGS) \
-cargs $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) \
- $(GCCSPECS) \
--largs $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) \
- $(GCCSPECS) \
-$(AM_LDFLAGS) $(LDFLAGS) init.o
+-largs $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) init.o
CLEANFILES += *.ali *.o b~*.adb b~*.ads
diff --git a/testsuites/ada/configure.ac b/testsuites/ada/configure.ac
index a9293842b9..4ec8532ada 100644
--- a/testsuites/ada/configure.ac
+++ b/testsuites/ada/configure.ac
@@ -4,6 +4,8 @@ AC_PREREQ([2.69])
AC_INIT([rtems-ada-tests],[_RTEMS_VERSION],[https://devel.rtems.org/newticket])
AC_CONFIG_SRCDIR([support])
RTEMS_TOP([../..],[..])
+RTEMS_SOURCE_TOP
+RTEMS_BUILD_TOP
RTEMS_CANONICAL_TARGET_CPU
diff --git a/testsuites/ada/samples/base_mp/node1/Makefile.am b/testsuites/ada/samples/base_mp/node1/Makefile.am
index c6ec8cd42b..f9e45cfde3 100644
--- a/testsuites/ada/samples/base_mp/node1/Makefile.am
+++ b/testsuites/ada/samples/base_mp/node1/Makefile.am
@@ -14,7 +14,7 @@ ada_base_mp_node1$(EXEEXT): ../mptest.adb init.o
$(GNATCOMPILE) -margs -a $< -o $@
init.o: ../../../support/init.c
- $(COMPILE.c) -DNODE_NUMBER=1 -I$(srcdir)/.. -c $<
+ $(COMPILE.c) $(AM_CPPFLAGS) -DNODE_NUMBER=1 -I$(srcdir)/.. -c $<
scndir = $(rtems_ada_testsdir)
dist_scn_DATA = ada_base_mp-node1.scn
diff --git a/testsuites/ada/samples/base_mp/node2/Makefile.am b/testsuites/ada/samples/base_mp/node2/Makefile.am
index 9095902a0b..6567b95976 100644
--- a/testsuites/ada/samples/base_mp/node2/Makefile.am
+++ b/testsuites/ada/samples/base_mp/node2/Makefile.am
@@ -14,7 +14,7 @@ ada_base_mp_node2$(EXEEXT): ../mptest.adb init.o
$(GNATCOMPILE) -margs -a $< -o $@
init.o: ../../../support/init.c
- $(COMPILE.c) -DNODE_NUMBER=2 -I$(srcdir)/.. -c $<
+ $(COMPILE.c) $(AM_CPPFLAGS) -DNODE_NUMBER=2 -I$(srcdir)/.. -c $<
scndir = $(rtems_ada_testsdir)
dist_scn_DATA = ada_base_mp-node2.scn
diff --git a/testsuites/ada/samples/base_sp/Makefile.am b/testsuites/ada/samples/base_sp/Makefile.am
index c6b2628735..97ed434c91 100644
--- a/testsuites/ada/samples/base_sp/Makefile.am
+++ b/testsuites/ada/samples/base_sp/Makefile.am
@@ -7,7 +7,7 @@ ada_base_sp$(EXEEXT): base_sp.adb init.$(OBJEXT)
$(GNATCOMPILE) -margs -a $< -o $@
init.$(OBJEXT): ../../support/init.c
- $(COMPILE.c) -I$(srcdir) -c $<
+ $(COMPILE.c) $(AM_CPPFLAGS) -I$(srcdir) -c $<
noinst_PROGRAMS = ada_base_sp
diff --git a/testsuites/ada/samples/hello/Makefile.am b/testsuites/ada/samples/hello/Makefile.am
index 9a6aa5eeb6..ccf8ccf37a 100644
--- a/testsuites/ada/samples/hello/Makefile.am
+++ b/testsuites/ada/samples/hello/Makefile.am
@@ -7,7 +7,7 @@ ada_hello$(EXEEXT): hello.adb init.$(OBJEXT)
$(GNATCOMPILE) -margs -a $< -o $@
init.$(OBJEXT): ../../support/init.c
- $(COMPILE.c) -I$(srcdir) -c $<
+ $(COMPILE.c) $(AM_CPPFLAGS) -I$(srcdir) -c $<
noinst_PROGRAMS = ada_hello
diff --git a/testsuites/ada/samples/nsecs/Makefile.am b/testsuites/ada/samples/nsecs/Makefile.am
index 64a8145818..e0b0849a14 100644
--- a/testsuites/ada/samples/nsecs/Makefile.am
+++ b/testsuites/ada/samples/nsecs/Makefile.am
@@ -7,7 +7,7 @@ ada_nsecs$(EXEEXT): nsecs.adb init.$(OBJEXT)
$(GNATCOMPILE) -margs -a $< -o $@
init.$(OBJEXT): ../../support/init.c
- $(COMPILE.c) -I$(srcdir) -c $<
+ $(COMPILE.c) $(AM_CPPFLAGS) -I$(srcdir) -c $<
noinst_PROGRAMS = ada_nsecs
diff --git a/testsuites/ada/samples/ticker/Makefile.am b/testsuites/ada/samples/ticker/Makefile.am
index 12594586b3..de5050e79b 100644
--- a/testsuites/ada/samples/ticker/Makefile.am
+++ b/testsuites/ada/samples/ticker/Makefile.am
@@ -7,7 +7,7 @@ ada_ticker$(EXEEXT): ticker.adb init.$(OBJEXT)
$(GNATCOMPILE) -margs -a $< -o $@
init.$(OBJEXT): ../../support/init.c
- $(COMPILE.c) -I$(srcdir) -c $<
+ $(COMPILE.c) $(AM_CPPFLAGS) -I$(srcdir) -c $<
noinst_PROGRAMS = ada_ticker
diff --git a/testsuites/ada/sptests/spname01/Makefile.am b/testsuites/ada/sptests/spname01/Makefile.am
index fccab37289..e011a95b79 100644
--- a/testsuites/ada/sptests/spname01/Makefile.am
+++ b/testsuites/ada/sptests/spname01/Makefile.am
@@ -10,7 +10,7 @@ ada_spname01$(EXEEXT): spname01.adb init.$(OBJEXT)
$(GNATCOMPILE) -margs -a $< -o $@
init.$(OBJEXT): ../../support/init.c
- $(COMPILE.c) -I$(srcdir) -c $<
+ $(COMPILE.c) $(AM_CPPFLAGS) -I$(srcdir) -c $<
scndir = $(rtems_ada_testsdir)
dist_scn_DATA = ada_spname01.scn