From ec3afa5c04994a867da4875616bde3482489a35f Mon Sep 17 00:00:00 2001 From: brain Date: Thu, 13 Apr 2006 10:58:03 +0000 Subject: Better handling of dependencies, doesnt always rebuild mode handler files now git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@3878 e03df62e-2008-0410-955e-edbf42e46eb7 --- .Makefile.inc | 1 - configure | 10 ++++++++-- src/modes/Makefile | 4 ++-- 3 files changed, 10 insertions(+), 5 deletions(-) diff --git a/.Makefile.inc b/.Makefile.inc index 3101c21b5..ca85da062 100644 --- a/.Makefile.inc +++ b/.Makefile.inc @@ -34,7 +34,6 @@ mods: ircd: @echo "Making ircd..." - ${MAKE} -C src/modes DIRNAME="src/modes" $(MAKEARGS) ${MAKE} -C src DIRNAME="src" $(MAKEARGS) install: all diff --git a/configure b/configure index d5921c8e6..e97a0b568 100755 --- a/configure +++ b/configure @@ -1310,6 +1310,8 @@ sub write_static_makefile { CC = im a cheezeball CXXFLAGS = -I../include \${FLAGS} +CPPFILES = \$(shell /bin/ls -l modes/ | grep '\\.cpp' | sed 's/^.* //' | grep -v svn) +RELCPPFILES = \$(shell /bin/ls -l modes/ | grep '\\.cpp' | sed 's/^.* /modes\\//' | grep -v svn) EOM ### @@ -1363,7 +1365,8 @@ helperfuncs.o: helperfuncs.cpp ../include/base.h ../include/helperfuncs.h ../inc channels.o: channels.cpp ../include/base.h ../include/channels.h ../include/inspircd.h ../include/users.h ../include/globals.h ../include/inspircd_config.h \$(CC) -pipe -I../include \$(FLAGS) -export-dynamic -c channels.cpp -mode.o: mode.cpp ../include/base.h ../include/mode.h ../include/inspircd.h ../include/channels.h ../include/users.h ../include/globals.h ../include/inspircd_config.h +mode.o: mode.cpp ../include/base.h ../include/mode.h ../include/inspircd.h ../include/channels.h ../include/users.h ../include/globals.h ../include/inspircd_config.h \$(RELCPPFILES) + \${MAKE} -C "modes" DIRNAME="src/modes" \$(MAKEARGS) CPPFILES="\$(CPPFILES)" \$(CC) -pipe -I../include \$(FLAGS) -export-dynamic -c mode.cpp xline.o: xline.cpp ../include/base.h ../include/xline.h ../include/inspircd.h ../include/channels.h ../include/users.h ../include/globals.h ../include/inspircd_config.h @@ -1455,6 +1458,8 @@ sub write_dynamic_makefile { CC = im a cheezeball CXXFLAGS = -I../include \${FLAGS} +CPPFILES = \$(shell /bin/ls -l modes/ | grep '\\.cpp' | sed 's/^.* //' | grep -v svn) +RELCPPFILES = \$(shell /bin/ls -l modes/ | grep '\\.cpp' | sed 's/^.* /modes\\//' | grep -v svn) all: libIRCDtimer.so libIRCDaes.so libIRCDcull_list.so libIRCDuserprocess.so libIRCDsocketengine.so libIRCDsocket.so libIRCDhash.so libIRCDchannels.so libIRCDmode.so libIRCDxline.so libIRCDstring.so libIRCDasyncdns.so libIRCDbase.so libIRCDconfigreader.so libIRCDinspsocket.so libIRCDmessage.so $cmdobjs libIRCDcommands.so libIRCDdnsqueue.so libIRCDdynamic.so libIRCDusers.so libIRCDmodules.so libIRCDwildcard.so libIRCDhelper.so libIRCDcommand_parse.so inspircd @@ -1489,8 +1494,9 @@ libIRCDchannels.so: channels.cpp ../include/base.h ../include/channels.h ../incl \$(CC) -pipe -I../include \$(FLAGS) -export-dynamic -c channels.cpp \$(CC) -Wl,--rpath -Wl,$config{LIBRARY_DIR} -shared -o libIRCDchannels.so channels.o -libIRCDmode.so: mode.cpp ../include/base.h ../include/mode.h ../include/inspircd.h ../include/channels.h ../include/users.h ../include/globals.h ../include/inspircd_config.h +libIRCDmode.so: mode.cpp ../include/base.h ../include/mode.h ../include/inspircd.h ../include/channels.h ../include/users.h ../include/globals.h ../include/inspircd_config.h \$(RELCPPFILES) \$(CC) -pipe -I../include \$(FLAGS) -export-dynamic -c mode.cpp + \${MAKE} -C "modes" DIRNAME="src/modes" \$(MAKEARGS) CPPFILES="\$(CPPFILES)" \$(CC) -Wl,--rpath -Wl,$config{LIBRARY_DIR} -shared -o libIRCDmode.so mode.o modes/modeclasses.a libIRCDxline.so: xline.cpp ../include/base.h ../include/xline.h ../include/inspircd.h ../include/channels.h ../include/users.h ../include/globals.h ../include/inspircd_config.h diff --git a/src/modes/Makefile b/src/modes/Makefile index 9b2ea75ca..10afd15d8 100644 --- a/src/modes/Makefile +++ b/src/modes/Makefile @@ -1,8 +1,8 @@ -CPPFILES = `/bin/ls -l | grep '\.cpp' | sed 's/^.* //' | grep -v svn` +#CPPFILES = $(shell /bin/ls -l | grep '\.cpp' | sed 's/^.* //' | grep -v svn) CC = i am cornholio CXXFLAGS = -I../../include ${FLAGS} -all: ../../include/base.h ../../include/modules.h ../../include/inspircd.h ../../include/channels.h ../../include/users.h ../../include/globals.h ../../include/inspircd_config.h ../../include/mode.h +all: ../../include/base.h ../../include/modules.h ../../include/inspircd.h ../../include/channels.h ../../include/users.h ../../include/globals.h ../../include/inspircd_config.h ../../include/mode.h $(CPPFILES) $(CC) -pipe -export-dynamic -c $(CPPFILES) ar r modeclasses.a *.o ranlib modeclasses.a -- cgit v1.2.3