From 40f4d2b2b90eb6f12d17307ca80f0da9eef97f51 Mon Sep 17 00:00:00 2001 From: Ivan Baravy Date: Wed, 5 Jun 2019 01:08:02 +0000 Subject: [PATCH] cmm: Add dirname of the input file to include path. git-svn-id: svn://kolibrios.org@7668 a494cfbc-eb01-0410-851d-a64ba20cac60 --- programs/develop/cmm/main.cpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/programs/develop/cmm/main.cpp b/programs/develop/cmm/main.cpp index 3333020b52..cae1780d71 100644 --- a/programs/develop/cmm/main.cpp +++ b/programs/develop/cmm/main.cpp @@ -315,6 +315,13 @@ int i; printf("Bad input file extension '%s'.",rawext); exit(e_badinputfilename); } + // Add dirname of the input file to include path. + char *slash_idx = strrchr((char*)rawfilename, DIV_FOLD); + if (slash_idx) { + *slash_idx = '\0'; + IncludePath((char*)rawfilename); + *slash_idx = DIV_FOLD; + } } void compile()