Commit 598e96a0 authored by Sergey Lyubka's avatar Sergey Lyubka Committed by Cesanta Bot

Make amalgam work on windows

PUBLISHED_FROM=92f43c7b0a705ff40c4aea07f2ee0627f8e0e4a1
parent b5dd0e80
......@@ -99,9 +99,9 @@ def resolve(path, parent_name):
else:
p = os.path.join(args.include_path, path)
if os.path.exists(p) and not args.norel:
p = os.path.realpath(p).replace('%s/' % os.getcwd(), '')
p = os.path.realpath(p).replace('%s%s' % (os.getcwd(), os.sep), '')
# print >>sys.stderr, '%s -> %s (cwd %s)' % (path, p, os.getcwd())
return p
return p.replace(os.sep, '/')
def emit_line_directive(out, name, parent_name):
print >>out, '''#ifdef %(prefix)s_MODULE_LINES
......@@ -148,6 +148,10 @@ if args.first:
# emitting
if sys.platform == "win32":
import os, msvcrt
msvcrt.setmode(sys.stdout.fileno(), os.O_BINARY)
if args.public:
print '#include "%s"' % (args.public)
......
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