Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH] Makefile: remove cpe-updates on clean
@ 2021-05-16 12:42 Yann E. MORIN
  2021-05-17 15:43 ` Weber, Matthew L Collins
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Yann E. MORIN @ 2021-05-16 12:42 UTC (permalink / raw)
  To: buildroot

Commit fd7312940aef (Makefile: add new missing-cpe target) added the
rule to generate a set of files to update the NVD.

For an in-tree build, 'make clean' remove the output directory, so
those files are removed. But for an out-of-tree build, the output
directory is not removed, so those files still linger around after a
clean.

Explicitly remove them on clean, to cater for both cases.

Signed-off-by: Yann E. MORIN <yann.morin.1998@free.fr>
Cc: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
Cc: Matthew Weber <matthew.weber@rockwellcollins.com>
---
 Makefile | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/Makefile b/Makefile
index 75ef7f5eb5..c3305f46e9 100644
--- a/Makefile
+++ b/Makefile
@@ -229,6 +229,8 @@ LEGAL_MANIFEST_CSV_HOST = $(LEGAL_INFO_DIR)/host-manifest.csv
 LEGAL_WARNINGS = $(LEGAL_INFO_DIR)/.warnings
 LEGAL_REPORT = $(LEGAL_INFO_DIR)/README
 
+CPE_UPDATES_DIR = $(BASE_DIR)/cpe-updates
+
 BR2_CONFIG = $(CONFIG_DIR)/.config
 
 # Pull in the user's configuration file
@@ -947,11 +949,11 @@ pkg-stats:
 
 .PHONY: missing-cpe
 missing-cpe:
-	$(Q)mkdir -p $(O)/cpe-updates
+	$(Q)mkdir -p $(CPE_UPDATES_DIR)
 	$(Q)cd "$(CONFIG_DIR)" ; \
 	$(TOPDIR)/support/scripts/gen-missing-cpe \
 		--nvd-path $(DL_DIR)/buildroot-nvd \
-		--output $(O)/cpe-updates
+		--output $(CPE_UPDATES_DIR)
 
 else # ifeq ($(BR2_HAVE_DOT_CONFIG),y)
 
@@ -1087,7 +1089,7 @@ printvars:
 clean:
 	rm -rf $(BASE_TARGET_DIR) $(BINARIES_DIR) $(HOST_DIR) $(HOST_DIR_SYMLINK) \
 		$(BUILD_DIR) $(BASE_DIR)/staging \
-		$(LEGAL_INFO_DIR) $(GRAPHS_DIR) $(PER_PACKAGE_DIR)
+		$(LEGAL_INFO_DIR) $(GRAPHS_DIR) $(PER_PACKAGE_DIR) $(CPE_UPDATES_DIR)
 
 .PHONY: distclean
 distclean: clean
-- 
2.25.1

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

* [Buildroot] [PATCH] Makefile: remove cpe-updates on clean
  2021-05-16 12:42 [Buildroot] [PATCH] Makefile: remove cpe-updates on clean Yann E. MORIN
@ 2021-05-17 15:43 ` Weber, Matthew L Collins
  2021-05-17 20:43 ` Thomas Petazzoni
  2021-05-17 20:45 ` Yann E. MORIN
  2 siblings, 0 replies; 4+ messages in thread
From: Weber, Matthew L Collins @ 2021-05-17 15:43 UTC (permalink / raw)
  To: buildroot

Yann,

> -----Original Message-----
> From: Yann E. MORIN <yann.morin.1998@gmail.com> On Behalf Of Yann E.
> MORIN
> Sent: Sunday, May 16, 2021 7:43 AM
> To: buildroot at buildroot.org
> Cc: Yann E. MORIN <yann.morin.1998@free.fr>; Thomas Petazzoni
> <thomas.petazzoni@bootlin.com>; Weber, Matthew L Collins
> <Matthew.Weber@collins.com>
> Subject: [PATCH] Makefile: remove cpe-updates on clean
> 
> Commit fd7312940aef (Makefile: add new missing-cpe target) added the rule
> to generate a set of files to update the NVD.
> 
> For an in-tree build, 'make clean' remove the output directory, so those files
> are removed. But for an out-of-tree build, the output directory is not
> removed, so those files still linger around after a clean.
> 
> Explicitly remove them on clean, to cater for both cases.
> 
> Signed-off-by: Yann E. MORIN <yann.morin.1998@free.fr>
> Cc: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
> Cc: Matthew Weber <matthew.weber@rockwellcollins.com>

Reviewed-by: Matthew Weber <matthew.weber@collins.com>

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

* [Buildroot] [PATCH] Makefile: remove cpe-updates on clean
  2021-05-16 12:42 [Buildroot] [PATCH] Makefile: remove cpe-updates on clean Yann E. MORIN
  2021-05-17 15:43 ` Weber, Matthew L Collins
@ 2021-05-17 20:43 ` Thomas Petazzoni
  2021-05-17 20:45 ` Yann E. MORIN
  2 siblings, 0 replies; 4+ messages in thread
From: Thomas Petazzoni @ 2021-05-17 20:43 UTC (permalink / raw)
  To: buildroot

On Sun, 16 May 2021 14:42:37 +0200
"Yann E. MORIN" <yann.morin.1998@free.fr> wrote:

> Commit fd7312940aef (Makefile: add new missing-cpe target) added the
> rule to generate a set of files to update the NVD.
> 
> For an in-tree build, 'make clean' remove the output directory, so
> those files are removed. But for an out-of-tree build, the output
> directory is not removed, so those files still linger around after a
> clean.
> 
> Explicitly remove them on clean, to cater for both cases.
> 
> Signed-off-by: Yann E. MORIN <yann.morin.1998@free.fr>
> Cc: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
> Cc: Matthew Weber <matthew.weber@rockwellcollins.com>

Yes, indeed:

Reviewed-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>

Thanks!

Thomas
-- 
Thomas Petazzoni, co-owner and CEO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com

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

* [Buildroot] [PATCH] Makefile: remove cpe-updates on clean
  2021-05-16 12:42 [Buildroot] [PATCH] Makefile: remove cpe-updates on clean Yann E. MORIN
  2021-05-17 15:43 ` Weber, Matthew L Collins
  2021-05-17 20:43 ` Thomas Petazzoni
@ 2021-05-17 20:45 ` Yann E. MORIN
  2 siblings, 0 replies; 4+ messages in thread
From: Yann E. MORIN @ 2021-05-17 20:45 UTC (permalink / raw)
  To: buildroot

All,

On 2021-05-16 14:42 +0200, Yann E. MORIN spake thusly:
> Commit fd7312940aef (Makefile: add new missing-cpe target) added the
> rule to generate a set of files to update the NVD.
> 
> For an in-tree build, 'make clean' remove the output directory, so
> those files are removed. But for an out-of-tree build, the output
> directory is not removed, so those files still linger around after a
> clean.
> 
> Explicitly remove them on clean, to cater for both cases.
> 
> Signed-off-by: Yann E. MORIN <yann.morin.1998@free.fr>
> Cc: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
> Cc: Matthew Weber <matthew.weber@rockwellcollins.com>

Applied to master, thanks.

Regards,
Yann E. MORIN.

> ---
>  Makefile | 8 +++++---
>  1 file changed, 5 insertions(+), 3 deletions(-)
> 
> diff --git a/Makefile b/Makefile
> index 75ef7f5eb5..c3305f46e9 100644
> --- a/Makefile
> +++ b/Makefile
> @@ -229,6 +229,8 @@ LEGAL_MANIFEST_CSV_HOST = $(LEGAL_INFO_DIR)/host-manifest.csv
>  LEGAL_WARNINGS = $(LEGAL_INFO_DIR)/.warnings
>  LEGAL_REPORT = $(LEGAL_INFO_DIR)/README
>  
> +CPE_UPDATES_DIR = $(BASE_DIR)/cpe-updates
> +
>  BR2_CONFIG = $(CONFIG_DIR)/.config
>  
>  # Pull in the user's configuration file
> @@ -947,11 +949,11 @@ pkg-stats:
>  
>  .PHONY: missing-cpe
>  missing-cpe:
> -	$(Q)mkdir -p $(O)/cpe-updates
> +	$(Q)mkdir -p $(CPE_UPDATES_DIR)
>  	$(Q)cd "$(CONFIG_DIR)" ; \
>  	$(TOPDIR)/support/scripts/gen-missing-cpe \
>  		--nvd-path $(DL_DIR)/buildroot-nvd \
> -		--output $(O)/cpe-updates
> +		--output $(CPE_UPDATES_DIR)
>  
>  else # ifeq ($(BR2_HAVE_DOT_CONFIG),y)
>  
> @@ -1087,7 +1089,7 @@ printvars:
>  clean:
>  	rm -rf $(BASE_TARGET_DIR) $(BINARIES_DIR) $(HOST_DIR) $(HOST_DIR_SYMLINK) \
>  		$(BUILD_DIR) $(BASE_DIR)/staging \
> -		$(LEGAL_INFO_DIR) $(GRAPHS_DIR) $(PER_PACKAGE_DIR)
> +		$(LEGAL_INFO_DIR) $(GRAPHS_DIR) $(PER_PACKAGE_DIR) $(CPE_UPDATES_DIR)
>  
>  .PHONY: distclean
>  distclean: clean
> -- 
> 2.25.1
> 
> _______________________________________________
> buildroot mailing list
> buildroot at busybox.net
> http://lists.busybox.net/mailman/listinfo/buildroot

-- 
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 561 099 427 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'

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

end of thread, other threads:[~2021-05-17 20:45 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-05-16 12:42 [Buildroot] [PATCH] Makefile: remove cpe-updates on clean Yann E. MORIN
2021-05-17 15:43 ` Weber, Matthew L Collins
2021-05-17 20:43 ` Thomas Petazzoni
2021-05-17 20:45 ` Yann E. MORIN

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