From 9de77615d68f0cdc1402e828e828c67aa4699f60 Mon Sep 17 00:00:00 2001 From: danieldg Date: Tue, 1 Sep 2009 15:06:18 +0000 Subject: [PATCH] Add "make single" target and fix slow depfile generation on "make module" git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@11568 e03df62e-2008-0410-955e-edbf42e46eb7 --- .Makefile.inc | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/.Makefile.inc b/.Makefile.inc index 99cf6f6e2..be9d7b3c6 100644 --- a/.Makefile.inc +++ b/.Makefile.inc @@ -81,6 +81,10 @@ NICEFLAGS += -I$(COMPILE_ROOT)/include @GNU_ONLY MODNAME = $(M:.so=) @ENDIF +@IFDEF F + _all: single +@ENDIF + all: finishmessage alldep: @@ -89,10 +93,12 @@ alldep: allreal: $(HEADER) alldep @$(MAKEENV) $(MAKE) -C src -f ../make/$(MAKESTYLE)-real.mk all -module: - cd src; if [ -d modules/$(MODNAME) ]; then ../make/calcdep.pl modules/$(MODNAME) modules/$(MODNAME)/*.cpp; else ../make/calcdep.pl modules/$(MODNAME).cpp; fi +module: alldep $(MAKEENV) $(MAKE) -C src -f ../make/$(MAKESTYLE)-real.mk modules/$(MODNAME).so +single: alldep + $(MAKEENV) $(MAKE) -C src -f ../make/$(MAKESTYLE)-real.mk $(F) + debug: @${MAKE} D=1 all @@ -205,10 +211,13 @@ help: @echo ' debug Compile a debug build. Equivalent to "make D=1 all"' @echo ' module Builds a single module, which is specified by "M=m_modname"' @echo ' The command "make M=m_modname" is a shortcut for this target' + @echo ' single Builds a single target, which is specified by "F=filename"' + @echo ' The command "make F=filename" is a shortcut for this target' + @echo ' Paths are relative to the src/ directory' @echo '' @echo ' clean Cleans object files produced by the compile' @echo ' distclean Cleans all files produced by compile and ./configure' @echo ' deinstall Removes the files created by "make install"' @echo -.PHONY: all help debug debug-header std-header ircd mods finishmessage install module clean modclean deinstall squeakyclean launchd_dir configureclean +.PHONY: all help debug debug-header std-header ircd mods finishmessage install module single clean modclean deinstall squeakyclean launchd_dir configureclean -- 2.39.5