Re: [perf] make clean problematic bashism

2012-08-15 Thread Arnaldo Carvalho de Melo
Em Wed, Aug 15, 2012 at 12:26:48PM +0200, Peter Zijlstra escreveu:
> On Wed, 2012-08-15 at 11:52 +0200, Wouter M. Koolen wrote:
> > The reason for this was a bunch of generated empty flex files in util/ 
> > that were not removed by make clean. They are intended to be erased, 
> > since the Makefile executes

> > rm -f util/*-{bison,flex}*

> > however, this command does not remove the files. I guess because {,} 
> > alternatives are only special in bash but the makefile is run with some 
> > other shell?

> ISTR us getting a number of such patches, did we miss a site, acme?

[acme@sandy linux]$ git describe --match 'v[0-9].[0-9]*' 
7f309ed6453926a81e2a97d274f67f1e48f0d74c
v3.5-358-g7f309ed
[acme@sandy linux]$ git show --oneline  7f309ed6453926a81e2a97d274f67f1e48f0d74c
7f309ed perf tools: Remove brace expansion from clean target
diff --git a/tools/perf/Makefile b/tools/perf/Makefile
index 32912af..35655c3 100644
--- a/tools/perf/Makefile
+++ b/tools/perf/Makefile
@@ -987,7 +987,8 @@ 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*
+   $(RM) $(OUTPUT)util/*-flex*
$(python-clean)
 
 .PHONY: all install clean strip $(LIBTRACEEVENT)
[acme@sandy linux]$
 
> > I got perf to compile now, but thought you would be interested to know 
> > about this little problem.

> > PS: as a side note: GNU make has the .DELETE_ON_ERROR: special target, 
> > which removes the target file when its generating command fails. This 
> > would have prevented my problem and sounds like a good idea in general. 
> > Maybe perf could make use of this feature when on GNU make?
 
> I don't think we build with anything but gnu make, mind sending a patch
> implementing your suggestion?

Yeah, please submit a patch,

- Arnaldo
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [perf] make clean problematic bashism

2012-08-15 Thread Wouter M. Koolen

On 08/15/2012 12:26 PM, Peter Zijlstra wrote:

On Wed, 2012-08-15 at 11:52 +0200, Wouter M. Koolen wrote:

Dear perf maintainers,

I attempted to compile perf 3.5.1 without worrying about installing
dependencies first. The resulting error messages were quite helpful, and
led me to install a bunch of development libraries and flex.

Unfortunately, after installing flex the build still failed, even after
make clean.

The reason for this was a bunch of generated empty flex files in util/
that were not removed by make clean. They are intended to be erased,
since the Makefile executes

rm -f util/*-{bison,flex}*

however, this command does not remove the files. I guess because {,}
alternatives are only special in bash but the makefile is run with some
other shell?


ISTR us getting a number of such patches, did we miss a site, acme?


I got perf to compile now, but thought you would be interested to know
about this little problem.

With kind regards,

Wouter Koolen


PS: as a side note: GNU make has the .DELETE_ON_ERROR: special target,
which removes the target file when its generating command fails. This
would have prevented my problem and sounds like a good idea in general.
Maybe perf could make use of this feature when on GNU make?


I don't think we build with anything but gnu make, mind sending a patch
implementing your suggestion?




Hi Peter,

Some more information: my system has /bin/sh set to dash. I remember a 
question about this during Debian installation. I guess Ubuntu does 
something similar viz. https://lkml.org/lkml/2012/5/4/90


Patch attached :)

With kind regards,

Wouter
diff --git a/tools/perf/Makefile b/tools/perf/Makefile
index 0eee64c..29b2373 100644
--- a/tools/perf/Makefile
+++ b/tools/perf/Makefile
@@ -1,3 +1,5 @@
+.DELETE_ON_ERROR:
+
 include ../scripts/Makefile.include
 
 # The default target of this Makefile is...


Re: [perf] make clean problematic bashism

2012-08-15 Thread Peter Zijlstra
On Wed, 2012-08-15 at 11:52 +0200, Wouter M. Koolen wrote:
> Dear perf maintainers,
> 
> I attempted to compile perf 3.5.1 without worrying about installing 
> dependencies first. The resulting error messages were quite helpful, and 
> led me to install a bunch of development libraries and flex.
> 
> Unfortunately, after installing flex the build still failed, even after 
> make clean.
> 
> The reason for this was a bunch of generated empty flex files in util/ 
> that were not removed by make clean. They are intended to be erased, 
> since the Makefile executes
> 
> rm -f util/*-{bison,flex}*
> 
> however, this command does not remove the files. I guess because {,} 
> alternatives are only special in bash but the makefile is run with some 
> other shell?

ISTR us getting a number of such patches, did we miss a site, acme?

> I got perf to compile now, but thought you would be interested to know 
> about this little problem.
> 
> With kind regards,
> 
> Wouter Koolen
> 
> 
> PS: as a side note: GNU make has the .DELETE_ON_ERROR: special target, 
> which removes the target file when its generating command fails. This 
> would have prevented my problem and sounds like a good idea in general. 
> Maybe perf could make use of this feature when on GNU make?

I don't think we build with anything but gnu make, mind sending a patch
implementing your suggestion?
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[perf] make clean problematic bashism

2012-08-15 Thread Wouter M. Koolen

Dear perf maintainers,

I attempted to compile perf 3.5.1 without worrying about installing 
dependencies first. The resulting error messages were quite helpful, and 
led me to install a bunch of development libraries and flex.


Unfortunately, after installing flex the build still failed, even after 
make clean.


The reason for this was a bunch of generated empty flex files in util/ 
that were not removed by make clean. They are intended to be erased, 
since the Makefile executes


rm -f util/*-{bison,flex}*

however, this command does not remove the files. I guess because {,} 
alternatives are only special in bash but the makefile is run with some 
other shell?


I got perf to compile now, but thought you would be interested to know 
about this little problem.


With kind regards,

Wouter Koolen


PS: as a side note: GNU make has the .DELETE_ON_ERROR: special target, 
which removes the target file when its generating command fails. This 
would have prevented my problem and sounds like a good idea in general. 
Maybe perf could make use of this feature when on GNU make?


--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[perf] make clean problematic bashism

2012-08-15 Thread Wouter M. Koolen

Dear perf maintainers,

I attempted to compile perf 3.5.1 without worrying about installing 
dependencies first. The resulting error messages were quite helpful, and 
led me to install a bunch of development libraries and flex.


Unfortunately, after installing flex the build still failed, even after 
make clean.


The reason for this was a bunch of generated empty flex files in util/ 
that were not removed by make clean. They are intended to be erased, 
since the Makefile executes


rm -f util/*-{bison,flex}*

however, this command does not remove the files. I guess because {,} 
alternatives are only special in bash but the makefile is run with some 
other shell?


I got perf to compile now, but thought you would be interested to know 
about this little problem.


With kind regards,

Wouter Koolen


PS: as a side note: GNU make has the .DELETE_ON_ERROR: special target, 
which removes the target file when its generating command fails. This 
would have prevented my problem and sounds like a good idea in general. 
Maybe perf could make use of this feature when on GNU make?


--
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [perf] make clean problematic bashism

2012-08-15 Thread Peter Zijlstra
On Wed, 2012-08-15 at 11:52 +0200, Wouter M. Koolen wrote:
 Dear perf maintainers,
 
 I attempted to compile perf 3.5.1 without worrying about installing 
 dependencies first. The resulting error messages were quite helpful, and 
 led me to install a bunch of development libraries and flex.
 
 Unfortunately, after installing flex the build still failed, even after 
 make clean.
 
 The reason for this was a bunch of generated empty flex files in util/ 
 that were not removed by make clean. They are intended to be erased, 
 since the Makefile executes
 
 rm -f util/*-{bison,flex}*
 
 however, this command does not remove the files. I guess because {,} 
 alternatives are only special in bash but the makefile is run with some 
 other shell?

ISTR us getting a number of such patches, did we miss a site, acme?

 I got perf to compile now, but thought you would be interested to know 
 about this little problem.
 
 With kind regards,
 
 Wouter Koolen
 
 
 PS: as a side note: GNU make has the .DELETE_ON_ERROR: special target, 
 which removes the target file when its generating command fails. This 
 would have prevented my problem and sounds like a good idea in general. 
 Maybe perf could make use of this feature when on GNU make?

I don't think we build with anything but gnu make, mind sending a patch
implementing your suggestion?
--
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [perf] make clean problematic bashism

2012-08-15 Thread Wouter M. Koolen

On 08/15/2012 12:26 PM, Peter Zijlstra wrote:

On Wed, 2012-08-15 at 11:52 +0200, Wouter M. Koolen wrote:

Dear perf maintainers,

I attempted to compile perf 3.5.1 without worrying about installing
dependencies first. The resulting error messages were quite helpful, and
led me to install a bunch of development libraries and flex.

Unfortunately, after installing flex the build still failed, even after
make clean.

The reason for this was a bunch of generated empty flex files in util/
that were not removed by make clean. They are intended to be erased,
since the Makefile executes

rm -f util/*-{bison,flex}*

however, this command does not remove the files. I guess because {,}
alternatives are only special in bash but the makefile is run with some
other shell?


ISTR us getting a number of such patches, did we miss a site, acme?


I got perf to compile now, but thought you would be interested to know
about this little problem.

With kind regards,

Wouter Koolen


PS: as a side note: GNU make has the .DELETE_ON_ERROR: special target,
which removes the target file when its generating command fails. This
would have prevented my problem and sounds like a good idea in general.
Maybe perf could make use of this feature when on GNU make?


I don't think we build with anything but gnu make, mind sending a patch
implementing your suggestion?




Hi Peter,

Some more information: my system has /bin/sh set to dash. I remember a 
question about this during Debian installation. I guess Ubuntu does 
something similar viz. https://lkml.org/lkml/2012/5/4/90


Patch attached :)

With kind regards,

Wouter
diff --git a/tools/perf/Makefile b/tools/perf/Makefile
index 0eee64c..29b2373 100644
--- a/tools/perf/Makefile
+++ b/tools/perf/Makefile
@@ -1,3 +1,5 @@
+.DELETE_ON_ERROR:
+
 include ../scripts/Makefile.include
 
 # The default target of this Makefile is...


Re: [perf] make clean problematic bashism

2012-08-15 Thread Arnaldo Carvalho de Melo
Em Wed, Aug 15, 2012 at 12:26:48PM +0200, Peter Zijlstra escreveu:
 On Wed, 2012-08-15 at 11:52 +0200, Wouter M. Koolen wrote:
  The reason for this was a bunch of generated empty flex files in util/ 
  that were not removed by make clean. They are intended to be erased, 
  since the Makefile executes

  rm -f util/*-{bison,flex}*

  however, this command does not remove the files. I guess because {,} 
  alternatives are only special in bash but the makefile is run with some 
  other shell?

 ISTR us getting a number of such patches, did we miss a site, acme?

[acme@sandy linux]$ git describe --match 'v[0-9].[0-9]*' 
7f309ed6453926a81e2a97d274f67f1e48f0d74c
v3.5-358-g7f309ed
[acme@sandy linux]$ git show --oneline  7f309ed6453926a81e2a97d274f67f1e48f0d74c
7f309ed perf tools: Remove brace expansion from clean target
diff --git a/tools/perf/Makefile b/tools/perf/Makefile
index 32912af..35655c3 100644
--- a/tools/perf/Makefile
+++ b/tools/perf/Makefile
@@ -987,7 +987,8 @@ 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*
+   $(RM) $(OUTPUT)util/*-flex*
$(python-clean)
 
 .PHONY: all install clean strip $(LIBTRACEEVENT)
[acme@sandy linux]$
 
  I got perf to compile now, but thought you would be interested to know 
  about this little problem.

  PS: as a side note: GNU make has the .DELETE_ON_ERROR: special target, 
  which removes the target file when its generating command fails. This 
  would have prevented my problem and sounds like a good idea in general. 
  Maybe perf could make use of this feature when on GNU make?
 
 I don't think we build with anything but gnu make, mind sending a patch
 implementing your suggestion?

Yeah, please submit a patch,

- Arnaldo
--
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/