Searched hist:"76 a48b8ffbad5cb24ce3fab517a24f555b3c9616" (Results 1 – 3 of 3) sorted by relevance
/openbmc/linux/scripts/ |
H A D | Makefile.package | 76a48b8ffbad5cb24ce3fab517a24f555b3c9616 Fri Jul 21 23:47:55 CDT 2023 Masahiro Yamada <masahiroy@kernel.org> kbuild: add a phony target to run a command with Kbuild env vars
There are some cases where we want to run a command with the same environment variables as Kbuild uses. For example, 'make coccicheck' invokes scripts/coccicheck from the top Makefile so that the script can reference to ${LINUXINCLUDE}, ${KBUILD_EXTMOD}, etc. The top Makefile defines several phony targets that run a script.
We do it also for an internally used script, which results in a somewhat complex call graph.
One example:
debian/rules binary-arch -> make intdeb-pkg -> scripts/package/builddeb
It is also tedious to add a dedicated target like 'intdeb-pkg' for each use case.
Add a generic target 'run-command' to run an arbitrary command in an environment with all Kbuild variables set.
The usage is:
$ make run-command KBUILD_RUN_COMMAND=<command>
The concept is similar to:
$ dpkg-architecture -c <command>
This executes <command> in an environment which has all DEB_* variables defined.
Convert the existing 'make intdeb-pkg'.
Another possible usage is to interrogate a Make variable.
$ make run-command KBUILD_RUN_COMMAND='echo $(KBUILD_CFLAGS)'
might be useful to see KBUILD_CFLAGS set by the top Makefile.
Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
|
/openbmc/linux/scripts/package/ |
H A D | mkdebian | 76a48b8ffbad5cb24ce3fab517a24f555b3c9616 Fri Jul 21 23:47:55 CDT 2023 Masahiro Yamada <masahiroy@kernel.org> kbuild: add a phony target to run a command with Kbuild env vars
There are some cases where we want to run a command with the same environment variables as Kbuild uses. For example, 'make coccicheck' invokes scripts/coccicheck from the top Makefile so that the script can reference to ${LINUXINCLUDE}, ${KBUILD_EXTMOD}, etc. The top Makefile defines several phony targets that run a script.
We do it also for an internally used script, which results in a somewhat complex call graph.
One example:
debian/rules binary-arch -> make intdeb-pkg -> scripts/package/builddeb
It is also tedious to add a dedicated target like 'intdeb-pkg' for each use case.
Add a generic target 'run-command' to run an arbitrary command in an environment with all Kbuild variables set.
The usage is:
$ make run-command KBUILD_RUN_COMMAND=<command>
The concept is similar to:
$ dpkg-architecture -c <command>
This executes <command> in an environment which has all DEB_* variables defined.
Convert the existing 'make intdeb-pkg'.
Another possible usage is to interrogate a Make variable.
$ make run-command KBUILD_RUN_COMMAND='echo $(KBUILD_CFLAGS)'
might be useful to see KBUILD_CFLAGS set by the top Makefile.
Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
|
/openbmc/linux/ |
H A D | Makefile | 76a48b8ffbad5cb24ce3fab517a24f555b3c9616 Fri Jul 21 23:47:55 CDT 2023 Masahiro Yamada <masahiroy@kernel.org> kbuild: add a phony target to run a command with Kbuild env vars
There are some cases where we want to run a command with the same environment variables as Kbuild uses. For example, 'make coccicheck' invokes scripts/coccicheck from the top Makefile so that the script can reference to ${LINUXINCLUDE}, ${KBUILD_EXTMOD}, etc. The top Makefile defines several phony targets that run a script.
We do it also for an internally used script, which results in a somewhat complex call graph.
One example:
debian/rules binary-arch -> make intdeb-pkg -> scripts/package/builddeb
It is also tedious to add a dedicated target like 'intdeb-pkg' for each use case.
Add a generic target 'run-command' to run an arbitrary command in an environment with all Kbuild variables set.
The usage is:
$ make run-command KBUILD_RUN_COMMAND=<command>
The concept is similar to:
$ dpkg-architecture -c <command>
This executes <command> in an environment which has all DEB_* variables defined.
Convert the existing 'make intdeb-pkg'.
Another possible usage is to interrogate a Make variable.
$ make run-command KBUILD_RUN_COMMAND='echo $(KBUILD_CFLAGS)'
might be useful to see KBUILD_CFLAGS set by the top Makefile.
Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
|