Improve toplevel Makefile "all" target to work better with parallel make
Change the all: target in the toplevel Makefile so that it doesn't try to resolve build dependencies at the top level - instead, it just recursively builds the all: target in source/ and dll/. Change the all: target in the source/Makefile so that it builds the EXTRAS (scr-bx and wserv) as well as the main client binary. The upshot of all this is that one "make" invocation is responsible for both scr-bx and wserv, which is necessary for parallel make (make -j) to work correctly as these binaries share some object files.
This commit is contained in:
40
Makefile.in
40
Makefile.in
@@ -181,10 +181,11 @@ MFLAGS = \
|
|||||||
|
|
||||||
## Makefile starts here.
|
## Makefile starts here.
|
||||||
|
|
||||||
all: Makefile .config.h $(_VERSION_) @EXTRAS@ dll done
|
all: source_all dll
|
||||||
|
@echo
|
||||||
.config.h:
|
@echo Now type \"$(MAKE_BIN) install\" to install $(_VERSION_) globally \(if you\'re root\), or
|
||||||
@if test ! -f $(topdir)/.config.h ; then touch $(topdir)/.config.h; fi
|
@echo else you can type \"$(MAKE_BIN) install_local\" to install $(_VERSION_) to your home
|
||||||
|
@echo directory.
|
||||||
|
|
||||||
install: all installbin installdll installscript installman installhelp \
|
install: all installbin installdll installscript installman installhelp \
|
||||||
installtranslation reallydone
|
installtranslation reallydone
|
||||||
@@ -193,15 +194,14 @@ installeverything: install
|
|||||||
|
|
||||||
everything: all
|
everything: all
|
||||||
|
|
||||||
$(_VERSION_): .config.h
|
source_all:
|
||||||
cd source \
|
@cd source && $(MAKE) all
|
||||||
&& $(MAKE) all
|
|
||||||
|
|
||||||
dll/dummy:
|
$(_VERSION_):
|
||||||
|
@cd source && $(MAKE) $(_VERSION_)
|
||||||
|
|
||||||
dll: .config.h $(srcdir)/Makefile dll/Makefile dll/dummy
|
dll:
|
||||||
cd dll \
|
@cd dll && $(MAKE) all
|
||||||
&& $(MAKE) all
|
|
||||||
|
|
||||||
installdll: $(srcdir)/Makefile dll/Makefile installdirs dll
|
installdll: $(srcdir)/Makefile dll/Makefile installdirs dll
|
||||||
cd dll \
|
cd dll \
|
||||||
@@ -252,13 +252,11 @@ install_local: all local_installdirs installdll_local
|
|||||||
$(INSTALL_DATA) $(top_srcdir)/BitchX.reasons $(DEFAULT_CTOOLZ_DIR)/$(DEFAULT_BITCHX_KICK_FILE)
|
$(INSTALL_DATA) $(top_srcdir)/BitchX.reasons $(DEFAULT_CTOOLZ_DIR)/$(DEFAULT_BITCHX_KICK_FILE)
|
||||||
$(INSTALL_DATA) $(top_srcdir)/BitchX.kill $(DEFAULT_CTOOLZ_DIR)/$(DEFAULT_BITCHX_KILL_FILE)
|
$(INSTALL_DATA) $(top_srcdir)/BitchX.kill $(DEFAULT_CTOOLZ_DIR)/$(DEFAULT_BITCHX_KILL_FILE)
|
||||||
|
|
||||||
wserv: .config.h $(srcdir)/source/wserv.c $(srcdir)/source/term.c $(srcdir)/Makefile
|
wserv:
|
||||||
cd source \
|
@cd source && $(MAKE) wserv
|
||||||
&& $(MAKE) wserv
|
|
||||||
|
|
||||||
scr-bx: .config.h $(srcdir)/source/scr-bx.c $(srcdir)/source/term.c $(srcdir)/Makefile
|
scr-bx:
|
||||||
cd source \
|
@cd source && $(MAKE) scr-bx
|
||||||
&& $(MAKE) scr-bx
|
|
||||||
|
|
||||||
installwserv: installdirs wserv
|
installwserv: installdirs wserv
|
||||||
$(INSTALL) source/wserv $(DESTDIR)$(INSTALL_WSERV)
|
$(INSTALL) source/wserv $(DESTDIR)$(INSTALL_WSERV)
|
||||||
@@ -396,18 +394,12 @@ $(srcdir)/./stamp-h.in: $(top_srcdir)/configure.in
|
|||||||
cd $(top_srcdir) && autoheader
|
cd $(top_srcdir) && autoheader
|
||||||
@mv $(srcdir)/./stamp-h.inT $(srcdir)/./stamp-h.in
|
@mv $(srcdir)/./stamp-h.inT $(srcdir)/./stamp-h.in
|
||||||
|
|
||||||
done:
|
|
||||||
@echo
|
|
||||||
@echo Now type \"$(MAKE_BIN) install\" to install $(_VERSION_) globally \(if you\'re root\), or
|
|
||||||
@echo else you can type \"$(MAKE_BIN) install_local\" to install $(_VERSION_) to your home
|
|
||||||
@echo directory.
|
|
||||||
|
|
||||||
reallydone:
|
reallydone:
|
||||||
@echo
|
@echo
|
||||||
@echo $(_VERSION_) is now installed.
|
@echo $(_VERSION_) is now installed.
|
||||||
@echo Type \"$(INSTALL_IRC)\" to start.
|
@echo Type \"$(INSTALL_IRC)\" to start.
|
||||||
|
|
||||||
.PHONY: clean done reallydone installdirs local_installdirs
|
.PHONY: clean all source_all dll $(_VERISON_) scr-bx wserv reallydone installdirs local_installdirs
|
||||||
|
|
||||||
# Tell versions [3.59,3.63) of GNU make to not export all variables.
|
# Tell versions [3.59,3.63) of GNU make to not export all variables.
|
||||||
# Otherwise a system limit (for SysV at least) may be exceeded.
|
# Otherwise a system limit (for SysV at least) may be exceeded.
|
||||||
|
|||||||
@@ -171,7 +171,7 @@ OBJECTS = alias.o alist.o @ALLOCA@ array.o art.o banlist.o bot_link.o cdcc.o \
|
|||||||
|
|
||||||
SOURCES = $(OBJECTS:%.o=%.c) #$(TCL_SRCS)
|
SOURCES = $(OBJECTS:%.o=%.c) #$(TCL_SRCS)
|
||||||
|
|
||||||
all: $(_VERSION_)
|
all: $(_VERSION_) wserv scr-bx
|
||||||
|
|
||||||
Makefile: $(srcdir)/Makefile.in
|
Makefile: $(srcdir)/Makefile.in
|
||||||
cd $(topdir) \
|
cd $(topdir) \
|
||||||
|
|||||||
Reference in New Issue
Block a user