← Back to team overview

linuxdcpp-team team mailing list archive

[Branch ~dcplusplus-team/dcpp-plugin-sdk-cpp/ScriptPlugin] Rev 7: merge

 

Merge authors:
  poy (poy)
------------------------------------------------------------
revno: 7 [merge]
committer: poy <poy@xxxxxxxxxx>
branch nick: ScriptPlugin
timestamp: Sun 2013-02-03 22:37:36 +0100
message:
  merge
modified:
  projects/make/Makefile


--
lp:~dcplusplus-team/dcpp-plugin-sdk-cpp/ScriptPlugin
https://code.launchpad.net/~dcplusplus-team/dcpp-plugin-sdk-cpp/ScriptPlugin

Your team Dcplusplus-team is subscribed to branch lp:~dcplusplus-team/dcpp-plugin-sdk-cpp/ScriptPlugin.
To unsubscribe from this branch go to https://code.launchpad.net/~dcplusplus-team/dcpp-plugin-sdk-cpp/ScriptPlugin/+edit-subscription
=== modified file 'projects/make/Makefile'
--- projects/make/Makefile	2012-12-27 14:02:04 +0000
+++ projects/make/Makefile	2013-02-03 21:37:36 +0000
@@ -37,8 +37,17 @@
 				-DWIN32 -D_WIN32 -DUNICODE -D_UNICODE
 	OBJS += src/resource.o
 	LIBEXT = .dll
+	ifeq ($(findstring Cygwin, $(SHELL)),)
+		MKDIR = if not exist $(subst /,\,$1) md $(subst /,\,$1)
+		RMDIR = if exist $(subst /,\,$1) rd /s /q $(subst /,\,$1)
+	else
+		MKDIR = mkdir -p $1
+		RMDIR += $(RM) -r $1
+	endif
 else
 	LIBEXT = .so
+	MKDIR = mkdir -p $1
+	RMDIR += $(RM) -r $1
 endif
 
 # boost
@@ -77,12 +86,14 @@
 	cd $(OUTPUT_DIR); $(CXX) $^ $(LINKFLAGS) -o $@$(LIBEXT)
 
 ensure-dirs:
-	mkdir -p $(OUTPUT_DIR)/pluginsdk $(OUTPUT_DIR)/src \
-		$(OUTPUT_DIR)/boost/libs/filesystem/src $(OUTPUT_DIR)/boost/libs/system/src \
-		$(OUTPUT_DIR)/lua
+	$(call MKDIR,$(OUTPUT_DIR)/pluginsdk)
+	$(call MKDIR,$(OUTPUT_DIR)/src)
+	$(call MKDIR,$(OUTPUT_DIR)/boost/libs/filesystem/src)
+	$(call MKDIR,$(OUTPUT_DIR)/boost/libs/system/src)
+	$(call MKDIR,$(OUTPUT_DIR)/lua)
 
 src/resource.o:
 	windres ../../src/resource.rc $(OUTPUT_OPTION)
 
 clear:
-	$(RM) -r $(OUTPUT_DIR)
+	$(call RMDIR,$(OUTPUT_DIR))