Commit 132ecbec authored by Deomid Ryabkov's avatar Deomid Ryabkov Committed by Cesanta Bot

Fix Mongoose and Frozen include paths

In preparation for making moving to lib.
Reduce amount of makefile copypasta a bit.

CL: none

PUBLISHED_FROM=70a016491f9605e37708385bdd698f48a8d64119
parent 0a90cab4
......@@ -7,7 +7,7 @@
#include <stdint.h>
#include <stdlib.h>
#include "mongoose/mongoose.h"
#include "mongoose.h"
#ifdef RTOS_SDK
#include "esp_libc.h"
......
......@@ -57,7 +57,7 @@ parser.add_argument('--norel', action='store_true',
help="do not try to compute a friendly relative path")
parser.add_argument('--exportable-headers', dest="export", action='store_true',
help='allow exporting internal headers')
parser.add_argument('-I', default=".", dest='include_path', help='include path')
parser.add_argument('-I', default=['.'], dest='include_path', help='include path', action='append')
parser.add_argument('sources', nargs='*', help='sources')
class File(object):
......@@ -97,10 +97,13 @@ def resolve(path, parent_name):
elif path_from_parent != None and os.path.exists(path_from_parent):
p = path_from_parent
else:
p = os.path.join(args.include_path, path)
for ip in args.include_path:
p = os.path.join(ip, path)
if os.path.exists(p):
break
if os.path.exists(p) and not args.norel:
p = os.path.realpath(p).replace('%s%s' % (os.getcwd(), os.sep), '')
# print >>sys.stderr, '%s -> %s (cwd %s)' % (path, p, os.getcwd())
# print >>sys.stderr, '%s %s -> %s (cwd %s)' % (path, parent_name, p, os.getcwd())
return p.replace(os.sep, '/')
def emit_line_directive(out, name, parent_name):
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment