perf evlist: Add toggle_enable() method
[deliverable/linux.git] / tools / Makefile
index 9a617adc6675dc06552de428c93b3c611599900b..b35102721cbbc82d1560ae657d41cebebe2fa723 100644 (file)
@@ -1,3 +1,8 @@
+# Some of the tools (perf) use same make variables
+# as in kernel build.
+export srctree=
+export objtree=
+
 include scripts/Makefile.include
 
 help:
@@ -47,11 +52,16 @@ cgroup firewire hv guest usb virtio vm net: FORCE
 liblockdep: FORCE
        $(call descend,lib/lockdep)
 
-libapikfs: FORCE
+libapi: FORCE
        $(call descend,lib/api)
 
-perf: libapikfs FORCE
-       $(call descend,$@)
+# The perf build does not follow the descend function setup,
+# invoking it via it's own make rule.
+PERF_O   = $(if $(O),$(O)/tools/perf,)
+
+perf: FORCE
+       $(Q)mkdir -p $(PERF_O) .
+       $(Q)$(MAKE) --no-print-directory -C perf O=$(PERF_O) subdir=
 
 selftests: FORCE
        $(call descend,testing/$@)
@@ -97,10 +107,10 @@ cgroup_clean hv_clean firewire_clean lguest_clean usb_clean virtio_clean vm_clea
 liblockdep_clean:
        $(call descend,lib/lockdep,clean)
 
-libapikfs_clean:
+libapi_clean:
        $(call descend,lib/api,clean)
 
-perf_clean: libapikfs_clean
+perf_clean:
        $(call descend,$(@:_clean=),clean)
 
 selftests_clean:
This page took 0.028107 seconds and 5 git commands to generate.