mirror of
https://github.com/ganelson/inform.git
synced 2024-06-26 04:00:43 +03:00
Fixed incremental build bug
This commit is contained in:
parent
35978b0026
commit
b5a2f39552
|
@ -28,6 +28,7 @@ linked_list *inbuild_nest_list = NULL;
|
|||
|
||||
int main(int argc, char **argv) {
|
||||
Foundation::start();
|
||||
WordsModule::start();
|
||||
HTMLModule::start();
|
||||
ArchModule::start();
|
||||
InbuildModule::start();
|
||||
|
@ -76,6 +77,7 @@ int main(int argc, char **argv) {
|
|||
ArchModule::end();
|
||||
InbuildModule::end();
|
||||
HTMLModule::end();
|
||||
WordsModule::end();
|
||||
Foundation::end();
|
||||
return 0;
|
||||
}
|
||||
|
|
|
@ -15,6 +15,7 @@ a different file inside the copy.
|
|||
@e COPY_VERTEX from 1
|
||||
@e REQUIREMENT_VERTEX
|
||||
@e FILE_VERTEX
|
||||
@e GHOST_VERTEX
|
||||
|
||||
=
|
||||
typedef struct build_vertex {
|
||||
|
@ -67,6 +68,13 @@ build_vertex *Graphs::req_vertex(inbuild_requirement *R) {
|
|||
return V;
|
||||
}
|
||||
|
||||
build_vertex *Graphs::ghost_vertex(text_stream *S) {
|
||||
build_vertex *V = Graphs::file_vertex(NULL);
|
||||
V->type = GHOST_VERTEX;
|
||||
V->annotation = Str::duplicate(S);
|
||||
return V;
|
||||
}
|
||||
|
||||
void Graphs::need_this_to_build(build_vertex *from, build_vertex *to) {
|
||||
if (from == NULL) internal_error("no from");
|
||||
if (to == NULL) internal_error("no to");
|
||||
|
@ -104,6 +112,7 @@ void Graphs::describe_r(OUTPUT_STREAM, int depth, build_vertex *V,
|
|||
case COPY_VERTEX: Copies::write_copy(T, V->buildable_if_copy); break;
|
||||
case REQUIREMENT_VERTEX: Requirements::write(T, V->findable); break;
|
||||
case FILE_VERTEX: WRITE("%f", V->buildable_if_internal_file); break;
|
||||
case GHOST_VERTEX: WRITE("(%S)", V->annotation); break;
|
||||
}
|
||||
TEMPORARY_TEXT(S);
|
||||
WRITE_TO(S, "%p", stem);
|
||||
|
@ -133,6 +142,7 @@ void Graphs::describe_vertex(OUTPUT_STREAM, build_vertex *V) {
|
|||
case COPY_VERTEX: WRITE("[c%d]", V->allocation_id); break;
|
||||
case REQUIREMENT_VERTEX: WRITE("[r%d]", V->allocation_id); break;
|
||||
case FILE_VERTEX: WRITE("[f%d]", V->allocation_id); break;
|
||||
case GHOST_VERTEX: WRITE("[g%d]", V->allocation_id); break;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -194,7 +204,7 @@ int Graphs::build(OUTPUT_STREAM, build_vertex *V, build_methodology *meth) {
|
|||
int Graphs::rebuild(OUTPUT_STREAM, build_vertex *V, build_methodology *meth) {
|
||||
return Graphs::build_r(OUT, BUILD_GB + FORCE_GB, V, meth);
|
||||
}
|
||||
int trace_ibg = FALSE;
|
||||
int trace_ibg = TRUE;
|
||||
int Graphs::build_r(OUTPUT_STREAM, int gb, build_vertex *V, build_methodology *meth) {
|
||||
if (trace_ibg) { WRITE_TO(STDOUT, "Build: "); Graphs::describe(STDOUT, V, FALSE); }
|
||||
|
||||
|
|
|
@ -11,7 +11,13 @@ void InblorbSkill::create(void) {
|
|||
}
|
||||
|
||||
int InblorbSkill::inblorb_via_shell(build_skill *skill, build_step *S, text_stream *command, build_methodology *meth) {
|
||||
if (command == NULL) internal_error("not available in-app");
|
||||
WRITE_TO(command, "echo 'Not done yet'");
|
||||
inform_project *project = ProjectBundleManager::from_copy(S->associated_copy);
|
||||
if (project == NULL) project = ProjectFileManager::from_copy(S->associated_copy);
|
||||
if (project == NULL) internal_error("no project");
|
||||
|
||||
Shell::quote_file(command, meth->to_inblorb);
|
||||
filename *blurb = Filenames::in_folder(S->associated_copy->location_if_path, I"Release.blurb");
|
||||
Shell::quote_file(command, blurb);
|
||||
Shell::quote_file(command, S->vertex->buildable_if_internal_file);
|
||||
return TRUE;
|
||||
}
|
||||
|
|
|
@ -265,8 +265,7 @@ void Projects::construct_build_target(inform_project *project, target_vm *VM,
|
|||
int releasing, int compile_only) {
|
||||
pathname *build_folder = Projects::build_pathname(project);
|
||||
|
||||
filename *memory_F = Filenames::in_folder(build_folder, I"memory.interb");
|
||||
build_vertex *inter_V = Graphs::file_vertex(memory_F);
|
||||
build_vertex *inter_V = Graphs::ghost_vertex(I"binary inter in memory");
|
||||
Graphs::need_this_to_build(inter_V, project->as_copy->vertex);
|
||||
BuildSteps::attach(inter_V, compile_using_inform7_skill,
|
||||
Inbuild::nest_list(), releasing, VM, NULL, project->as_copy);
|
||||
|
@ -291,6 +290,7 @@ void Projects::construct_build_target(inform_project *project, target_vm *VM,
|
|||
filename *blorbed_F = Filenames::in_folder(build_folder, story_file_leafname2);
|
||||
DISCARD_TEXT(story_file_leafname2);
|
||||
project->blorbed_vertex = Graphs::file_vertex(blorbed_F);
|
||||
project->blorbed_vertex->force_this = TRUE;
|
||||
Graphs::need_this_to_build(project->blorbed_vertex, project->unblorbed_vertex);
|
||||
BuildSteps::attach(project->blorbed_vertex, package_using_inblorb_skill,
|
||||
Inbuild::nest_list(), releasing, VM, NULL, project->as_copy);
|
||||
|
|
Loading…
Reference in a new issue