perf tools: Makefile: Clean up `python/perf.so' rule
authorMichael Witten <mfwitten@gmail.com>
Sat, 9 Apr 2011 01:12:56 +0000 (01:12 +0000)
committerArnaldo Carvalho de Melo <acme@redhat.com>
Tue, 19 Apr 2011 11:18:36 +0000 (08:18 -0300)
There is no need for a subshell or an explicit `export';
as per the POSIX Shell Command Language specification:

  http://pubs.opengroup.org/onlinepubs/009695399/utilities/xcu_chap02.html#tag_02_09_01
  http://pubs.opengroup.org/onlinepubs/009695399/utilities/xcu_chap02.html#tag_02_10_02

It is only necessary to include the environment variable
assignment just before the command to be run.

Also, it is better to use single-quotes, because GNU make
might expand `$(BASIC_CFLAGS)' into something that the shell
could interpret within double-quotes.

Acked-by: Raghavendra D Prabhu <rprabhu@wnohang.net>
Link: http://lkml.kernel.org/n/tip-58n38o02ocuzrm9qh096hsf5@git.kernel.org
Signed-off-by: Michael Witten <mfwitten@gmail.com>
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
tools/perf/Makefile

index 207dee5c5b163fd51ceafbb6b171df9c0708893f..aaf4dd3fd80330e780c4896c3cf6e08ba7a2c04d 100644 (file)
@@ -165,12 +165,10 @@ grep-libs = $(filter -l%,$(1))
 strip-libs = $(filter-out -l%,$(1))
 
 $(OUTPUT)python/perf.so: $(PYRF_OBJS)
-       $(QUIET_GEN)( \
-               export CFLAGS="$(BASIC_CFLAGS)"; \
-               python util/setup.py --quiet  build_ext --build-lib='$(OUTPUT)python' \
-                       --build-temp='$(OUTPUT)python/temp' \
-       )
-
+       $(QUIET_GEN)CFLAGS='$(BASIC_CFLAGS)' python util/setup.py \
+         --quiet build_ext \
+         --build-lib='$(OUTPUT)python' \
+         --build-temp='$(OUTPUT)python/temp'
 #
 # No Perl scripts right now:
 #