kbuild: create modules.builtin without Makefile.modbuiltin or tristate.conf
[sfrench/cifs-2.6.git] / include / linux / module.h
index bd165ba68617572d7496537ed7c04c94d3ad952e..6877b3b191d0f8038cdb4819ae811c95e069d91e 100644 (file)
@@ -169,6 +169,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