diff --git a/Makefile b/Makefile index b7e31d3a5..596ef0526 100644 --- a/Makefile +++ b/Makefile @@ -80,7 +80,7 @@ codegen: $(QJSC) $(QJSC) -e -o gen/hello.c examples/hello.js $(QJSC) -e -o gen/hello_module.c -m examples/hello_module.js $(QJSC) -e -o gen/test_fib.c -M examples/fib.so,fib -m examples/test_fib.js - $(QJSC) -C -ss -o gen/builtin-array-fromasync.h builtin-array-fromasync.js + $(QJSC) -C -ss -o builtin-array-fromasync.h builtin-array-fromasync.js debug: BUILD_TYPE=Debug $(MAKE) diff --git a/amalgam.js b/amalgam.js index e69cf89f6..87b0e8876 100644 --- a/amalgam.js +++ b/amalgam.js @@ -18,7 +18,7 @@ const quickjs_libc_h = loadFile("quickjs-libc.h") const quickjs_opcode_h = loadFile("quickjs-opcode.h") const xsum_c = loadFile("xsum.c") const xsum_h = loadFile("xsum.h") -const gen_builtin_array_fromasync_h = loadFile("gen/builtin-array-fromasync.h") +const gen_builtin_array_fromasync_h = loadFile("builtin-array-fromasync.h") let source = "#if defined(QJS_BUILD_LIBC) && defined(__linux__) && !defined(_GNU_SOURCE)\n" + "#define _GNU_SOURCE\n" @@ -43,7 +43,7 @@ let source = "#if defined(QJS_BUILD_LIBC) && defined(__linux__) && !defined(_GNU source = source.replace(/#include "quickjs-atom.h"/g, quickjs_atom_h) source = source.replace(/#include "quickjs-opcode.h"/g, quickjs_opcode_h) source = source.replace(/#include "libregexp-opcode.h"/g, libregexp_opcode_h) -source = source.replace(/#include "gen\/builtin-array-fromasync.h"/g, +source = source.replace(/#include "builtin-array-fromasync.h"/g, gen_builtin_array_fromasync_h) source = source.replace(/#include "[^"]+"/g, "") writeFile(execArgv[2] ?? "quickjs-amalgam.c", source) diff --git a/gen/builtin-array-fromasync.h b/builtin-array-fromasync.h similarity index 100% rename from gen/builtin-array-fromasync.h rename to builtin-array-fromasync.h diff --git a/quickjs.c b/quickjs.c index 12e46294b..44f076317 100644 --- a/quickjs.c +++ b/quickjs.c @@ -7447,7 +7447,7 @@ int JS_IsInstanceOf(JSContext *ctx, JSValueConst val, JSValueConst obj) return JS_OrdinaryIsInstanceOf(ctx, val, obj); } -#include "gen/builtin-array-fromasync.h" +#include "builtin-array-fromasync.h" static JSValue js_bytecode_autoinit(JSContext *ctx, JSObject *p, JSAtom atom, void *opaque)