Mercurial > mxe-octave
comparison src/build-msvctools/Makefile @ 3337:8480924d2b85
[MSVC] Use POSIX compliant getopt version from mingw64.
* src/build-msvctools/Makefile (getopt.c, getopt.h): Use versions from
mingw64, as they're POSIX compliant.
(posixcompat.lib): New target library, replaces dirent.lib and
getopt.lib.
(dirent.lib, getopt.lib): Removed targets.
* src/build-msvctools/getopt.diff: Removed obsolete patch.
* src/build-msvctools/cc-msvc.cc: Links against posixcompat.lib instead
of dirent.lib
* src/build-msvctools/unistd.h: Include getopt.h, for POSIX compliance.
author | Michael Goffioul <michael.goffioul@gmail.com> |
---|---|
date | Fri, 29 Nov 2013 18:46:45 -0500 |
parents | 4f573c0f5955 |
children |
comparison
equal
deleted
inserted
replaced
3336:5c651d4db00c | 3337:8480924d2b85 |
---|---|
3 cc-msvc.exe \ | 3 cc-msvc.exe \ |
4 clgcc.exe \ | 4 clgcc.exe \ |
5 clg++.exe \ | 5 clg++.exe \ |
6 clgfortran.exe \ | 6 clgfortran.exe \ |
7 dirent.h \ | 7 dirent.h \ |
8 dirent.lib \ | |
9 getopt.h \ | 8 getopt.h \ |
10 getopt.lib \ | 9 posixcompat.lib \ |
11 inttypes.h \ | 10 inttypes.h \ |
12 lt-postproc \ | 11 lt-postproc \ |
13 ranlib-msvc \ | 12 ranlib-msvc \ |
14 stdbool.h \ | 13 stdbool.h \ |
15 unistd.h \ | 14 unistd.h \ |
81 -D_trewinddir=_wrewinddir \ | 80 -D_trewinddir=_wrewinddir \ |
82 -D_tseekdir=_wseekdir \ | 81 -D_tseekdir=_wseekdir \ |
83 -D_ttelldir=_wtelldir \ | 82 -D_ttelldir=_wtelldir \ |
84 -c dirent.c -Fo$@ | 83 -c dirent.c -Fo$@ |
85 | 84 |
86 dirent.lib: dirent.obj wdirent.obj | 85 getopt.h: |
87 lib -out:$@ $^ | 86 $(WGET) -O $@ 'http://sourceforge.net/p/mingw-w64/code/HEAD/tree/trunk/mingw-w64-headers/crt/getopt.h?format=raw' |
87 $(SED) -i -e 's,^.*crtdefs\.h.*$$,/*&*/,' $@ | |
88 | 88 |
89 getopt.h: | 89 getopt.c: |
90 $(WGET) -O $@ 'http://sourceforge.net/p/mingw/mingw-org-wsl/ci/master/tree/include/getopt.h?format=raw' | 90 $(WGET) -O $@ 'http://sourceforge.net/p/mingw-w64/code/HEAD/tree/trunk/mingw-w64-crt/misc/getopt.c?format=raw' |
91 $(SED) -i -e 's/__MINGW_NOTHROW//g' \ | |
92 -e 's,^.*_mingw\.h.*$$,/*&*/,' \ | |
93 getopt.h | |
94 | |
95 getopt.c: getopt.diff | |
96 $(WGET) -O $@ 'http://sourceforge.net/p/mingw/mingw-org-wsl/ci/master/tree/src/libcrt/misc/getopt.c?format=raw' | |
97 $(PATCH) -p0 < getopt.diff | |
98 | 91 |
99 getopt.obj: getopt.c getopt.h | 92 getopt.obj: getopt.c getopt.h |
100 cl -nologo -O2 -MD -I. -c $< -Fo$@ | 93 cl -nologo -O2 -MD -I. -c $< -Fo$@ |
101 | 94 |
102 getopt.lib: getopt.obj | 95 posixcompat.lib: dirent.obj wdirent.obj getopt.obj |
103 lib -out:$@ $^ | 96 lib -out:$@ $^ |
104 | 97 |
105 compat/mingwcompat.lib: | 98 compat/mingwcompat.lib: |
106 $(MAKE) -C compat | 99 $(MAKE) -C compat |
107 | 100 |
181 $(INSTALL) stdbool.h $(DESTDIR)/include | 174 $(INSTALL) stdbool.h $(DESTDIR)/include |
182 $(INSTALL) dirent.h $(DESTDIR)/include | 175 $(INSTALL) dirent.h $(DESTDIR)/include |
183 $(INSTALL) getopt.h $(DESTDIR)/include | 176 $(INSTALL) getopt.h $(DESTDIR)/include |
184 $(INSTALL) math/msvcmath.h $(DESTDIR)/include/math.h | 177 $(INSTALL) math/msvcmath.h $(DESTDIR)/include/math.h |
185 $(INSTALL) -d $(DESTDIR)/lib | 178 $(INSTALL) -d $(DESTDIR)/lib |
186 $(INSTALL) dirent.lib $(DESTDIR)/lib | 179 $(INSTALL) posixcompat.lib $(DESTDIR)/lib |
187 $(INSTALL) getopt.lib $(DESTDIR)/lib | |
188 $(INSTALL) compat/mingwcompat.lib $(DESTDIR)/lib | 180 $(INSTALL) compat/mingwcompat.lib $(DESTDIR)/lib |
189 $(INSTALL) math/msvcmath.lib $(DESTDIR)/lib | 181 $(INSTALL) math/msvcmath.lib $(DESTDIR)/lib |
190 $(INSTALL) gfortran-msvc.lib $(DESTDIR)/lib | 182 $(INSTALL) gfortran-msvc.lib $(DESTDIR)/lib |
191 $(INSTALL) gfortran-msvc-static.lib $(DESTDIR)/lib | 183 $(INSTALL) gfortran-msvc-static.lib $(DESTDIR)/lib |
192 $(INSTALL) -d $(CMAKE_DESTDIR)/Modules/Platform | 184 $(INSTALL) -d $(CMAKE_DESTDIR)/Modules/Platform |