kernelnewbies.kernelnewbies.org archive mirror
 help / color / mirror / Atom feed
* '-D' 'KBUILD_MODSYM=main - like KBUILD_MODNAME, without the quotes ?
@ 2021-01-28 19:11 jim.cromie
  2021-01-28 23:57 ` Valdis Klētnieks
  0 siblings, 1 reply; 6+ messages in thread
From: jim.cromie @ 2021-01-28 19:11 UTC (permalink / raw)
  To: kernelnewbies


[-- Attachment #1.1: Type: text/plain, Size: 852 bytes --]

hi folks,

In my hacking, Im finding this useful.
it adds a version of KBUILD_MODNAME without the quotes

--- a/scripts/Makefile.lib
+++ b/scripts/Makefile.lib
@@ -119,7 +119,7 @@ target-stem = $(basename $(patsubst $(obj)/%,%,$@))
 # end up in (or would, if it gets compiled in)
 name-fix = $(call stringify,$(subst $(comma),_,$(subst -,_,$1)))
 basename_flags = -DKBUILD_BASENAME=$(call name-fix,$(basetarget))
-modname_flags  = -DKBUILD_MODNAME=$(call name-fix,$(modname))
+modname_flags  = -DKBUILD_MODNAME=$(call name-fix,$(modname))
-DKBUILD_MODSYM=$(modname)


Im suspicious however,
KBUILD_MODNAME has the quotes for a reason;
probably robustness at some level.
Afterall, __stringify() could add the quotes for cases where it was needed.

If there was an __unstringify_token( ) I could remove this Makefile hack,
is such a construct possible ?

[-- Attachment #1.2: Type: text/html, Size: 1070 bytes --]

[-- Attachment #2: Type: text/plain, Size: 170 bytes --]

_______________________________________________
Kernelnewbies mailing list
Kernelnewbies@kernelnewbies.org
https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2021-01-29  9:08 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-01-28 19:11 '-D' 'KBUILD_MODSYM=main - like KBUILD_MODNAME, without the quotes ? jim.cromie
2021-01-28 23:57 ` Valdis Klētnieks
2021-01-29  0:16   ` jim.cromie
2021-01-29  2:04     ` Valdis Klētnieks
2021-01-29  8:32     ` jim.cromie
2021-01-29  9:07       ` jim.cromie

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).