'-D' 'KBUILD_MODSYM=main - like KBUILD_MODNAME, without the quotes ?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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 ?
_______________________________________________
Kernelnewbies mailing list
Kernelnewbies@xxxxxxxxxxxxxxxxx
https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies

[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]

  Powered by Linux