Re: [PATCH] perf tools: Fix Makefile to clean auto-generatedbison/flex files properly

From: Arnaldo Carvalho de Melo
Date: Thu May 03 2012 - 10:26:47 EST


Em Thu, May 03, 2012 at 02:08:27AM -0700, Joonsoo Kim escreveu:
> The commit 65f3e56e0c81 ("perf tools: Remove auto-generated bison/flex
> files") removed those files from git and modified Makefile to clean
> auto-generated bison/flex files. But, in Makefile, regular expression
> "*-{bison,flex}*" doesn't work. Fix it.
>
> Signed-off-by: Joonsoo Kim <js1304@xxxxxxxxx>
>
> diff --git a/tools/perf/Makefile b/tools/perf/Makefile
> index 9bf3fc7..295c477 100644
> --- a/tools/perf/Makefile
> +++ b/tools/perf/Makefile
> @@ -987,7 +987,7 @@ clean:
> $(RM) *.spec *.pyc *.pyo */*.pyc */*.pyo $(OUTPUT)common-cmds.h TAGS tags cscope*
> $(MAKE) -C Documentation/ clean
> $(RM) $(OUTPUT)PERF-VERSION-FILE $(OUTPUT)PERF-CFLAGS
> - $(RM) $(OUTPUT)util/*-{bison,flex}*
> + $(RM) $(OUTPUT)util/*-bison* $(OUTPUT)util/*-flex*
> $(python-clean)

Are you sure?

[acme@sandy perf]$ make -j8 > /dev/null
PERF_VERSION = 3.4.rc2.45.g89290d
* new build flags or prefix
[acme@sandy perf]$ ls -la util/*bison*
-rw-rw-r--. 1 acme acme 51448 May 2 16:10 util/parse-events-bison.c
-rw-rw-r--. 1 acme acme 2553 May 2 16:10 util/parse-events-bison.h
-rw-rw-r--. 1 acme acme 179488 May 2 16:10 util/parse-events-bison.o
-rw-rw-r--. 1 acme acme 12484 May 2 16:10 util/parse-events-bison.output
-rw-rw-r--. 1 acme acme 43849 May 2 16:10 util/pmu-bison.c
-rw-rw-r--. 1 acme acme 2313 May 2 16:10 util/pmu-bison.h
-rw-rw-r--. 1 acme acme 66064 May 2 16:10 util/pmu-bison.o
-rw-rw-r--. 1 acme acme 3416 May 2 16:10 util/pmu-bison.output
[acme@sandy perf]$ make clean > /dev/null
[acme@sandy perf]$ ls -la util/*bison*
ls: cannot access util/*bison*: No such file or directory
[acme@sandy perf]$

[acme@sandy perf]$ grep RM.*bison Makefile
$(RM) $(OUTPUT)util/*-{bison,flex}*
[acme@sandy perf]$

[acme@sandy perf]$ make --version
GNU Make 3.81
Copyright (C) 2006 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.
There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A
PARTICULAR PURPOSE.

This program built for x86_64-redhat-linux-gnu
[acme@sandy perf]$
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/