All of lore.kernel.org
 help / color / mirror / Atom feed
From: Christopher McCrory <chrismcc@gmail.com>
To: buildroot@busybox.net
Subject: [Buildroot] [PATCH 15/18] pkg-utils.mk: patch_sub_makefile
Date: Mon, 20 Aug 2018 04:55:16 -0700	[thread overview]
Message-ID: <20180820115519.24046-16-chrismcc@gmail.com> (raw)
In-Reply-To: <20180820115519.24046-1-chrismcc@gmail.com>

suggested and written by Fran?ois
Fix incorrectly generated Makefiles in subdirectories, usually perl
packages.

Signed-off-by: Christopher McCrory <chrismcc@gmail.com>
---
 package/pkg-utils.mk | 16 ++++++++++++++++
 1 file changed, 16 insertions(+)

diff --git a/package/pkg-utils.mk b/package/pkg-utils.mk
index c3acc22b17..7dbdb427a6 100644
--- a/package/pkg-utils.mk
+++ b/package/pkg-utils.mk
@@ -95,3 +95,19 @@ define legal-license-file # pkgname, pkgname-pkgver, pkgdir, filename, file-full
 	} && \
 	cp $(5) $(LICENSE_FILES_DIR_$(6))/$(2)/$(4)
 endef
+
+# Used to fix makefiles in subdirectories, usually perl packages see 
+# perl-template-toolkit and perl-xml-parser
+# use: $(call patch_sub_makefile,$(@D)/xs/Makefile)
+
+define patch_sub_makefile
+	$(SED) "s:^AR = .*:AR = $(TARGET_AR):g" $(1)
+	$(SED) "s:^FULL_AR = .*:FULL_AR = $(TARGET_AR):g" $(1)
+	$(SED) "s:^CC = .*:CC = $(TARGET_CC):g" $(1)
+	$(SED) "s:^CCFLAGS = .*:CCFLAGS = $(TARGET_CFLAGS):g" $(1)
+	$(SED) "s:^LD = .*:LD = $(TARGET_CC):g" $(1)
+	$(SED) "s:^LDDLFLAGS = .*:LDDLFLAGS = -shared $(TARGET_LDFLAGS):g" $(1)
+	$(SED) "s:^LDLFLAGS = .*:LDLFLAGS = $(TARGET_LDFLAGS):g" $(1)
+	$(SED) "s:^DESTDIR = .*:DESTDIR = $(TARGET_DIR):g" $(1)
+endef
+
-- 
2.14.4

  parent reply	other threads:[~2018-08-20 11:55 UTC|newest]

Thread overview: 50+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-08-20 11:55 [Buildroot] [PATCH 00/13] perl modules again Christopher McCrory
2018-08-20 11:55 ` [Buildroot] [PATCH 01/18] perl-dbi: add host package Christopher McCrory
2018-08-21 13:16   ` François Perrad
2018-09-11 13:40   ` Thomas Petazzoni
2018-08-20 11:55 ` [Buildroot] [PATCH 02/18] perl-dbd-mysql: new package Christopher McCrory
2018-08-21 13:16   ` François Perrad
2018-09-11 13:42   ` Thomas Petazzoni
2018-08-20 11:55 ` [Buildroot] [PATCH 03/18] perl-data-dump: " Christopher McCrory
2018-08-21  6:19   ` François Perrad
2018-09-12 19:43   ` Thomas Petazzoni
2018-08-20 11:55 ` [Buildroot] [PATCH 04/18] perl-time-parsedate: " Christopher McCrory
2018-08-20 11:59   ` Thomas Petazzoni
2018-08-20 12:12     ` Christopher McCrory
2018-08-20 12:27       ` Thomas Petazzoni
2018-08-20 12:41         ` Christopher McCrory
2018-09-12 20:26   ` Thomas Petazzoni
2018-08-20 11:55 ` [Buildroot] [PATCH 05/18] perl-x10: " Christopher McCrory
2018-08-21  6:23   ` François Perrad
2018-09-12 20:44   ` Thomas Petazzoni
2018-08-20 11:55 ` [Buildroot] [PATCH 06/18] perl-sys-cpu: " Christopher McCrory
2018-08-21  6:35   ` François Perrad
2018-09-12 20:53   ` Thomas Petazzoni
2018-08-20 11:55 ` [Buildroot] [PATCH 07/18] perl-dist-checkconflicts: " Christopher McCrory
2018-08-21  6:40   ` François Perrad
2018-09-12 20:55   ` Thomas Petazzoni
2018-08-20 11:55 ` [Buildroot] [PATCH 08/18] perl-package-stash: " Christopher McCrory
2018-08-21  6:42   ` François Perrad
2018-09-12 21:02   ` Thomas Petazzoni
2018-08-20 11:55 ` [Buildroot] [PATCH 09/18] perl-class-load: " Christopher McCrory
2018-08-21  6:43   ` François Perrad
2018-09-12 21:06   ` Thomas Petazzoni
2018-08-20 11:55 ` [Buildroot] [PATCH 10/18] perl-template-toolkit: " Christopher McCrory
2018-08-20 11:55 ` [Buildroot] [PATCH 11/18] perl-xml-parser: " Christopher McCrory
2018-08-20 11:55 ` [Buildroot] [PATCH 12/18] perl-soap-wsdl: " Christopher McCrory
2018-09-12 21:35   ` Thomas Petazzoni
2018-08-20 11:55 ` [Buildroot] [PATCH 13/18] perl-time-parsedate: add license Christopher McCrory
2018-08-20 11:55 ` [Buildroot] [PATCH 14/18] perl-termreadkey: new package Christopher McCrory
2018-08-22 17:00   ` Christopher McCrory
2018-08-20 11:55 ` Christopher McCrory [this message]
2018-09-12 21:15   ` [Buildroot] [PATCH 15/18] pkg-utils.mk: patch_sub_makefile Thomas Petazzoni
2018-09-12 21:33     ` Thomas Petazzoni
2018-08-20 11:55 ` [Buildroot] [PATCH 16/18] perl-template-toolkit: use new patch_sub_makefile Christopher McCrory
2018-08-20 11:55 ` [Buildroot] [PATCH 17/18] perl-xml-parser: " Christopher McCrory
2018-08-20 11:55 ` [Buildroot] [PATCH 18/18] perl-soap-wsdl: add dependancy on perl-termreadkey Christopher McCrory
2018-08-22 17:01   ` Christopher McCrory
2018-08-20 12:10 ` [Buildroot] [PATCH 00/13] perl modules again Thomas Petazzoni
2018-08-20 12:15   ` Christopher McCrory
2018-08-20 12:28     ` Thomas Petazzoni
2018-08-20 12:47       ` Christopher McCrory
2018-09-12 21:42 ` Thomas Petazzoni

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=20180820115519.24046-16-chrismcc@gmail.com \
    --to=chrismcc@gmail.com \
    --cc=buildroot@busybox.net \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.