mailarchive of the ptxdist mailing list
 help / color / mirror / Atom feed
* [ptxdist] [PATCH v4 3/3] Allow local rules/*.in to source $(PTXDIST_TOPDIR)/rules/*.in
@ 2018-08-03 18:44 jon
  2018-08-27 16:10 ` Michael Olbrich
  0 siblings, 1 reply; 2+ messages in thread
From: jon @ 2018-08-03 18:44 UTC (permalink / raw)
  To: ptxdist; +Cc: Jon Ringle

From: Jon Ringle <jringle@gridpoint.com>

In scripts/kconfig/zconf.l the function zconf_fopen() is used to open files
being opened via the `source` kconfig keyword. If it fails to open the
given file, it will try to open the file under $(PTXDIST_TOPDIR)

This allows a local rules/*.in to extend options to a that are project
specific without having to maintain the entire rules/*.in file locally

For example:
~/git/rootfs$ cat rules/socat.in
## SECTION=networking

source "rules/socat.in"

if SOCAT

config SOCAT_SYSTEMD_SOCKET
        bool
        prompt "systemd socket activation"
        select SYSTEMD
        help
          Include systemd socket activation support.

endif

Signed-off-by: Jon Ringle <jringle@gridpoint.com>
---
 scripts/kconfig/lkc.h   | 2 +-
 scripts/kconfig/zconf.l | 4 +---
 2 files changed, 2 insertions(+), 4 deletions(-)

diff --git a/scripts/kconfig/lkc.h b/scripts/kconfig/lkc.h
index 91ca126..f370af1 100644
--- a/scripts/kconfig/lkc.h
+++ b/scripts/kconfig/lkc.h
@@ -23,7 +23,7 @@ extern "C" {
 
 #include "lkc_proto.h"
 
-#define SRCTREE "srctree"
+#define SRCTREE "PTXDIST_TOPDIR"
 
 #ifndef PACKAGE
 #define PACKAGE "linux"
diff --git a/scripts/kconfig/zconf.l b/scripts/kconfig/zconf.l
index c410d25..959c86c 100644
--- a/scripts/kconfig/zconf.l
+++ b/scripts/kconfig/zconf.l
@@ -269,9 +269,7 @@ static void zconf_endhelp(void)
 /*
  * Try to open specified file with following names:
  * ./name
- * $(srctree)/name
- * The latter is used when srctree is separate from objtree
- * when compiling the kernel.
+ * $(PTXDIST_TOPDIR)/name
  * Return NULL if file is not found.
  */
 FILE *zconf_fopen(const char *name)
-- 
1.9.1


_______________________________________________
ptxdist mailing list
ptxdist@pengutronix.de

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

end of thread, other threads:[~2018-08-27 16:10 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-08-03 18:44 [ptxdist] [PATCH v4 3/3] Allow local rules/*.in to source $(PTXDIST_TOPDIR)/rules/*.in jon
2018-08-27 16:10 ` Michael Olbrich

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox