Fix -MM and -MMD options on Windows. They were not omitting files in the SWIG library as they should be

git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@11851 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
William S Fulton 2010-02-09 23:39:31 +00:00
commit 791fabbd51
2 changed files with 12 additions and 4 deletions

View file

@ -1,6 +1,10 @@
Version 1.3.41 (in progress) Version 1.3.41 (in progress)
============================ ============================
2010-02-09: wsfulton
Fix -MM and -MMD options on Windows. They were not omitting files in the SWIG library as
they should be.
2010-02-08: wsfulton 2010-02-08: wsfulton
Fix #1807329 - When Makefile dependencies are being generated using the -M family of options Fix #1807329 - When Makefile dependencies are being generated using the -M family of options
on Windows, the file paths have been corrected to use single backslashes rather than double on Windows, the file paths have been corrected to use single backslashes rather than double

View file

@ -564,7 +564,7 @@ void SWIG_getoptions(int argc, char *argv[]) {
Swig_mark_arg(i); Swig_mark_arg(i);
} else if (strcmp(argv[i], "-swiglib") == 0) { } else if (strcmp(argv[i], "-swiglib") == 0) {
if (SwigLibWin) if (SwigLibWin)
Printf(stdout, "%s\n", Char(SwigLibWin)); Printf(stdout, "%s\n", SwigLibWin);
Printf(stdout, "%s\n", SwigLib); Printf(stdout, "%s\n", SwigLib);
SWIG_exit(EXIT_SUCCESS); SWIG_exit(EXIT_SUCCESS);
} else if (strcmp(argv[i], "-o") == 0) { } else if (strcmp(argv[i], "-o") == 0) {
@ -1077,9 +1077,13 @@ int SWIG_main(int argc, char *argv[], Language *l) {
} }
List *files = Preprocessor_depend(); List *files = Preprocessor_depend();
for (int i = 0; i < Len(files); i++) { for (int i = 0; i < Len(files); i++) {
if ((depend != 2) || ((depend == 2) && (Strncmp(Getitem(files, i), SwigLib, Len(SwigLib)) != 0))) { int use_file = 1;
Printf(f_dependencies_file, "\\\n %s ", Getitem(files, i)); if (depend == 2) {
} if ((Strncmp(Getitem(files, i), SwigLib, Len(SwigLib)) == 0) || SwigLibWin && (Strncmp(Getitem(files, i), SwigLibWin, Len(SwigLibWin)) == 0))
use_file = 0;
}
if (use_file)
Printf(f_dependencies_file, "\\\n %s ", Getitem(files, i));
} }
Printf(f_dependencies_file, "\n"); Printf(f_dependencies_file, "\n");
if (f_dependencies_file != stdout) if (f_dependencies_file != stdout)