Messages in this thread | | | From | Irina Tirdea <> | Date | Mon, 22 Oct 2012 10:38:52 +0300 | Subject | Re: [PATCH v4 1/6] perf tools: configure tmp path at build time |
| |
On Tue, Oct 16, 2012 at 6:18 PM, Arnaldo Carvalho de Melo <acme@ghostprotocols.net> wrote: > Em Tue, Oct 16, 2012 at 02:33:35AM +0300, Irina Tirdea escreveu: >> From: Irina Tirdea <irina.tirdea@intel.com> >> >> Temporary perf files are hardcoded to point to /tmp. Android does not have >> a /tmp directory so it needs to set this path at compile time. >> >> Add a compile-time definition (PERF_TMP_DIR) in the Makefile that sets the path >> to temp directory. By default it points to /tmp. >> >> $(OUTPUT)util/parse-events.o: $(OUTPUT)util/parse-events-flex.c $(OUTPUT)util/parse-events-bison.c >> -$(OUTPUT)util/pmu.o: $(OUTPUT)util/pmu-flex.c $(OUTPUT)util/pmu-bison.c >> +$(OUTPUT)util/pmu.o: util/pmu.c $(OUTPUT)util/pmu-flex.c $(OUTPUT)util/pmu-bison.c $(OUTPUT)PERF-CFLAGS >> + $(QUIET_CC)$(CC) -o $@ -c $(ALL_CFLAGS) -DPERF_TMP_DIR='"$(PERF_TMP_DIR)"' $< >> >> LIB_FILE=$(OUTPUT)libperf.a >> >> @@ -889,6 +892,21 @@ $(OUTPUT)util/exec_cmd.o: util/exec_cmd.c $(OUTPUT)PERF-CFLAGS >> $(OUTPUT)util/config.o: util/config.c $(OUTPUT)PERF-CFLAGS >> $(QUIET_CC)$(CC) -o $@ -c $(ALL_CFLAGS) -DETC_PERFCONFIG='"$(ETC_PERFCONFIG_SQ)"' $< > > Humm, so we need to add an specific rule for each source file that needs > PERF_TMP_DIR? Why not make it available to all source files? >
I've seen this is the way other defines are handled (PERF_HTML_PATH, PERF_INFO_PATH, etc). But PERF_TMP_DIR is used in more places so it makes sense to make it available to all source files. I'll make the changes (for both PERF_TMP_DIR and PERF_SHELL_PATH) and resubmit.
>> +$(OUTPUT)util/dso-test-data.o: util/dso-test-data.c $(OUTPUT)PERF-CFLAGS >> + $(QUIET_CC)$(CC) -o $@ -c $(ALL_CFLAGS) -DPERF_TMP_DIR='"$(PERF_TMP_DIR)"' $< >> + >> +$(OUTPUT)util/map.o: util/map.c $(OUTPUT)PERF-CFLAGS >> + $(QUIET_CC)$(CC) -o $@ -c $(ALL_CFLAGS) -DPERF_TMP_DIR='"$(PERF_TMP_DIR)"' $< >> + >> +$(OUTPUT)util/symbol.o: util/symbol.c $(OUTPUT)PERF-CFLAGS >> + $(QUIET_CC)$(CC) -o $@ -c $(ALL_CFLAGS) -DPERF_TMP_DIR='"$(PERF_TMP_DIR)"' $< >> + >> +$(OUTPUT)util/trace-event-info.o: util/trace-event-info.c $(OUTPUT)PERF-CFLAGS >> + $(QUIET_CC)$(CC) -o $@ -c $(ALL_CFLAGS) -DPERF_TMP_DIR='"$(PERF_TMP_DIR)"' $< >> + >> +$(OUTPUT)util/vdso.o: util/vdso.c $(OUTPUT)PERF-CFLAGS >> + $(QUIET_CC)$(CC) -o $@ -c $(ALL_CFLAGS) -DPERF_TMP_DIR='"$(PERF_TMP_DIR)"' $< >> + >> $(OUTPUT)ui/browser.o: ui/browser.c $(OUTPUT)PERF-CFLAGS >> $(QUIET_CC)$(CC) -o $@ -c $(ALL_CFLAGS) -DENABLE_SLFUTURE_CONST $< >>
Thanks, Irina
| |