Hi Matthias, If you have any suggestions on documents I can read or software I can check > to > prepare for this project I'll be glad to check them. I know texinfo is > written > in Perl and generates an AST so I'll check that. >
A Makefile.am file is really just a Makefile with embellishments. It seems like your ast would have to incorporate most of make’s syntax to work correctly. The reason Perl was chosen to begin with is because of its great text processing capabilities as, ultimately, all automake really does is copy the file directly to the output Makefile.in file, filtering out automake stuff along the way and injecting make snippets generated from the automake constructs. This may not appear obvious at first because many simpler Makefile.am files contain only automake stuff. But anything found in the Makefile.am file that automake doesn’t recognize is assumed to be proper make script and copied directly to the output file. I suggest making your ast handle non automake chunks as a specific token type designed to be passed through without modifications. Just a few thoughts for you to consider. Kind regards, John Calcote