From 348c2cab712203f23310b56952d9b42284af8482 Mon Sep 17 00:00:00 2001 From: "Diego E. 'Flameeyes' Pettenò" Date: Mon, 19 Jan 2009 17:20:18 +0100 Subject: Create only the directory the current target should be created into. With this change, instead of running multiple `mkdir -p` commands in all the rules for all the generated definition files, only the call for the current generated file is executed. Not only it should shorten build time (especially for parallel make) but it also fixes out-of-tree builds when new directories are added. The $(dir $@) construct is GNU make-specific, but the rest of the buildsystem is already GNU make-dependent so there should be no problem. --- src/Makefile.am | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) (limited to 'src/Makefile.am') diff --git a/src/Makefile.am b/src/Makefile.am index 99ed7b2b..e6feddd3 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -1068,10 +1068,7 @@ EXTRA_DIST += $(SYMDEF_FILES) BUILT_SOURCES += $(SYMDEF_FILES) $(SYMDEF_FILES): modules/module-defs.h.m4 - $(MKDIR_P) modules - $(MKDIR_P) modules/gconf - $(MKDIR_P) modules/rtp - $(MKDIR_P) modules/bluetooth + $(MKDIR_P) $(dir $@) $(M4) -Dfname="$@" $< > $@ # Flat volume -- cgit From 7104d54bbce8f9bd2553e16f45f3a0f69ac75b8b Mon Sep 17 00:00:00 2001 From: "Diego E. 'Flameeyes' Pettenò" Date: Mon, 19 Jan 2009 17:30:41 +0100 Subject: Add proper -I directives for out-of-tree builds. When building out of tree, the generated files are put in builddir rather than srcdir, so handle that properly. --- src/Makefile.am | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src/Makefile.am') diff --git a/src/Makefile.am b/src/Makefile.am index e6feddd3..9dd44657 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -47,10 +47,15 @@ endif AM_CFLAGS = \ -I$(top_srcdir)/src \ + -I$(top_builddir)/src \ -I$(top_srcdir)/src/modules \ + -I$(top_builddir)/src/modules \ -I$(top_srcdir)/src/modules/rtp \ + -I$(top_builddir)/src/modules/rtp \ -I$(top_srcdir)/src/modules/gconf \ + -I$(top_builddir)/src/modules/gconf \ -I$(top_srcdir)/src/modules/bluetooth \ + -I$(top_builddir)/src/modules/bluetooth \ -I$(top_srcdir)/src/modules/raop \ $(PTHREAD_CFLAGS) -D_POSIX_PTHREAD_SEMANTICS \ $(LTDLINCL) \ -- cgit