Fix: Makefile: generation of specific .i file not working
authorFrancis Deslauriers <francis.deslauriers@efficios.com>
Fri, 30 Apr 2021 15:14:20 +0000 (11:14 -0400)
committerMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Fri, 30 Apr 2021 19:48:50 +0000 (15:48 -0400)
commitc93e15272d8c032644e5dbca986fad0cfb4911bf
tree7bd2bb9678460292cfe93d0d4de0086554a6b255
parentbf99c7371bba82da4ca8c4548a87f3a5c2b3c0ab
Fix: Makefile: generation of specific .i file not working

Issue
=====
When trying to get the preprocessed version of the `lttng-syscalls.c` file
I get the following error:
  $ make src/lttng-syscalls.i
    make -C /lib/modules/5.4.0-67-generic/build M=/home/frdeso/projets/lttng/modules/src CONFIG_LTTNG=m CONFIG_LTTNG_CLOCK_PLUGIN_TEST=m src/lttng-syscalls.i
    make[1]: Entering directory '/usr/src/linux-headers-5.4.0-67-generic'
    make[3]: *** No rule to make target '/home/frdeso/projets/lttng/modules/src/src/lttng-syscalls.i'.  Stop.
    make[2]: *** [scripts/Makefile.build:480: __build] Error 2
    make[1]: *** [Makefile:1760: /home/frdeso/projets/lttng/modules/src] Error 2
    make[1]: Leaving directory '/usr/src/linux-headers-5.4.0-67-generic'
    make: *** [Makefile:32: src/lttng-syscalls.i] Error 2

We see that the gcc tries to create the `src/src/lttng-syscalls.i` file
instead of the expected `src/lttng-syscalls.i`.

Fix
===
Remove the `/src` from the `M=` option.

Signed-off-by: Francis Deslauriers <francis.deslauriers@efficios.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Change-Id: I4403d32955723239649eb385f877e52cea669720
Makefile
This page took 0.027303 seconds and 4 git commands to generate.