Skip to content

Commit

Permalink
Statically replace *.inc includes with contents in packed cc-runtime
Browse files Browse the repository at this point in the history
  • Loading branch information
mintsuki committed Jul 25, 2024
1 parent 416e071 commit a4baa8c
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion .github/workflows/pack.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,10 @@ jobs:
- name: Pack cc-runtime
run: |
set -e
cat assembly.h int_endianness.h int_types.h int_lib.h int_util.h *.inc *.c > /tmp/cc-runtime.c
cat assembly.h int_endianness.h int_types.h int_lib.h int_util.h *.c > /tmp/cc-runtime.c
for f in *.inc; do
sed -i "/#include \"$f\"/{r $f;d}" /tmp/cc-runtime.c
done
grep '#include <' /tmp/cc-runtime.c > /tmp/saved-includes
sed -i '/#include/d' /tmp/cc-runtime.c
cat /tmp/saved-includes /tmp/cc-runtime.c > /tmp/cc-runtime.c.tmp
Expand Down

0 comments on commit a4baa8c

Please sign in to comment.