Files
oot/tools
Anghelo Carvajal bc6d153a21 Allow atblgen to process sequence_order.in with empty lines in between lines for building on Macos (#2718)
The present changes are a direct copy-paste from https://github.com/zeldaret/mm/pull/1850

This fixes building on macos due to a kinda specific issue with Apple clang.

When trying to build on Macos (specifically MacOS 12, Monteray with Apple clang 13.0.0 (clang-1300.0.29.30), idk if other versions have this issue too) `make` stops with the following error from `atblgen`:
```
Failed to match line 1: ""
regexec error: "regexec() failed to match"
Error: Malformed build/n64-us/assets/audio/sequence_order.in?
```

`atblgen` makes the assumption that the `sequence_order.in` file has no extra data, spaces, empty lines, etc. but the file somehow ends up having empty lines between each line on macos.

This file is created by using the C preprocessor to process `include/tables/sequence_table.h`.
In normal circumstances this file should look like this snip,
```
(Sequence_0,NA_BGM_GENERAL_SFX)
(Sequence_1,NA_BGM_AMBIENCE)
(Sequence_2,NA_BGM_TERMINA_FIELD)
(Sequence_3,NA_BGM_CHASE)
(Sequence_4,NA_BGM_MAJORAS_THEME)
```
but it ends up looking like this instead
```
(Sequence_0,NA_BGM_GENERAL_SFX)

(Sequence_1,NA_BGM_AMBIENCE)

(Sequence_2,NA_BGM_TERMINA_FIELD)

(Sequence_3,NA_BGM_CHASE)

(Sequence_4,NA_BGM_MAJORAS_THEME)
```
which `atblgen` doesn't like.

I believe this happens because there are lines with comments between each macro in [`sequence_table.h`](https://github.com/zeldaret/mm/blob/0877ce4adf28a8e73e05c3c58682273b8bf28749/include/tables/sequence_table.h) and for some reason this Apple clang version decided to preserve those empty lines

The fix just makes `atblgen` skip empty lines.

I threw `atblgen` to valgrind to check the fix was working as intended and noted a bunch of memory that was being free before exit, so I fixed them.

I also noted the tools/audio makefile was not using `OPTFLAGS` when building those tools, so I fixed that too.
2026-03-09 21:04:17 +01:00
..
2025-01-22 13:42:19 -05:00
2020-03-17 16:33:41 -04:00
2024-02-02 16:34:20 -05:00
2024-12-27 10:34:45 -05:00
2026-02-15 08:49:46 +01:00
2026-03-02 16:45:07 +01:00
2022-01-23 18:09:02 -05:00
2025-05-18 01:29:09 +02:00
2024-12-25 12:07:08 -05:00
2026-02-22 19:08:12 +01:00
2026-02-22 19:08:12 +01:00
2025-05-18 01:29:09 +02:00
2020-03-17 00:31:30 -04:00
2024-12-25 12:07:08 -05:00
2020-03-17 00:31:30 -04:00
2022-10-15 01:40:00 -04:00
2020-07-16 21:37:53 -04:00
2020-03-17 00:31:30 -04:00
2022-01-23 18:09:02 -05:00