[PATCH 12/13] ada/samples: Avoid build system defined defines
Christian Mauderer
christian.mauderer at embedded-brains.de
Mon Nov 11 11:49:12 UTC 2019
On 08/11/2019 15:03, Sebastian Huber wrote:
> Update #3818.
> ---
> testsuites/ada/samples/base_mp/node1/Makefile.am | 5 +----
> testsuites/ada/samples/base_mp/node1/init.c | 2 ++
> testsuites/ada/samples/base_mp/node2/Makefile.am | 5 +----
> testsuites/ada/samples/base_mp/node2/init.c | 2 ++
> 4 files changed, 6 insertions(+), 8 deletions(-)
> create mode 100644 testsuites/ada/samples/base_mp/node1/init.c
> create mode 100644 testsuites/ada/samples/base_mp/node2/init.c
>
> diff --git a/testsuites/ada/samples/base_mp/node1/Makefile.am b/testsuites/ada/samples/base_mp/node1/Makefile.am
> index 4916854597..83b1db2894 100644
> --- a/testsuites/ada/samples/base_mp/node1/Makefile.am
> +++ b/testsuites/ada/samples/base_mp/node1/Makefile.am
> @@ -7,15 +7,12 @@ AM_ADAFLAGS += -I$(srcdir)/..
>
> if EXPADA
> noinst_PROGRAMS = ada_base_mp_node1
> -ada_base_mp_node1_SOURCES = mptest-per_node_configuration.adb
> +ada_base_mp_node1_SOURCES = init.c mptest-per_node_configuration.adb
> endif
>
> ada_base_mp_node1$(EXEEXT): ../mptest.adb init.o
> $(GNATCOMPILE) -margs -a $< -o $@
>
> -init.o: ../../../support/init.c
> - $(COMPILE.c) $(AM_CPPFLAGS) -DNODE_NUMBER=1 -I$(srcdir)/.. -c $<
If I found the right $(srcdir) the $(srcdir)/.. includes a config.h
which is used in the c file. With the include path removed it's possible
that some other config.h is used.
> -
> scndir = $(rtems_ada_testsdir)
> dist_scn_DATA = ada_base_mp-node1.scn
>
> diff --git a/testsuites/ada/samples/base_mp/node1/init.c b/testsuites/ada/samples/base_mp/node1/init.c
> new file mode 100644
> index 0000000000..073c033378
> --- /dev/null
> +++ b/testsuites/ada/samples/base_mp/node1/init.c
> @@ -0,0 +1,2 @@
> +#define CONFIGURE_MP_NODE_NUMBER 1
> +#include "../../../support/init.c"
> diff --git a/testsuites/ada/samples/base_mp/node2/Makefile.am b/testsuites/ada/samples/base_mp/node2/Makefile.am
> index 277a3940a8..e1a6777ea1 100644
> --- a/testsuites/ada/samples/base_mp/node2/Makefile.am
> +++ b/testsuites/ada/samples/base_mp/node2/Makefile.am
> @@ -7,15 +7,12 @@ AM_ADAFLAGS += -I$(srcdir)/..
>
> if EXPADA
> noinst_PROGRAMS = ada_base_mp_node2
> -ada_base_mp_node2_SOURCES = mptest-per_node_configuration.adb
> +ada_base_mp_node2_SOURCES = init.c mptest-per_node_configuration.adb
> endif
>
> ada_base_mp_node2$(EXEEXT): ../mptest.adb init.o
> $(GNATCOMPILE) -margs -a $< -o $@
>
> -init.o: ../../../support/init.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_mp/node2/init.c b/testsuites/ada/samples/base_mp/node2/init.c
> new file mode 100644
> index 0000000000..ea6db06eab
> --- /dev/null
> +++ b/testsuites/ada/samples/base_mp/node2/init.c
> @@ -0,0 +1,2 @@
> +#define CONFIGURE_MP_NODE_NUMBER 2
> +#include "../../../support/init.c"
>
--
--------------------------------------------
embedded brains GmbH
Herr Christian Mauderer
Dornierstr. 4
D-82178 Puchheim
Germany
email: christian.mauderer at embedded-brains.de
Phone: +49-89-18 94 741 - 18
Fax: +49-89-18 94 741 - 08
PGP: Public key available on request.
Diese Nachricht ist keine geschäftliche Mitteilung im Sinne des EHUG.
More information about the devel
mailing list