|
@@ -712,9 +712,15 @@ $(patsubst perf-%,%.o,$(PROGRAMS)): $(LIB_H) $(wildcard */*.h)
|
|
|
# we depend the various files onto their directories.
|
|
|
DIRECTORY_DEPS = $(LIB_OBJS) $(BUILTIN_OBJS) $(GTK_OBJS)
|
|
|
DIRECTORY_DEPS += $(OUTPUT)PERF-VERSION-FILE $(OUTPUT)common-cmds.h
|
|
|
-$(DIRECTORY_DEPS): | $(sort $(dir $(DIRECTORY_DEPS)))
|
|
|
+# no need to add flex objects, because they depend on bison ones
|
|
|
+DIRECTORY_DEPS += $(OUTPUT)util/parse-events-bison.c
|
|
|
+DIRECTORY_DEPS += $(OUTPUT)util/pmu-bison.c
|
|
|
+
|
|
|
+OUTPUT_DIRECTORIES := $(sort $(dir $(DIRECTORY_DEPS)))
|
|
|
+
|
|
|
+$(DIRECTORY_DEPS): | $(OUTPUT_DIRECTORIES)
|
|
|
# In the second step, we make a rule to actually create these directories
|
|
|
-$(sort $(dir $(DIRECTORY_DEPS))):
|
|
|
+$(OUTPUT_DIRECTORIES):
|
|
|
$(QUIET_MKDIR)$(MKDIR) -p $@ 2>/dev/null
|
|
|
|
|
|
$(LIB_FILE): $(LIB_OBJS)
|