Re: Parallel building



Hi there,

On Wed, 2003-03-26 at 08:53, Frederic Crozat wrote:
> Le lun 
> > On Thu, 2003-03-20 at 15:15, Frederic Crozat wrote:
> > > and in Makefile.shared:
> > > %.h %-stubs.c  %-common.c %-imodule.c %-skelimpl.c: $(IDL_DIR)%.idl
> > > $(IDL_COMPILER)
> > > ...
> > > 
> > > is causing parallel build to fail because make thinks all those
> > > generated files can be build in parallel, which is completely false..

	So I had another go at trying to make this work - this has to be the
umpteenth time I've wasted an hour or so on this before doing something
productive.

	I attach my patch; it _appears_ to make 'make -j 3' work for most of
ORBit2 (HEAD); it fails in test/inhibit for reasons I have no
understanding of. make -d reveals it totally ignoring the implicit rule
chain from:

%.h ... : %.idl_stamp
%.idl_stamp : %.idl ...

	Of course; 'make foo.idl_stamp' works just great. It's really unclear
to me how to make this work; worse - it's not that clear to me how to
force the IDL compiled stuff to be built before anything else that
#includes them in the compiled source although the _OBJECTS hack seems
to work; and lastly I've no clue how to make this more elegant, the
Makefile.shared stuff seems to me to be pretty horribly ugly.

	Havoc; any chance of some autotools expert help here ?

	Thanks muchly,

		Michael.
 
-- 
 mmeeks@gnu.org  <><, Pseudo Engineer, itinerant idiot
? autom4te-2.53.cache
? src/orb/orb-core/corba-ops.idl_stamp
Index: ChangeLog
===================================================================
RCS file: /cvs/gnome/ORBit2/ChangeLog,v
retrieving revision 1.480
diff -u -p -u -r1.480 ChangeLog
--- ChangeLog	21 Apr 2003 16:10:18 -0000	1.480
+++ ChangeLog	21 Apr 2003 20:27:48 -0000
@@ -1,3 +1,7 @@
+2003-04-21  Michael Meeks  <michael@ximian.com>
+
+	* test/inhibit/Makefile.am: clean up multi-thread.
+
 2003-04-21  Herbert Valerio Riedel  <hvr@gnu.org>
 
 	* src/orb/poa/orbit-adaptor.c
Index: Makefile.shared
===================================================================
RCS file: /cvs/gnome/ORBit2/Makefile.shared,v
retrieving revision 1.7
diff -u -p -u -r1.7 Makefile.shared
--- Makefile.shared	14 Apr 2003 18:05:10 -0000	1.7
+++ Makefile.shared	21 Apr 2003 20:27:48 -0000
@@ -1,6 +1,8 @@
 IDL_COMPILER = $(top_builddir)/src/idl-compiler/orbit-idl-2$(EXEEXT)
 
-%.h %-stubs.c %-skels.c %-common.c %-imodule.c %-skelimpl.c: $(IDL_DIR)%.idl $(IDL_COMPILER)
+%.h %-stubs.c %-skels.c %-common.c %-imodule.c %-skelimpl.c: %.idl_stamp
+
+%.idl_stamp : $(IDL_DIR)%.idl $(IDL_COMPILER)
 	-(rm -f $(*).h $(*)-stubs.c $(*)-skels.c $(*)-common.c $(*)-imodule.c $(*)-skelimpl.c || true) > /dev/null
 	$(IDL_COMPILER) $(IDL_FLAGS) --deps $(*D)/.deps/$(*F).idl.P $< 
 	for I in $(*).h $(*)-stubs.c $(*)-skels.c $(*)-common.c $(*)-imodule.c $(*)-skelimpl.c; do \
@@ -9,6 +11,7 @@ IDL_COMPILER = $(top_builddir)/src/idl-c
 			mv $$I.out $$I ; \
 		fi; \
 	done
+	touch $<
 
 if MAINTAINER_MODE
 IDL_DEPS_MAGIC := $(shell mkdir .deps > /dev/null 2>&1 || :)
Index: src/orb/orb-core/Makefile.am
===================================================================
RCS file: /cvs/gnome/ORBit2/src/orb/orb-core/Makefile.am,v
retrieving revision 1.45
diff -u -p -u -r1.45 Makefile.am
--- src/orb/orb-core/Makefile.am	19 Mar 2003 12:12:02 -0000	1.45
+++ src/orb/orb-core/Makefile.am	21 Apr 2003 20:27:48 -0000
@@ -52,6 +52,7 @@ DEFS_IDLOUT=iop-defs-common.c
 OPS_IDLOUT= corba-ops.h corba-ops-stubs.c corba-ops-common.c corba-ops-skels.c
 IFACE_IDLOUT=orbit-interface-common.c
 
+$(main_src) : $(BUILT_SOURCES)
 $(liborb_core_la_OBJECTS) : $(BUILT_SOURCES)
 IDL_COMPILER = $(top_builddir)/src/idl-compiler/orbit-idl-2
 
@@ -66,7 +67,10 @@ IDL_FILES=corba-defs.idl iop-defs.idl co
 include $(top_srcdir)/Makefile.shared
 
 IDL_FLAGS_CORBA_OPS = --showcpperrors
-$(OPS_IDLOUT): corba-ops.idl $(IDL_COMPILER)
+
+$(OPS_IDLOUT): corba-ops.idl_stamp
+
+corba-ops.idl_stamp : corba-ops.idl $(IDL_COMPILER)
 	-(rm -f $(OPS_IDLOUT) || true) > /dev/null
 	$(IDL_COMPILER) $(IDL_FLAGS_CORBA_OPS) --deps .deps/corba-ops.idl.P $<
 	for I in $(OPS_IDLOUT); do								\
@@ -74,6 +78,7 @@ $(OPS_IDLOUT): corba-ops.idl $(IDL_COMPI
 	done;											\
 	sed -e "s,Z,_,g" corba-ops-skels.c > corba-ops-skels.c.out;				\
 	mv corba-ops-skels.c.out corba-ops-skels.c;
+	touch corba-ops.idl_stamp
 
 IDL_FLAGS_INTERFACE = --nostubs --noskels --showcpperrors --noheaders
 $(IFACE_IDLOUT) : orbit-interface.idl $(IDL_COMPILER)
@@ -81,7 +86,7 @@ $(IFACE_IDLOUT) : orbit-interface.idl $(
 	$(IDL_COMPILER) $(IDL_FLAGS_INTERFACE) --deps .deps/orbit-interface.idl.P $<
 
 BUILT_SOURCES = $(IFACE_IDLOUT) $(IDLOUT) $(DEFS_IDLOUT) $(OPS_IDLOUT)
-CLEANFILES = $(BUILT_SOURCES)
+CLEANFILES = $(BUILT_SOURCES) $(IDL_FILES:%.idl=%.idl_stamp) corba-ops.idl_stamp
 EXTRA_DIST = $(IDL_FILES)
 
 dist-hook:
Index: test/everything/Makefile.am
===================================================================
RCS file: /cvs/gnome/ORBit2/test/everything/Makefile.am,v
retrieving revision 1.23
diff -u -p -u -r1.23 Makefile.am
--- test/everything/Makefile.am	14 Apr 2003 18:05:13 -0000	1.23
+++ test/everything/Makefile.am	21 Apr 2003 20:27:48 -0000
@@ -66,12 +66,12 @@ server.c : $(included_src)
 	touch server.c
 server_DEPENDENCIES=${EVERYTHING_BUILT} $(included_src)
 
-IDL_FLAGS= --showcpperrors --add-imodule
-IDL_FILES= everything.idl
+IDL_FLAGS=--showcpperrors --add-imodule
+IDL_FILES=everything.idl
 include $(top_srcdir)/Makefile.shared
 
 BUILT_SOURCES = ${EVERYTHING_BUILT} everything-imodule.c
-CLEANFILES = ${BUILT_SOURCES} iorfile
+CLEANFILES = ${BUILT_SOURCES} iorfile $(IDL_FILES:%.idl=%.idl_stamp)
 
 TESTS = $(srcdir)/test.sh
 
Index: test/inhibit/Makefile.am
===================================================================
RCS file: /cvs/gnome/ORBit2/test/inhibit/Makefile.am,v
retrieving revision 1.9
diff -u -p -u -r1.9 Makefile.am
--- test/inhibit/Makefile.am	20 Sep 2002 03:01:48 -0000	1.9
+++ test/inhibit/Makefile.am	21 Apr 2003 20:27:48 -0000
@@ -12,7 +12,7 @@ LDADD = $(top_builddir)/src/orb/libORBit
 FOO_IDLOUT=foo.h foo-stubs.c foo-skels.c foo-common.c
 BAA_IDLOUT=baa.h baa-stubs.c baa-skels.c baa-common.c
 
-test_inhibit_SOURCES=$(FOO_IDLOUT) $(BAA_IDLOUT) test-inhibit.c
+test_inhibit_SOURCES=test-inhibit.c $(BUILT_SOURCES)
 
 IDL_FLAGS=--showcpperrors -I$(srcdir)
 IDL_FILES=foo.idl baa.idl
@@ -21,7 +21,7 @@ include $(top_srcdir)/Makefile.shared
 TESTS=test-inhibit
 
 BUILT_SOURCES = $(BAA_IDLOUT) $(FOO_IDLOUT)
-CLEANFILES = $(BUILT_SOURCES)
+CLEANFILES = $(BUILT_SOURCES) $(IDL_FILES:%.idl=%.idl_stamp)
 EXTRA_DIST = $(IDL_FILES)
 
 dist-hook:


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]