Permalink
Browse files

Support MSYS=1 to enable building with MSYS; use $/ instead of DIRSEP

Defining MSYS=1 is cleaner than requiring users to define CP, RM, etc.
  • Loading branch information...
1 parent 65fe863 commit 74959b9cb91dcc4436c457f04a40df23a01de381 @ntrel ntrel committed Jul 4, 2012
View
@@ -3,14 +3,16 @@
# Use localwin32.mk instead of editing variables as it is included in sub
# makefiles.
# Use localwin32.mk to override RST2HTML, DOXYGEN
-# For MSYS use localwin32.mk to set CP and RM.
RST2HTML=python rst2html.py
DOXYGEN=doxygen
CP = copy /y
-RM = del
-include ../localwin32.mk
+ifdef MSYS
+CP = cp
+endif
+
doc: geany.txt
$(RST2HTML) -stg --stylesheet=geany.css $^ geany.html
View
@@ -9,7 +9,7 @@
# localwin32.mk is an optional file to override make variables.
# Use localwin32.mk instead of editing variables as it is included in sub
# makefiles.
-# For MSYS use localwin32.mk to set CP, CP_R, RM, DIRSEP.
+# For MSYS set MSYS=1.
# By default this should work in a Windows command prompt (cmd.exe).
WINDRES = windres.exe
@@ -19,11 +19,19 @@ CP = copy /Y
CP_R = xcopy /S /Y
RM = del
MKDIR = mkdir
+# $/ is used as a portable directory separator
# strip is used to prevent line wrap
-DIRSEP := $(strip \)
+/ := $(strip \)
DESTDIR = C:/Program Files/Geany
-include localwin32.mk
+ifdef MSYS
+CP = cp
+CP_R = cp -r
+RM = rm -f
+/ = /
+endif
+
all: config.h
$(MAKE) -C tagmanager/ctags -f makefile.win32
$(MAKE) -C tagmanager/mio -f makefile.win32
@@ -60,6 +68,6 @@ install:
-$(MKDIR) "$(DESTDIR)/bin"
$(CP) geany.exe "$(DESTDIR)/bin"
-$(MKDIR) "$(DESTDIR)/lib"
- $(CP) plugins$(DIRSEP)*.dll "$(DESTDIR)/lib"
+ $(CP) plugins$/*.dll "$(DESTDIR)/lib"
-$(MKDIR) "$(DESTDIR)/data"
$(CP_R) data "$(DESTDIR)/data"
View
@@ -6,6 +6,10 @@ PREFIX = C:/libs
RM = del
-include ../localwin32.mk
+ifdef MSYS
+RM = rm -f
+endif
+
.SUFFIXES: .c .o .dll
GTK_INCLUDES= \
View
@@ -16,6 +16,9 @@ PREFIX = C:/libs
RM = del
-include ../localwin32.mk
+ifdef MSYS
+RM = rm -f
+endif
COMPLIB=scintilla.a
View
@@ -18,6 +18,10 @@ PREFIX = C:/libs
RM = del
-include ../localwin32.mk
+ifdef MSYS
+RM = rm -f
+endif
+
GTK_INCLUDES= \
-I$(PREFIX)/include/gtk-2.0 \
-I$(PREFIX)/lib/gtk-2.0/include \
@@ -7,6 +7,10 @@ PREFIX = C:/libs
RM = del
-include ../../localwin32.mk
+ifdef MSYS
+RM = rm -f
+endif
+
COMPLIB=ctags.a
REGEX_DEFINES = -DHAVE_REGCOMP -DSTDC_HEADERS=1
@@ -7,6 +7,10 @@ PREFIX = C:/libs
RM = del
-include ../../localwin32.mk
+ifdef MSYS
+RM = rm -f
+endif
+
COMPLIB=mio.a
GTK_INCLUDES= \
@@ -7,6 +7,10 @@ PREFIX = C:/libs
RM = del
-include ../../localwin32.mk
+ifdef MSYS
+RM = rm -f
+endif
+
COMPLIB=tagmanager.a
REGEX_DEFINES = -DHAVE_REGCOMP -DSTDC_HEADERS=1

0 comments on commit 74959b9

Please sign in to comment.