diff --git a/ChangeLog b/ChangeLog index 930ff7984..03e4b4223 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,11 @@ +2008-03-26 Badlop + + * src/Makefile.in: Support for parallel compilation with 'make -j' + in multi core CPUs: fix compilation dependencies; compile + behaviors before other source code. (thanks to Jonathan Schleifer) + * src/mod_pubsub/Makefile.in: Likewise + * src/eldap/Makefile.in: Likewise + 2008-03-26 Alexey Shchepin * src/ejabberd_local.erl: The iq_response table wasn't cloned diff --git a/src/Makefile.in b/src/Makefile.in index fc981a4a0..b758b5f09 100644 --- a/src/Makefile.in +++ b/src/Makefile.in @@ -50,7 +50,9 @@ prefix = @prefix@ SUBDIRS = @mod_irc@ @mod_pubsub@ @mod_muc@ @mod_proxy65@ @eldap@ @pam@ @web@ stringprep @tls@ @odbc@ @ejabberd_zlib@ ERLSHLIBS = expat_erl.so ERLBEHAVS = cyrsasl.erl gen_mod.erl p1_fsm.erl -SOURCES = $(ERLBEHAVS) $(wildcard *.erl) +SOURCES_ALL = $(wildcard *.erl) +SOURCES = $(filter-out $(ERLBEHAVS),$(SOURCES_ALL)) +ERLBEHAVBEAMS = $(ERLBEHAVS:.erl=.beam) BEAMS = $(SOURCES:.erl=.beam) DESTDIR = @@ -74,7 +76,11 @@ endif all: $(ERLSHLIBS) compile-beam all-recursive -compile-beam: XmppAddr.hrl $(BEAMS) +compile-beam: XmppAddr.hrl $(ERLBEHAVBEAMS) $(BEAMS) + +$(BEAMS): $(ERLBEHAVBEAMS) + +all-recursive: $(ERLBEHAVBEAMS) %.beam: %.erl @ERLC@ -W $(ERLC_FLAGS) $< diff --git a/src/eldap/Makefile.in b/src/eldap/Makefile.in index 4e1e87688..1c9b7ca22 100644 --- a/src/eldap/Makefile.in +++ b/src/eldap/Makefile.in @@ -22,6 +22,8 @@ BEAMS = $(addprefix $(OUTDIR)/,$(SOURCES:.erl=.beam)) all: $(BEAMS) ELDAPv3.beam +ELDAPv3.beam: ELDAPv3.erl + ELDAPv3.erl: ELDAPv3.asn @ERLC@ -bber_bin -W $(EFLAGS) $< diff --git a/src/mod_pubsub/Makefile.in b/src/mod_pubsub/Makefile.in index b9eba4267..39f6a16e8 100644 --- a/src/mod_pubsub/Makefile.in +++ b/src/mod_pubsub/Makefile.in @@ -16,11 +16,16 @@ ifdef debug endif OUTDIR = .. -SOURCES = $(wildcard *.erl) +ERLBEHAVS = gen_pubsub_node.erl gen_pubsub_nodetree.erl +SOURCES_ALL = $(wildcard *.erl) +SOURCES = $(filter-out $(ERLBEHAVS),$(SOURCES_ALL)) +ERLBEHAVBEAMS = $(addprefix $(OUTDIR)/,$(ERLBEHAVS:.erl=.beam)) BEAMS = $(addprefix $(OUTDIR)/,$(SOURCES:.erl=.beam)) -all: $(BEAMS) +all: $(ERLBEHAVBEAMS) $(BEAMS) + +$(BEAMS): $(ERLBEHAVBEAMS) $(OUTDIR)/%.beam: %.erl @ERLC@ -W $(EFLAGS) -o $(OUTDIR) $<