summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJiri Olsa <jolsa@redhat.com>2011-05-29 10:05:17 +0200
committerJiri Olsa <Jiri Olsa jolsa@redhat.com>2011-05-29 19:18:53 +0200
commit16a729e69e28c58cf7994a3f9135fb9fc5e48f5e (patch)
treed408e31b3f33a571e70d34c9d645ae11b771d70d
parent3dbc9de2a57344b61f98d1550508058f9af34c30 (diff)
downloadlatrace-16a729e69e28c58cf7994a3f9135fb9fc5e48f5e.tar.gz
latrace-16a729e69e28c58cf7994a3f9135fb9fc5e48f5e.tar.xz
latrace-16a729e69e28c58cf7994a3f9135fb9fc5e48f5e.zip
Makefiles cleanup
- moved specific cleanup into src/Makefile - added OBJS_DEPS_OMIT variable to ease DEPS_OBJS generation
-rw-r--r--Makefile6
-rw-r--r--src/Makefile12
2 files changed, 13 insertions, 5 deletions
diff --git a/Makefile b/Makefile
index 3488008..9d903b5 100644
--- a/Makefile
+++ b/Makefile
@@ -166,8 +166,6 @@ all:: $(PROGRAMS) LATRACE-CFLAGS
clean::
$(call remove, $(OBJS) $(PROGRAMS))
- $(call remove, src/args-bison.c src/args-flex.c src/args-bison.h src/args-bison.output)
- $(call remove, src/config-bison.c src/config-flex.c src/config-bison.h src/config-bison.output)
$(call remove, lib bin share deps.make latrace-$(CONFIG_VERSION))
mrproper::
@@ -191,9 +189,7 @@ package:
# The gcc -M depedencies generation needs to repaired to include
# subdirectory name within the target.. at least I haven't find any
# gcc option to do that.
-# - no dependency for flex and bison definitions
-DEPS_OBJS=$(filter-out src/args-flex.o src/args-bison.o,$(OBJS))
-DEPS_OBJS:=$(filter-out src/config-bison.o src/config-flex.o,$(DEPS_OBJS))
+DEPS_OBJS=$(filter-out $(OBJS_DEPS_OMIT),$(OBJS))
deps.make:
$(QUIET_DEP)$(RM) -f deps.make; \
diff --git a/src/Makefile b/src/Makefile
index c9c2360..169a5f3 100644
--- a/src/Makefile
+++ b/src/Makefile
@@ -42,6 +42,10 @@ endif
OBJS+=$(AUDIT_OBJS)
PROGRAMS+= $(AUDIT_BIN)
+# no dependency for flex and bison definitions
+OBJS_DEPS_OMIT+=\
+ src/args-flex.o \
+ src/args-bison.o
$(AUDIT_BIN): $(AUDIT_OBJS)
$(QUIET_LD)$(CC) $(CFLAGS) $(AUDIT_LDFLAGS) -o $@ $^ $(AUDIT_LIBS)
@@ -74,6 +78,10 @@ CPPFLAGS+=-DCONFIG_LIBDIR=\"$(libdir)\"
CPPFLAGS+=-DLT_CONF_DIR=\"$(sysconfdir)/latrace.d\"
CPPFLAGS+=-DLT_CONF_HEADERS_DIR=\"$(sysconfdir)/latrace.d/headers\"
CPPFLAGS+=-DLT_CONF_HEADERS_FILE=\"$(sysconfdir)/latrace.d/headers/latrace.h\"
+# no dependency for flex and bison definitions
+OBJS_DEPS_OMIT+=\
+ src/config-bison.o \
+ src/config-flex.o
$(LATRACE_BIN): $(LATRACE_OBJS)
$(QUIET_LD)$(CC) $(CFLAGS) $(LDFLAGS) -o $@ $^ $(LATRACE_LIB)
@@ -82,3 +90,7 @@ install::
$(call install,$(LATRACE_BIN),$(bindir),755)
$(call link,$(LATRACE_BIN),$(LATRACE_CTL),$(bindir))
+clean::
+ $(call remove, src/config-bison.[ch] src/config-flex.c)
+ $(call remove, src/args-bison.[ch] src/args-flex.c)
+ $(call remove, src/config-bison.output src/args-bison.output)