OSDN Git Service

kbuild: create modules.builtin without Makefile.modbuiltin or tristate.conf
[tomoyo/tomoyo-test1.git] / include / linux / module.h
index bd165ba..6877b3b 100644 (file)
@@ -170,6 +170,16 @@ extern void cleanup_module(void);
 #define MODULE_SOFTDEP(_softdep) MODULE_INFO(softdep, _softdep)
 
 /*
+ * MODULE_FILE is used for generating modules.builtin
+ * So, make it no-op when this is being built as a module
+ */
+#ifdef MODULE
+#define MODULE_FILE
+#else
+#define MODULE_FILE    MODULE_INFO(file, KBUILD_MODFILE);
+#endif
+
+/*
  * The following license idents are currently accepted as indicating free
  * software modules
  *
@@ -213,7 +223,7 @@ extern void cleanup_module(void);
  * 2.  So the community can ignore bug reports including proprietary modules
  * 3.  So vendors can do likewise based on their own policies
  */
-#define MODULE_LICENSE(_license) MODULE_INFO(license, _license)
+#define MODULE_LICENSE(_license) MODULE_FILE MODULE_INFO(license, _license)
 
 /*
  * Author(s), use "Name <email>" or just "Name", for multiple