From 71a9574a515613cded23b20f260a88784bcd4286 Mon Sep 17 00:00:00 2001 From: Ondrej Filip Date: Sun, 9 Aug 2009 19:43:42 +0200 Subject: Makefile changed to make it work with 'make -jN' where N>1 --- tools/Makefile.in | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) (limited to 'tools/Makefile.in') diff --git a/tools/Makefile.in b/tools/Makefile.in index 6307cf0..eeef8f5 100644 --- a/tools/Makefile.in +++ b/tools/Makefile.in @@ -11,17 +11,25 @@ daemon: $(exedir)/bird client: $(exedir)/birdc -subdir depend: .dir-stamp +bird-dep := $(addsuffix /all.o, $(static-dirs)) conf/all.o lib/birdlib.a + +$(bird-dep): sysdep/paths.h .dep-stamp subdir + +birdc-dep := client/all.o lib/birdlib.a + +$(birdc-dep): sysdep/paths.h .dep-stamp subdir + +subdir depend: sysdep/paths.h .dir-stamp set -e ; for a in $(dynamic-dirs) ; do $(MAKE) -C $$a $@ ; done set -e ; for a in $(static-dirs) $(client-dirs) ; do $(MAKE) -C $$a -f $(srcdir_abs)/$$a/Makefile $@ ; done -$(exedir)/bird: $(addsuffix /all.o, $(static-dirs)) conf/all.o lib/birdlib.a +$(exedir)/bird: $(bird-dep) $(CC) $(LDFLAGS) -o $@ $^ $(LIBS) -$(exedir)/birdc: client/all.o lib/birdlib.a +$(exedir)/birdc: $(birdc-dep) $(CC) $(LDFLAGS) -o $@ $^ $(LIBS) $(CLIENT_LIBS) -.dir-stamp: +.dir-stamp: sysdep/paths.h mkdir -p $(static-dirs) $(client-dirs) $(doc-dirs) touch .dir-stamp -- cgit v1.2.3 From 581b59907ca5b79b44cc0654e57c34ab77883a96 Mon Sep 17 00:00:00 2001 From: Ondrej Zajicek Date: Mon, 10 Aug 2009 13:57:08 +0200 Subject: Clean files generated by Bison and Flex. --- tools/Makefile.in | 1 + 1 file changed, 1 insertion(+) (limited to 'tools/Makefile.in') diff --git a/tools/Makefile.in b/tools/Makefile.in index eeef8f5..039f1ea 100644 --- a/tools/Makefile.in +++ b/tools/Makefile.in @@ -68,6 +68,7 @@ install-docs: clean: find . -name "*.[oa]" -o -name core -o -name depend -o -name "*.html" | xargs rm -f + rm -f conf/cf-lex.c conf/cf-parse.* conf/commands.h conf/keywords.h rm -f $(exedir)/bird $(exedir)/birdc $(exedir)/bird.ctl $(exedir)/bird6.ctl .dep-stamp distclean: clean -- cgit v1.2.3 From f2cfc509960741bd587cf92f7d154d06fbb2c9a4 Mon Sep 17 00:00:00 2001 From: Ondrej Zajicek Date: Mon, 10 Aug 2009 13:59:56 +0200 Subject: Compilation and dependency generation should be serialized. --- tools/Makefile.in | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'tools/Makefile.in') diff --git a/tools/Makefile.in b/tools/Makefile.in index 039f1ea..daa753c 100644 --- a/tools/Makefile.in +++ b/tools/Makefile.in @@ -19,7 +19,11 @@ birdc-dep := client/all.o lib/birdlib.a $(birdc-dep): sysdep/paths.h .dep-stamp subdir -subdir depend: sysdep/paths.h .dir-stamp +depend: sysdep/paths.h .dir-stamp + set -e ; for a in $(dynamic-dirs) ; do $(MAKE) -C $$a $@ ; done + set -e ; for a in $(static-dirs) $(client-dirs) ; do $(MAKE) -C $$a -f $(srcdir_abs)/$$a/Makefile $@ ; done + +subdir: sysdep/paths.h .dir-stamp .dep-stamp set -e ; for a in $(dynamic-dirs) ; do $(MAKE) -C $$a $@ ; done set -e ; for a in $(static-dirs) $(client-dirs) ; do $(MAKE) -C $$a -f $(srcdir_abs)/$$a/Makefile $@ ; done -- cgit v1.2.3