Skip to content

Commit

Permalink
When compiling libs, we only keep the exported values to avoid recurs…
Browse files Browse the repository at this point in the history
…ive includes.

Now even on nested use of libraries we only keep one copy.
  • Loading branch information
Oblivious-Oblivious committed Apr 22, 2024
1 parent 07228d8 commit c235663
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/emeralds/commands/Init.cr
Original file line number Diff line number Diff line change
Expand Up @@ -251,7 +251,7 @@ class Emeralds::Init < Emeralds::Command
data << "#define __#{name.gsub("-", "_").upcase}_SPEC_H_\n\n";

data << "#include \"../src/#{name}.h\"\n";
data << "#include \"../libs/cSpec/export/cSpec.h\"\n\n";
data << "#include \"../libs/cSpec/cSpec.h\"\n\n";

data << "#endif\n";
end
Expand Down
3 changes: 3 additions & 0 deletions src/emeralds/extensions/Command+install.cr
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,9 @@ abstract class Emeralds::Command
`rm -rf .git*`;
`em install`;
`em build lib release`;
`find . -mindepth 1 -not -path "./export*" -exec rm -rf {} +`;
`mv ./export/* ./`;
`rm -rf export`;
Dir.cd "../../";
end
end

0 comments on commit c235663

Please sign in to comment.