Skip to content


Subversion checkout URL

You can clone with
Download ZIP
Browse files

Make makefile.win32:install target work without MSYS

Based on patch by Dimitar Zhekov.
MSYS users should now define 'CP_R = cp -r'.
Removed override of MAKE, as this is set automatically.
  • Loading branch information...
commit 78144ab606aba1a049cd090cbb574b4f94caf062 1 parent 08d751d
@ntrel ntrel authored
Showing with 18 additions and 9 deletions.
  1. +18 −9 makefile.win32
27 makefile.win32
@@ -1,22 +1,26 @@
+# See
# Running make creates config.h then calls the sub makefiles.
# Other targets are:
# deps: delete the dependencies so they are regenerated on next make
# clean: clean all generated files
+# install: install to DESTDIR
# is an optional file to override make variables.
# Use instead of editing variables as it is included in sub
# makefiles.
-# to set PREFIX instead of the default C:\libs
-# For MSYS use to set CP and RM.
-# By default this will work in a Windows command prompt.
+# E.g. use to set PREFIX=C:/libs instead of the default C:\libs
+# For MSYS use to set CP, CP_R and RM.
+# By default this should work in a Windows command prompt (cmd.exe).
WINDRES = windres.exe
CC = gcc
CXX = g++
CP = copy /Y
+CP_R = xcopy /S /Y
RM = del
-MAKE = mingw32-make
+MKDIR = mkdir
+DESTDIR = C:/Program Files/Geany
all: config.h
@@ -44,10 +48,15 @@ clean: deps
$(MAKE) -C src -f makefile.win32 clean
.PHONY: install
-DESTDIR='C:/Program Files/Geany'
-# requires admin privileges and MSYS
+# likely requires admin privileges
+# mkdir output is ignored in case dir exists
+# all paths with a backslash must be quoted for MSYS compatibility
- cp -r data $(DESTDIR)
- cp plugins/*.dll $(DESTDIR)/lib
- cp geany.exe $(DESTDIR)/bin
+ -$(MKDIR) "$(DESTDIR)"
+ -$(MKDIR) "$(DESTDIR)\bin"
+ $(CP) geany.exe "$(DESTDIR)\bin"
+ -$(MKDIR) "$(DESTDIR)\lib"
+ $(CP) "plugins\*.dll" "$(DESTDIR)\lib"
+ -$(MKDIR) "$(DESTDIR)\data"
+ $(CP_R) data "$(DESTDIR)\data"

0 comments on commit 78144ab

Please sign in to comment.
Something went wrong with that request. Please try again.