Ken Thomases : makedep: Add support for Objective-C . m files and #import directive.

Alexandre Julliard julliard at winehq.org
Wed Dec 26 14:05:17 CST 2012


Module: wine
Branch: master
Commit: dd2f2e4ee582a825632d43b753f62c33ecbdf299
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=dd2f2e4ee582a825632d43b753f62c33ecbdf299

Author: Ken Thomases <ken at codeweavers.com>
Date:   Thu Dec 20 19:02:20 2012 -0600

makedep: Add support for Objective-C .m files and #import directive.

---

 tools/makedep.c |    6 ++++--
 1 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/tools/makedep.c b/tools/makedep.c
index 2d3e5b4..c70b5a9 100644
--- a/tools/makedep.c
+++ b/tools/makedep.c
@@ -653,8 +653,9 @@ static void parse_c_file( INCL_FILE *pFile, FILE *file )
         while (*p && isspace(*p)) p++;
         if (*p++ != '#') continue;
         while (*p && isspace(*p)) p++;
-        if (strncmp( p, "include", 7 )) continue;
-        p += 7;
+        if (!strncmp( p, "include", 7 )) p += 7;
+        else if (!strncmp( p, "import", 6 )) p += 6;
+        else continue;
         while (*p && isspace(*p)) p++;
         if (*p != '\"' && *p != '<' ) continue;
         quote = *p++;
@@ -805,6 +806,7 @@ static void parse_file( INCL_FILE *pFile, int src )
     else if (strendswith( pFile->filename, ".idl" ))
         parse_idl_file( pFile, file, 0 );
     else if (strendswith( pFile->filename, ".c" ) ||
+             strendswith( pFile->filename, ".m" ) ||
              strendswith( pFile->filename, ".h" ) ||
              strendswith( pFile->filename, ".l" ) ||
              strendswith( pFile->filename, ".y" ))




More information about the wine-cvs mailing list