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:49:36 +0000 (15:49 -0400)
commit4e16f2eed91ce720b36dbe331fe0b6b5ecc5885a
tree7bd2bb9678460292cfe93d0d4de0086554a6b255
parenta73e53681bc45743f2967be906dd3b587b99f09c
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.025554 seconds and 4 git commands to generate.