Skip to content

Commit

Permalink
Fix Mongoose and Frozen include paths
Browse files Browse the repository at this point in the history
In preparation for making moving to lib.
Reduce amount of makefile copypasta a bit.

CL: none

PUBLISHED_FROM=70a016491f9605e37708385bdd698f48a8d64119
  • Loading branch information
Deomid Ryabkov authored and cesantabot committed Mar 28, 2018
1 parent 0a90cab commit 132ecbe
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/common/platforms/esp8266/esp_crypto.c
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
#include <stdint.h>
#include <stdlib.h>

#include "mongoose/mongoose.h"
#include "mongoose.h"

#ifdef RTOS_SDK
#include "esp_libc.h"
Expand Down
9 changes: 6 additions & 3 deletions tools/amalgam.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@
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):
Expand Down Expand Up @@ -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):
Expand Down

0 comments on commit 132ecbe

Please sign in to comment.