fixed site building on linux this time -- trying windows again next

master
Allen Webster 2016-11-14 02:13:27 -05:00
parent 34e61be6ce
commit b9fb560948
5 changed files with 24 additions and 4 deletions

BIN
4coder_custom.so Executable file

Binary file not shown.

View File

@ -11,6 +11,9 @@ debug: ../build/build
package: FLAGS += -DPACKAGE
package: ../build/build
site: FLAGS += -DSITE_BUILD
site: ../build/build
../build/build: $(CPP_FILES) $(C_FILES) $(H_FILES)
g++ $(WARNINGS) $(FLAGS) build.cpp -g -o $@
../build/build

View File

@ -454,6 +454,7 @@ enum{
OPTIMIZATION = 0x100,
KEEP_ASSERT = 0x200,
SITE_INCLUDES = 0x400,
NORMAL_SELF_INCLUDES = 0x800,
};
@ -590,6 +591,9 @@ build_cl(uint32_t flags, char *code_path, char *code_file, char *out_path, char
#define GCC_INCLUDES \
"-I../foreign"
#define GCC_NORMAL_SELF_INCLUDES \
"-I../code"
#define GCC_SITE_INCLUDES \
"-I../../code"
@ -623,6 +627,10 @@ build_gcc(uint32_t flags, char *code_path, char *code_file, char *out_path, char
#endif
}
if (flags & NORMAL_SELF_INCLUDES){
build_ap(line, GCC_NORMAL_SELF_INCLUDES);
}
if (flags & SITE_INCLUDES){
build_ap(line, GCC_SITE_INCLUDES);
}
@ -839,7 +847,7 @@ static void
metagen(char *cdir){
{
BEGIN_TIME_SECTION();
build(OPTS | DEBUG_INFO, cdir, "4ed_metagen.cpp", META_DIR, "metagen", 0);
build(OPTS | DEBUG_INFO | NORMAL_SELF_INCLUDES, cdir, "4ed_metagen.cpp", META_DIR, "metagen", 0);
END_TIME_SECTION("build metagen");
}
@ -915,7 +923,16 @@ site_build(char *cdir, uint32_t flags){
#if defined(IS_WINDOWS)
systemf("pushd %s\\site & ..\\..\\build\\site\\sitegen .. source_material ..\\..\\site", cdir);
#else
systemf("pushd %s/site & ../../build/site/sitegen .. source_material ../../site", cdir);
char space[512];
String str = make_fixed_width_string(space);
append_sc(&str, cdir);
append_sc(&str, "/");
append_sc(&str, "site");
terminate_with_null(&str);
Temp_Dir temp = linux_pushd(str.str);
systemf("../../build/site/sitegen .. source_material ../../site");
linux_popd(temp);
#endif
END_TIME_SECTION("run metagen");

View File

@ -31,7 +31,7 @@ begin_file_out(Out_Context *out_context, char *filename, String *out){
String name = make_fixed_width_string(str_space);
if (out_context->out_directory.size > 0){
append_ss(&name, out_context->out_directory);
append_sc(&name, "\\");
append_sc(&name, "/");
}
append_sc(&name, filename);
terminate_with_null(&name);

View File

@ -293,7 +293,7 @@ generate_site(char *code_directory, char *src_directory, char *dst_directory){
end_file_out(context);
}
else{
// TODO(allen): warning
fprintf(stderr, "Failed to open %s", API_DOC);
}
}