summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordanieldg <danieldg@e03df62e-2008-0410-955e-edbf42e46eb7>2009-09-01 15:06:18 +0000
committerdanieldg <danieldg@e03df62e-2008-0410-955e-edbf42e46eb7>2009-09-01 15:06:18 +0000
commit9de77615d68f0cdc1402e828e828c67aa4699f60 (patch)
tree40bdc1525bda72730cc32c8f5e8d1b13cc035e1d
parentfacb1eb98f911b3e3811ad9cebaf221931ee9c7a (diff)
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
-rw-r--r--.Makefile.inc15
1 files 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