I'm porting an audio driver from ca65 to ASM6, in part so that it can be integrated with NESmaker. In the process, I've had to work around numerous limits of its macro system and what appear to be bugs in its forward reference support. I've asked a bunch of questions about ASM6, and I'm pretty sure I'll be asking more. But this question is about build systems.
On Windows, one can install pieces of the GNU operating system to gain the use of things like GCC, Bash, GNU Make, and Coreutils. Ports of GNU to Windows include Cygwin, MSYS2 (from the MinGW team), and Windows 10 WSL. In the past, I have recommended installing some form of MSYS to build my ca65-based NES projects, and nowadays I recommend obtaining Bash and Coreutils through MSYS2 as distributed by Git for Windows.
But I've been told that compared to ca65 users, ASM6 users are less likely to be willing to install a GNU environment. This goes double if they use NESmaker. Instead, they use a batch file as a makeshift build system. During the porting of this library, I have been emulating this practice by using a POSIX shell script.
One big difference between makefiles and batch files is that Make conditions each rule in a makefile on comparing the date of the source file and the date of the target. This lets Make skip a build step if the target exists and is no older than the sources. Skipping a build step is important for some of my projects, which use a somewhat CPU-intensive process to convert and compress assets other than code before the assets can be included into the code.
Is there a good way in a batch file to compare two files for existence and skip if the target file exists and is no older? Answers to a related question on Stack Overflow conclude that batch isn't fit to do this, and switching from batch to VBScript is recommended if you know the user doesn't have Make.
On the other hand, it could be the case that I am overcomplicating things, that developers on Windows who use ASM6 are willing to endure the reconversion of 100+ assets in order to make the smallest code change. Is this the case? What sort of build system do developers of nontrivial ASM6 projects actually prefer?
On Windows, one can install pieces of the GNU operating system to gain the use of things like GCC, Bash, GNU Make, and Coreutils. Ports of GNU to Windows include Cygwin, MSYS2 (from the MinGW team), and Windows 10 WSL. In the past, I have recommended installing some form of MSYS to build my ca65-based NES projects, and nowadays I recommend obtaining Bash and Coreutils through MSYS2 as distributed by Git for Windows.
But I've been told that compared to ca65 users, ASM6 users are less likely to be willing to install a GNU environment. This goes double if they use NESmaker. Instead, they use a batch file as a makeshift build system. During the porting of this library, I have been emulating this practice by using a POSIX shell script.
One big difference between makefiles and batch files is that Make conditions each rule in a makefile on comparing the date of the source file and the date of the target. This lets Make skip a build step if the target exists and is no older than the sources. Skipping a build step is important for some of my projects, which use a somewhat CPU-intensive process to convert and compress assets other than code before the assets can be included into the code.
Is there a good way in a batch file to compare two files for existence and skip if the target file exists and is no older? Answers to a related question on Stack Overflow conclude that batch isn't fit to do this, and switching from batch to VBScript is recommended if you know the user doesn't have Make.
On the other hand, it could be the case that I am overcomplicating things, that developers on Windows who use ASM6 are willing to endure the reconversion of 100+ assets in order to make the smallest code change. Is this the case? What sort of build system do developers of nontrivial ASM6 projects actually prefer?