[syslinux] [PATCH] mdiskchk: files for `./configure && make`

Geert Stappers stappers at stappers.nl
Sun Nov 11 06:54:06 PST 2012


---
 win32/mdiskchk/Makefile  |   22 +++++++++++++++++++++
 win32/mdiskchk/configure |   48 ++++++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 70 insertions(+)
 create mode 100644 win32/mdiskchk/Makefile
 create mode 100644 win32/mdiskchk/configure

diff --git a/win32/mdiskchk/Makefile b/win32/mdiskchk/Makefile
new file mode 100644
index 0000000..50388d3
--- /dev/null
+++ b/win32/mdiskchk/Makefile
@@ -0,0 +1,22 @@
+#
+# Makefile
+# 
+# to reflect build order of the directories "sys/" and "exe/"
+# and to make the ./configure script less lonely in this directory
+#
+
+mdiskchk.exe: exe/mdiskchk.exe
+	cp exe/mdiskchk.exe .
+
+exe/mdiskchk.exe: sys/pmem.o
+	( cd exe ; make )
+
+sys/pmem.o:
+	( cd sys ; make )
+
+clean:
+	( cd sys ; make clean )
+	( cd exe ; make clean )
+	rm -f exe/mdiskchk.exe # that might be in git
+
+# l l
diff --git a/win32/mdiskchk/configure b/win32/mdiskchk/configure
new file mode 100644
index 0000000..12210b8
--- /dev/null
+++ b/win32/mdiskchk/configure
@@ -0,0 +1,48 @@
+#!/bin/bash
+#
+# Handcrafted configure script
+#
+# It is a response to
+# > Does anyone know of a clever, Linux-distribution-independent way to find out
+# > where MinGW has its lib/ and include/ dirs?
+#
+
+function firstfounddirectory
+{
+	while read CHECKME COMMENT
+	do
+		if [ -d $CHECKME ] ; then
+			echo $CHECKME
+			return
+		fi
+	done
+	echo '/sorry/directory/not/in/supplied/list'
+}
+
+WININC=$( firstfounddirectory << HERE
+/possible/directory/without/white/space         optional: extra information
+/usr/i686-w64-mingw32/sys-root/mingw/include           fedora17 RPM version
+/usr/i686-w64-mingw32/include             debian mingw-w64-i686-dev 2.0.3-1
+HERE
+)
+
+WINLIB=$( firstfounddirectory << HERE
+/usr/i686-w64-mingw32/sys-root/mingw/lib                     works for Sha0
+/usr/i686-w64-mingw32/lib                 debian mingw-w64-i686-dev 2.0.3-1
+HERE
+)
+
+# TODO: have a {exe,sys}/Makefile.in   and generate {exe,sys}/Makefile
+# current workaround: modify the {exe,sys}/Makefile that is in SCM
+
+sed  --in-place \
+ -e "s@^WININC.*:=.*@WININC := $WININC@" \
+ -e "s@^WINLIB.*:=.*@WINLIB := $WINLIB@" \
+	exe/Makefile
+
+sed  --in-place \
+ -e "s@^WININC.*:=.*@WININC := $WININC@" \
+ -e "s@^WINLIB.*:=.*@WINLIB := $WINLIB@" \
+	sys/Makefile
+
+# l l
-- 
1.7.10.4




More information about the Syslinux mailing list