- abc2midi 5.03 (April 2026): bumped #define VERSION in store.c to reflect this branch's accumulated fixes
(error exit status, missing C:/R:/X: header emission, %%MIDIdef macros allowed anywhere) plus the
build-system additions.
- Single source of truth for the package release date: the VERSION file is now consumed by both build
paths.
- CMakeLists.txt reads it via file(STRINGS VERSION ABCMIDI_VERSION ...); the previously hard-coded
project(VERSION 2026.02.24) (an unused PROJECT_VERSION) is dropped because the date format isn't
MAJOR.MINOR.PATCH.
- configure.ac uses m4_esyscmd_s([cat VERSION]) in AC_INIT, replacing the very stale hard-coded
2011-08-03.
- The two build paths remain independent — no cross-generation between CMake and autoconf.
- Test normalization fix (tests/run_test.cmake): the version-banner regex now requires a capitalized month
and accepts a date with or without a day number. The previous regex was lowercase-permissive and silently
ate PostScript lines like 0.5 setlinewidth 0 0 moveto in yaps output — tests/golden/yaps_coleraine.txt is
regenerated to reflect the now-correctly-preserved PostScript.
- Docs:
- doc/CHANGES: April 25 2026 entry covering the version bump and VERSION-file unification.
- doc/readme.txt: per-tool listing updated (abc2midi 5.03 April 2026, midistats 1.03 February 20 2026
synced to source).
- doc/abc2midi.1: header label bumped to 5.03 April 2026 (content not audited).
- README.md: new Maintainers / releasing section documenting the release procedure, including the
requirement to run autoreconf -f so the committed configure picks up the new AC_INIT arguments.
* abc2midi: allow %%MIDIdef macros to be defined anywhere
Fix also some lost CHANGES from previous commit.
abc2midi: allow %%MIDIdef macros to be defined anywhere, including before the first X: field (outside any tune). Previously %%MIDIdef was only handled inside event_specific() after the started_parsing check,so macros defined in the file header were silently ignored.
The %%MIDIdef handling has been moved before the started_parsing check in event_specific() in store.c since macro definitions are context-independent.
* Update the golden test files since X:, R: and C: are now emitted
* Add configuration for CMake build system alongside autoconf
- Add a modern CMake build system (`CMakeLists.txt`, `CMakePresets.json`) that coexists with the legacy
autoconf/Makefile build
- Shared source files (`midifile.c`, `parseabc.c`, `music_utils.c`, `parser2.c`) are compiled once via OBJECT
libraries and linked into the 8 binaries
- Three presets: `default` (Release), `debug`, `sanitize` (ASan + UBSan)
- Generates `compile_commands.json` for clangd/LSP editor support
- Install rules match the legacy Makefile (binaries, doc files, man pages)
- Pinned to `-std=gnu89` because the codebase mixes K&R `()` and ANSI typed prototypes — in C23/gnu23 (GCC 15+
default), `()` means `(void)`, making these a hard error. Note: **the existing autoconf build is also broken with
GCC 15** for the same reason
```sh
cmake --preset debug
cmake --build --preset debug
cmake --install build/debug --prefix /usr/local
Documentation
- README.md: added Building section with both autoconf and CMake instructions
- doc/readme.txt: added build instructions in the existing preamble
- doc/CHANGES: added changelog entry
Test plan
- All 3 presets configure and build with GCC 15
- Smoke test: abc2midi samples/coleraine.abc produces valid MIDI through mftext
- Sanitizer build (--preset sanitize) runs clean on sample files
- Install layout verified: 8 binaries, 10 doc files, 8 man pages in correct paths
- Build on macOS (untested, should work with AppleClang)
* Implement basic testing infrastructure
The CMake build includes a test suite covering all 8 programs:
- **Smoke tests** verify each binary runs cleanly with `-ver`.
- **Golden-file tests** run each program on a sample input and compare the
(normalized) output to a checked-in reference. Binary MIDI outputs are
piped through `mftext` to produce diffable text. Volatile lines (version
banners, dates, temporary paths) are stripped before comparison.
```sh
ctest --preset debug
ctest --preset debug -L golden
ctest --preset debug -L smoke
```
To regenerate the golden files after an intentional behavioural change,
review the diff, then commit:
```sh
cmake --build build/debug --target update-golden
git diff tests/golden/
```
* Factorize more the test CMake code
* Add GitHub Action to run the CI and output a status badge
* Add GitHub Action workflow dispatch to allow running from the UI
---------
Co-authored-by: Seymour Shlien <fy733@ncf.ca>
* Add configuration for CMake build system alongside autoconf
- Add a modern CMake build system (`CMakeLists.txt`, `CMakePresets.json`) that coexists with the legacy
autoconf/Makefile build
- Shared source files (`midifile.c`, `parseabc.c`, `music_utils.c`, `parser2.c`) are compiled once via OBJECT
libraries and linked into the 8 binaries
- Three presets: `default` (Release), `debug`, `sanitize` (ASan + UBSan)
- Generates `compile_commands.json` for clangd/LSP editor support
- Install rules match the legacy Makefile (binaries, doc files, man pages)
- Pinned to `-std=gnu89` because the codebase mixes K&R `()` and ANSI typed prototypes — in C23/gnu23 (GCC 15+
default), `()` means `(void)`, making these a hard error. Note: **the existing autoconf build is also broken with
GCC 15** for the same reason
```sh
cmake --preset debug
cmake --build --preset debug
cmake --install build/debug --prefix /usr/local
Documentation
- README.md: added Building section with both autoconf and CMake instructions
- doc/readme.txt: added build instructions in the existing preamble
- doc/CHANGES: added changelog entry
Test plan
- All 3 presets configure and build with GCC 15
- Smoke test: abc2midi samples/coleraine.abc produces valid MIDI through mftext
- Sanitizer build (--preset sanitize) runs clean on sample files
- Install layout verified: 8 binaries, 10 doc files, 8 man pages in correct paths
- Build on macOS (untested, should work with AppleClang)
* Implement basic testing infrastructure
The CMake build includes a test suite covering all 8 programs:
- **Smoke tests** verify each binary runs cleanly with `-ver`.
- **Golden-file tests** run each program on a sample input and compare the
(normalized) output to a checked-in reference. Binary MIDI outputs are
piped through `mftext` to produce diffable text. Volatile lines (version
banners, dates, temporary paths) are stripped before comparison.
```sh
ctest --preset debug
ctest --preset debug -L golden
ctest --preset debug -L smoke
```
To regenerate the golden files after an intentional behavioural change,
review the diff, then commit:
```sh
cmake --build build/debug --target update-golden
git diff tests/golden/
```
* Factorize more the test CMake code
* Add GitHub Action to run the CI and output a status badge
* Add GitHub Action workflow dispatch to allow running from the UI
* Now abc2midi exits 1 if an error occurs
Before it was always returning 0, hiding failures complicated to track in
complex build systems.
* Output missing C:, R: and X: headers as MIDI text meta-events
* Update changelog and comments
---------
Co-authored-by: Seymour Shlien <fy733@ncf.ca>
- Add a modern CMake build system (`CMakeLists.txt`, `CMakePresets.json`) that coexists with the legacy
autoconf/Makefile build
- Shared source files (`midifile.c`, `parseabc.c`, `music_utils.c`, `parser2.c`) are compiled once via OBJECT
libraries and linked into the 8 binaries
- Three presets: `default` (Release), `debug`, `sanitize` (ASan + UBSan)
- Generates `compile_commands.json` for clangd/LSP editor support
- Install rules match the legacy Makefile (binaries, doc files, man pages)
- Pinned to `-std=gnu89` because the codebase mixes K&R `()` and ANSI typed prototypes — in C23/gnu23 (GCC 15+
default), `()` means `(void)`, making these a hard error. Note: **the existing autoconf build is also broken with
GCC 15** for the same reason
```sh
cmake --preset debug
cmake --build --preset debug
cmake --install build/debug --prefix /usr/local
Documentation
- README.md: added Building section with both autoconf and CMake instructions
- doc/readme.txt: added build instructions in the existing preamble
- doc/CHANGES: added changelog entry
Test plan
- All 3 presets configure and build with GCC 15
- Smoke test: abc2midi samples/coleraine.abc produces valid MIDI through mftext
- Sanitizer build (--preset sanitize) runs clean on sample files
- Install layout verified: 8 binaries, 10 doc files, 8 man pages in correct paths
- Build on macOS (untested, should work with AppleClang)
Co-authored-by: Seymour Shlien <fy733@ncf.ca>
* Add configuration for CMake build system alongside autoconf
- Add a modern CMake build system (`CMakeLists.txt`, `CMakePresets.json`) that coexists with the legacy
autoconf/Makefile build
- Shared source files (`midifile.c`, `parseabc.c`, `music_utils.c`, `parser2.c`) are compiled once via OBJECT
libraries and linked into the 8 binaries
- Three presets: `default` (Release), `debug`, `sanitize` (ASan + UBSan)
- Generates `compile_commands.json` for clangd/LSP editor support
- Install rules match the legacy Makefile (binaries, doc files, man pages)
- Pinned to `-std=gnu89` because the codebase mixes K&R `()` and ANSI typed prototypes — in C23/gnu23 (GCC 15+
default), `()` means `(void)`, making these a hard error. Note: **the existing autoconf build is also broken with
GCC 15** for the same reason
```sh
cmake --preset debug
cmake --build --preset debug
cmake --install build/debug --prefix /usr/local
Documentation
- README.md: added Building section with both autoconf and CMake instructions
- doc/readme.txt: added build instructions in the existing preamble
- doc/CHANGES: added changelog entry
Test plan
- All 3 presets configure and build with GCC 15
- Smoke test: abc2midi samples/coleraine.abc produces valid MIDI through mftext
- Sanitizer build (--preset sanitize) runs clean on sample files
- Install layout verified: 8 binaries, 10 doc files, 8 man pages in correct paths
- Build on macOS (untested, should work with AppleClang)
* Implement basic testing infrastructure
The CMake build includes a test suite covering all 8 programs:
- **Smoke tests** verify each binary runs cleanly with `-ver`.
- **Golden-file tests** run each program on a sample input and compare the
(normalized) output to a checked-in reference. Binary MIDI outputs are
piped through `mftext` to produce diffable text. Volatile lines (version
banners, dates, temporary paths) are stripped before comparison.
```sh
ctest --preset debug
ctest --preset debug -L golden
ctest --preset debug -L smoke
```
To regenerate the golden files after an intentional behavioural change,
review the diff, then commit:
```sh
cmake --build build/debug --target update-golden
git diff tests/golden/
```
* Factorize more the test CMake code
* Add -PMAR option to output `P:` information as MIDI part meta-event
* Update man page and comments
* Add the instance number of a part like `Part T-4`
This allows better tracking of parts played more than once with complex `P:`
header.
* Updated CHANGES file and added author change comments in the code