Skip to content

Commit 0523c98

Browse files
committed
Fix configuration for bash mingw environment
1 parent feb1bd2 commit 0523c98

1 file changed

Lines changed: 20 additions & 12 deletions

File tree

deps/libencryptmsg/configure

Lines changed: 20 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,14 @@ INCLUDEDIR=include
3939
STATIC_MODE=false
4040
DEPSDIR=deps
4141
BOTANDIR=
42+
MAKE=mingw32-make
43+
if which make > /dev/null
44+
then
45+
MAKE=make
46+
elif which mingw32-make > /dev/null
47+
then
48+
MAKE=mingw32-make
49+
fi
4250

4351
while [[ $# > 0 ]]
4452
do
@@ -107,7 +115,6 @@ DEPSDIR=$DEPSDIR
107115
BOTANDIR=$BOTANDIR
108116
EOM
109117

110-
111118
cat > build/libencryptmsg.pc << EOM
112119
prefix=$PREFIX
113120
libdir=$PREFIX/$LIBDIR
@@ -121,31 +128,32 @@ Libs: -L\${libdir} -lencryptmsg
121128
Cflags: -I\${includedir}
122129
EOM
123130

124-
if [[ $DEBUG_MODE != true ]]; then
125-
RELEASE=on
126-
fi
127-
128-
if [[ $STATIC_MODE == true ]]; then
129-
pushd src >/dev/null
130-
131-
SUBDIR=$(cat <<EOM | make -s --no-print-directory -f -
131+
cat > build/get_platform.mak <<EOM
132132
RELEASE=$RELEASE
133133
include ${DEPSDIR}/makefiles/platform.mak
134134
all:
135135
@echo \$(SUBDIR)
136136
EOM
137-
)
138137

139-
LIBRARIES=$(cat <<EOM | make -s --no-print-directory -f -
138+
cat > build/get_libraries.mak <<EOM
140139
.DEFAULT_GOAL := default
141140
RELEASE=$RELEASE
142141
include ./Makefile
143142
default::
144143
@echo \$(LIBRARIES)
145144
EOM
146-
)
145+
146+
if [[ $DEBUG_MODE != true ]]; then
147+
RELEASE=on
148+
fi
149+
150+
if [[ $STATIC_MODE == true ]]; then
151+
SUBDIR=$($MAKE -s --no-print-directory -f build/get_platform.mak)
152+
LIBRARIES=$($MAKE -s --no-print-directory -f build/get_libraries.mak)
147153
LIBRARIES+=" ."
148154

155+
pushd src >/dev/null
156+
149157
for L in $LIBRARIES
150158
do
151159
LIB=$L

0 commit comments

Comments
 (0)