* [dpdk-dev] [PATCH] mk: allow renaming of build directories
@ 2018-02-28 17:11 Bruce Richardson
2018-04-22 23:16 ` Thomas Monjalon
2018-11-12 12:26 ` [dpdk-dev] [PATCH v2] " Bruce Richardson
0 siblings, 2 replies; 4+ messages in thread
From: Bruce Richardson @ 2018-02-28 17:11 UTC (permalink / raw)
To: dev; +Cc: Bruce Richardson
When building using make, the Makefile in the build directory contained
the name of the build directory to be passed as an "O=" parameter to
the DPDK SDK makefiles. Unfortunately, this meant that the compilation
would always fail if the build directory was renamed. To remove this
limitation, we can use $(CURDIR) instead of the directory name.
Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
---
buildtools/gen-build-mk.sh | 4 ++--
mk/rte.sdkconfig.mk | 3 +--
2 files changed, 3 insertions(+), 4 deletions(-)
diff --git a/buildtools/gen-build-mk.sh b/buildtools/gen-build-mk.sh
index c18b205e3..a61c4d6cf 100755
--- a/buildtools/gen-build-mk.sh
+++ b/buildtools/gen-build-mk.sh
@@ -18,7 +18,7 @@ echo
echo "MAKEFLAGS += --no-print-directory"
echo
echo "all:"
-echo " @\$(MAKE) -C $1 O=$2"
+echo " @\$(MAKE) -C $1 O=\$(CURDIR)"
echo
echo "%::"
-echo " @\$(MAKE) -C $1 O=$2 \$@"
+echo " @\$(MAKE) -C $1 O=\$(CURDIR) \$@"
diff --git a/mk/rte.sdkconfig.mk b/mk/rte.sdkconfig.mk
index 0664725ee..ade681ffd 100644
--- a/mk/rte.sdkconfig.mk
+++ b/mk/rte.sdkconfig.mk
@@ -105,8 +105,7 @@ SDK_RELPATH=$(shell $(RTE_SDK)/buildtools/relpath.sh $(abspath $(RTE_SRCDIR)) \
OUTPUT_RELPATH=$(shell $(RTE_SDK)/buildtools/relpath.sh $(abspath $(RTE_OUTPUT)) \
$(abspath $(RTE_SRCDIR)))
$(RTE_OUTPUT)/Makefile: | $(RTE_OUTPUT)
- $(Q)$(RTE_SDK)/buildtools/gen-build-mk.sh $(SDK_RELPATH) $(OUTPUT_RELPATH) \
- > $(RTE_OUTPUT)/Makefile
+ $(Q)$(RTE_SDK)/buildtools/gen-build-mk.sh $(SDK_RELPATH) > $@
# clean installed files, and generate a new config header file
# if NODOTCONF variable is defined, don't try to rebuild .config
--
2.14.3
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [dpdk-dev] [PATCH] mk: allow renaming of build directories
2018-02-28 17:11 [dpdk-dev] [PATCH] mk: allow renaming of build directories Bruce Richardson
@ 2018-04-22 23:16 ` Thomas Monjalon
2018-11-12 12:26 ` [dpdk-dev] [PATCH v2] " Bruce Richardson
1 sibling, 0 replies; 4+ messages in thread
From: Thomas Monjalon @ 2018-04-22 23:16 UTC (permalink / raw)
To: Bruce Richardson; +Cc: dev
28/02/2018 18:11, Bruce Richardson:
> When building using make, the Makefile in the build directory contained
> the name of the build directory to be passed as an "O=" parameter to
> the DPDK SDK makefiles. Unfortunately, this meant that the compilation
> would always fail if the build directory was renamed. To remove this
> limitation, we can use $(CURDIR) instead of the directory name.
>
> Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
> ---
> --- a/buildtools/gen-build-mk.sh
> +++ b/buildtools/gen-build-mk.sh
> -echo " @\$(MAKE) -C $1 O=$2"
> +echo " @\$(MAKE) -C $1 O=\$(CURDIR)"
> echo
> echo "%::"
> -echo " @\$(MAKE) -C $1 O=$2 \$@"
> +echo " @\$(MAKE) -C $1 O=\$(CURDIR) \$@"
> --- a/mk/rte.sdkconfig.mk
> +++ b/mk/rte.sdkconfig.mk
> - $(Q)$(RTE_SDK)/buildtools/gen-build-mk.sh $(SDK_RELPATH) $(OUTPUT_RELPATH) \
> - > $(RTE_OUTPUT)/Makefile
> + $(Q)$(RTE_SDK)/buildtools/gen-build-mk.sh $(SDK_RELPATH) > $@
You need to remove the comment about the 2nd argument of the script:
# $2: path of build dir (can be relative to $1)
^ permalink raw reply [flat|nested] 4+ messages in thread
* [dpdk-dev] [PATCH v2] mk: allow renaming of build directories
2018-02-28 17:11 [dpdk-dev] [PATCH] mk: allow renaming of build directories Bruce Richardson
2018-04-22 23:16 ` Thomas Monjalon
@ 2018-11-12 12:26 ` Bruce Richardson
2018-11-14 0:46 ` Thomas Monjalon
1 sibling, 1 reply; 4+ messages in thread
From: Bruce Richardson @ 2018-11-12 12:26 UTC (permalink / raw)
To: dev, thomas; +Cc: Bruce Richardson
When building using make, the Makefile in the build directory contained
the name of the build directory to be passed as an "O=" parameter to
the DPDK SDK makefiles. Unfortunately, this meant that the compilation
would always fail if the build directory was renamed. To remove this
limitation, we can use $(CURDIR) instead of the directory name.
Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
---
v2: remove comment at the top of the script about the now-deleted
second parameter.
---
buildtools/gen-build-mk.sh | 5 ++---
mk/rte.sdkconfig.mk | 3 +--
2 files changed, 3 insertions(+), 5 deletions(-)
diff --git a/buildtools/gen-build-mk.sh b/buildtools/gen-build-mk.sh
index c18b205e3..636920b63 100755
--- a/buildtools/gen-build-mk.sh
+++ b/buildtools/gen-build-mk.sh
@@ -5,7 +5,6 @@
# Auto-generate a Makefile in build directory
# Args:
# $1: path of project src root
-# $2: path of build dir (can be relative to $1)
echo "# Automatically generated by gen-build-mk.sh"
echo
@@ -18,7 +17,7 @@ echo
echo "MAKEFLAGS += --no-print-directory"
echo
echo "all:"
-echo " @\$(MAKE) -C $1 O=$2"
+echo " @\$(MAKE) -C $1 O=\$(CURDIR)"
echo
echo "%::"
-echo " @\$(MAKE) -C $1 O=$2 \$@"
+echo " @\$(MAKE) -C $1 O=\$(CURDIR) \$@"
diff --git a/mk/rte.sdkconfig.mk b/mk/rte.sdkconfig.mk
index d90d62cc6..fa77331cb 100644
--- a/mk/rte.sdkconfig.mk
+++ b/mk/rte.sdkconfig.mk
@@ -114,8 +114,7 @@ SDK_RELPATH=$(shell $(RTE_SDK)/buildtools/relpath.sh $(abspath $(RTE_SRCDIR)) \
OUTPUT_RELPATH=$(shell $(RTE_SDK)/buildtools/relpath.sh $(abspath $(RTE_OUTPUT)) \
$(abspath $(RTE_SRCDIR)))
$(RTE_OUTPUT)/Makefile: | $(RTE_OUTPUT)
- $(Q)$(RTE_SDK)/buildtools/gen-build-mk.sh $(SDK_RELPATH) $(OUTPUT_RELPATH) \
- > $(RTE_OUTPUT)/Makefile
+ $(Q)$(RTE_SDK)/buildtools/gen-build-mk.sh $(SDK_RELPATH) > $@
# clean installed files, and generate a new config header file
# if NODOTCONF variable is defined, don't try to rebuild .config
--
2.19.1
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [dpdk-dev] [PATCH v2] mk: allow renaming of build directories
2018-11-12 12:26 ` [dpdk-dev] [PATCH v2] " Bruce Richardson
@ 2018-11-14 0:46 ` Thomas Monjalon
0 siblings, 0 replies; 4+ messages in thread
From: Thomas Monjalon @ 2018-11-14 0:46 UTC (permalink / raw)
To: Bruce Richardson; +Cc: dev
12/11/2018 13:26, Bruce Richardson:
> When building using make, the Makefile in the build directory contained
> the name of the build directory to be passed as an "O=" parameter to
> the DPDK SDK makefiles. Unfortunately, this meant that the compilation
> would always fail if the build directory was renamed. To remove this
> limitation, we can use $(CURDIR) instead of the directory name.
>
> Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Applied, thanks
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2018-11-14 0:46 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-02-28 17:11 [dpdk-dev] [PATCH] mk: allow renaming of build directories Bruce Richardson
2018-04-22 23:16 ` Thomas Monjalon
2018-11-12 12:26 ` [dpdk-dev] [PATCH v2] " Bruce Richardson
2018-11-14 0:46 ` Thomas Monjalon
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).