Skip to content

Commit

Permalink
perf tools: Makefile: Clean up `python/perf.so' rule
Browse files Browse the repository at this point in the history
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 <[email protected]>
Link: http://lkml.kernel.org/n/[email protected]
Signed-off-by: Michael Witten <[email protected]>
Signed-off-by: Arnaldo Carvalho de Melo <[email protected]>
  • Loading branch information
mfwitten authored and acmel committed Apr 19, 2011
1 parent aeafcba commit 3643b13
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions tools/perf/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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:
#
Expand Down

0 comments on commit 3643b13

Please sign in to comment.