build_all_variants.sh 3.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071
  1. #!/bin/bash
  2. mkdir artifacts
  3. mkdir artifacts/tests
  4. mkdir artifacts/mm0
  5. mkdir artifacts/ipxe
  6. mkdir artifacts/single_cream
  7. mkdir artifacts/mm0_c
  8. mkdir artifacts/full
  9. set -e
  10. rm -fr build
  11. sed -i -e 's|const TEST_ALL .|const TEST_ALL 1|' asmg/main.g
  12. sed -i -e 's|const RUN_MM0 .|const RUN_MM0 0|' asmg/main.g
  13. sed -i -e 's|const RUN_TINYCC .|const RUN_TINYCC 0|' asmg/main.g
  14. sed -i -e 's|#define RUN_IPXE .|#define RUN_IPXE 1|' diskfs/run_tcc.c
  15. sed -i -e 's|#define RUN_SINGLE_CREAM .|#define RUN_SINGLE_CREAM 0|' diskfs/run_tcc.c
  16. sed -i -e 's|#define RUN_MM0_C .|#define RUN_MM0_C 0|' diskfs/run_tcc.c
  17. make
  18. cp build/boot_asmg.x86.qcow2 build/boot_asmg_dbg.x86.qcow2 artifacts/tests
  19. rm -fr build
  20. sed -i -e 's|const TEST_ALL .|const TEST_ALL 0|' asmg/main.g
  21. sed -i -e 's|const RUN_MM0 .|const RUN_MM0 1|' asmg/main.g
  22. sed -i -e 's|const RUN_TINYCC .|const RUN_TINYCC 0|' asmg/main.g
  23. sed -i -e 's|#define RUN_IPXE .|#define RUN_IPXE 1|' diskfs/run_tcc.c
  24. sed -i -e 's|#define RUN_SINGLE_CREAM .|#define RUN_SINGLE_CREAM 0|' diskfs/run_tcc.c
  25. sed -i -e 's|#define RUN_MM0_C .|#define RUN_MM0_C 0|' diskfs/run_tcc.c
  26. make
  27. cp build/boot_asmg.x86.qcow2 build/boot_asmg_dbg.x86.qcow2 artifacts/mm0
  28. rm -fr build
  29. sed -i -e 's|const TEST_ALL .|const TEST_ALL 0|' asmg/main.g
  30. sed -i -e 's|const RUN_MM0 .|const RUN_MM0 0|' asmg/main.g
  31. sed -i -e 's|const RUN_TINYCC .|const RUN_TINYCC 1|' asmg/main.g
  32. sed -i -e 's|#define RUN_IPXE .|#define RUN_IPXE 1|' diskfs/run_tcc.c
  33. sed -i -e 's|#define RUN_SINGLE_CREAM .|#define RUN_SINGLE_CREAM 0|' diskfs/run_tcc.c
  34. sed -i -e 's|#define RUN_MM0_C .|#define RUN_MM0_C 0|' diskfs/run_tcc.c
  35. make
  36. cp build/boot_asmg.x86.qcow2 build/boot_asmg_dbg.x86.qcow2 artifacts/ipxe
  37. rm -fr build
  38. sed -i -e 's|const TEST_ALL .|const TEST_ALL 0|' asmg/main.g
  39. sed -i -e 's|const RUN_MM0 .|const RUN_MM0 0|' asmg/main.g
  40. sed -i -e 's|const RUN_TINYCC .|const RUN_TINYCC 1|' asmg/main.g
  41. sed -i -e 's|#define RUN_IPXE .|#define RUN_IPXE 0|' diskfs/run_tcc.c
  42. sed -i -e 's|#define RUN_SINGLE_CREAM .|#define RUN_SINGLE_CREAM 1|' diskfs/run_tcc.c
  43. sed -i -e 's|#define RUN_MM0_C .|#define RUN_MM0_C 0|' diskfs/run_tcc.c
  44. make
  45. cp build/boot_asmg.x86.qcow2 build/boot_asmg_dbg.x86.qcow2 artifacts/single_cream
  46. rm -fr build
  47. sed -i -e 's|const TEST_ALL .|const TEST_ALL 0|' asmg/main.g
  48. sed -i -e 's|const RUN_MM0 .|const RUN_MM0 0|' asmg/main.g
  49. sed -i -e 's|const RUN_TINYCC .|const RUN_TINYCC 1|' asmg/main.g
  50. sed -i -e 's|#define RUN_IPXE .|#define RUN_IPXE 0|' diskfs/run_tcc.c
  51. sed -i -e 's|#define RUN_SINGLE_CREAM .|#define RUN_SINGLE_CREAM 0|' diskfs/run_tcc.c
  52. sed -i -e 's|#define RUN_MM0_C .|#define RUN_MM0_C 1|' diskfs/run_tcc.c
  53. make
  54. cp build/boot_asmg.x86.qcow2 build/boot_asmg_dbg.x86.qcow2 artifacts/mm0_c
  55. rm -fr build
  56. sed -i -e 's|const TEST_ALL .|const TEST_ALL 1|' asmg/main.g
  57. sed -i -e 's|const RUN_MM0 .|const RUN_MM0 1|' asmg/main.g
  58. sed -i -e 's|const RUN_TINYCC .|const RUN_TINYCC 1|' asmg/main.g
  59. sed -i -e 's|#define RUN_IPXE .|#define RUN_IPXE 1|' diskfs/run_tcc.c
  60. sed -i -e 's|#define RUN_SINGLE_CREAM .|#define RUN_SINGLE_CREAM 0|' diskfs/run_tcc.c
  61. sed -i -e 's|#define RUN_MM0_C .|#define RUN_MM0_C 0|' diskfs/run_tcc.c
  62. make
  63. cp build/boot_asmg.x86.qcow2 build/boot_asmg_dbg.x86.qcow2 artifacts/full