mailarchive of the ptxdist mailing list
 help / color / mirror / Atom feed
From: jon@ringle.org
To: ptxdist@pengutronix.com
Cc: Jon Ringle <jringle@gridpoint.com>
Subject: [ptxdist] [PATCH v4 3/3] Allow local rules/*.in to source $(PTXDIST_TOPDIR)/rules/*.in
Date: Fri,  3 Aug 2018 14:44:03 -0400	[thread overview]
Message-ID: <1533321843-645-1-git-send-email-jon@ringle.org> (raw)

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

             reply	other threads:[~2018-08-03 18:44 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-08-03 18:44 jon [this message]
2018-08-27 16:10 ` Michael Olbrich

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1533321843-645-1-git-send-email-jon@ringle.org \
    --to=jon@ringle.org \
    --cc=jringle@gridpoint.com \
    --cc=ptxdist@pengutronix.com \
    --cc=ptxdist@pengutronix.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox