diff --git a/aegisub/src/libauto3/auto3.c b/aegisub/src/libauto3/auto3.c index 00224077c..fcbfd3eb2 100644 --- a/aegisub/src/libauto3/auto3.c +++ b/aegisub/src/libauto3/auto3.c @@ -344,6 +344,7 @@ static int Auto3ParseConfigData(lua_State *L, struct Auto3Interpreter *script, c // Keeping this file a bit shorter: put all functions called from Lua into a separate file +#define BUILDING_AUTO3_C #include "callables.c" diff --git a/aegisub/src/libauto3/callables.c b/aegisub/src/libauto3/callables.c index c2cfa8154..41482f8d8 100644 --- a/aegisub/src/libauto3/callables.c +++ b/aegisub/src/libauto3/callables.c @@ -34,6 +34,9 @@ // // DO NOT compile this file separately! It's included as part of auto3.c +#ifndef BUILDING_AUTO3_C +# error callables.c can not be compiled separately. It is included as part of auto3.c. +#endif static struct Auto3Interpreter* GetScriptObject(lua_State *L)