diff options
author | Ben Longbons <b.r.longbons@gmail.com> | 2012-10-01 10:01:46 -0700 |
---|---|---|
committer | Ben Longbons <b.r.longbons@gmail.com> | 2012-10-01 10:10:12 -0700 |
commit | 2834004d5ef472def606b5bdbd1ccac46c6f0f79 (patch) | |
tree | dfc18d7ff3a3a3dc146075723558ad107f02cc04 /GNUmakefile | |
parent | 31544d2b6973931be7fdec898ea3672bea831de2 (diff) | |
download | tmwa-2834004d5ef472def606b5bdbd1ccac46c6f0f79.tar.gz tmwa-2834004d5ef472def606b5bdbd1ccac46c6f0f79.tar.bz2 tmwa-2834004d5ef472def606b5bdbd1ccac46c6f0f79.tar.xz tmwa-2834004d5ef472def606b5bdbd1ccac46c6f0f79.zip |
Fix mkdir thing for make < 3.82
Diffstat (limited to 'GNUmakefile')
-rw-r--r-- | GNUmakefile | 26 |
1 files changed, 16 insertions, 10 deletions
diff --git a/GNUmakefile b/GNUmakefile index a8914f8..bf270b4 100644 --- a/GNUmakefile +++ b/GNUmakefile @@ -6,8 +6,14 @@ default: login-server char-server map-server ladmin eathena-monitor include make.defs .PHONY: all clean common -.PRECIOUS: %/ -%/: +# With no prerequisites, no target should ever be implicitly deleted. +# With any prerequisites, those targets won't be (no patterns). +.SECONDARY: +# This does the same, but only for its prerequisites. +# Unlike .SECONDARY, these may be patterns as well as normal prerequisites. +# .PRECIOUS: %/. + +%/.: +mkdir -p $@ # The default recipe is suboptimal @@ -18,21 +24,21 @@ include make.defs # All this duplication is required because make handles pattern rules specially -${BUILD_DIR}/char/%.o: src/char/%.cpp | ${BUILD_DIR}/char/ +${BUILD_DIR}/char/%.o: src/char/%.cpp | ${BUILD_DIR}/char/. $(COMPILE.cpp) -o $@ $< -${BUILD_DIR}/common/%.o: src/common/%.cpp | ${BUILD_DIR}/common/ +${BUILD_DIR}/common/%.o: src/common/%.cpp | ${BUILD_DIR}/common/. $(COMPILE.cpp) -o $@ $< -${BUILD_DIR}/ladmin/%.o: src/ladmin/%.cpp | ${BUILD_DIR}/ladmin/ +${BUILD_DIR}/ladmin/%.o: src/ladmin/%.cpp | ${BUILD_DIR}/ladmin/. $(COMPILE.cpp) -o $@ $< -${BUILD_DIR}/login/%.o: src/login/%.cpp | ${BUILD_DIR}/login/ +${BUILD_DIR}/login/%.o: src/login/%.cpp | ${BUILD_DIR}/login/. $(COMPILE.cpp) -o $@ $< -${BUILD_DIR}/map/%.o: src/map/%.cpp | ${BUILD_DIR}/map/ +${BUILD_DIR}/map/%.o: src/map/%.cpp | ${BUILD_DIR}/map/. $(COMPILE.cpp) -o $@ $< -${BUILD_DIR}/tool/%.o: src/tool/%.cpp | ${BUILD_DIR}/tool/ +${BUILD_DIR}/tool/%.o: src/tool/%.cpp | ${BUILD_DIR}/tool/. $(COMPILE.cpp) -o $@ $< -${BUILD_DIR}/webserver/%.o: src/webserver/%.cpp | ${BUILD_DIR}/webserver/ +${BUILD_DIR}/webserver/%.o: src/webserver/%.cpp | ${BUILD_DIR}/webserver/. $(COMPILE.cpp) -o $@ $< -${BUILD_DIR}/webserver/pages/%.o: src/webserver/pages/%.cpp | ${BUILD_DIR}/webserver/pages/ +${BUILD_DIR}/webserver/pages/%.o: src/webserver/pages/%.cpp | ${BUILD_DIR}/webserver/pages/. $(COMPILE.cpp) -o $@ $< PROGS = login-server char-server map-server ladmin eathena-monitor webserver |