by michipili · 11y ago · 0 comments
1) It currently supports M4 and provided that there is a simple rule to infer the name of the preprocessed file from the name of the unprocessed file, it would be easy to add another one, see [1].
It is also possible to support more complicated source generation tools, like literate programming tool. We currently have support for noweb [2] which could be used to derive more.
[1] https://github.com/michipili/bsdowl/blob/master/bps/bps.m4.mk
[2] https://github.com/michipili/bsdowl/blob/master/bps/bps.noweb.mk
2) I would say, they are not difficult to write, but these are Makefile, and programming Makefiles is a mindset on its own, because we never write the “glorious high-level procedure doing plop-plop fuzz-fuzz on all our files” but just move from one step to the other and must save all state in inodes. :) The folder `bps` contains code which is shared by all frameworks (langc, texmf, ocaml, script).3, 4) The system supports two variables ARCHITECTURE and CONFIGURATION which are used to selectively include a configuration file to tweak flags (like debugging, profiling, cross-compiler chain and the like) and which can be used to tweak the directory where compilation products are stored. Once it is setup it just looks like
bmake ARCHITECTURE=Mingw32
bmake ARCHITECTURE=Native CONFIGURATION=Release
You can see a small example in the example/langc/heat directory [3] [3] https://github.com/michipili/bsdowl/tree/master/example/langc/heat[1] https://github.com/muellermichel/Hybrid-Fortran
edit: Ah there is something I missed though: BSD Make only will probably be an issue. My stuff mostly has to work on HPC GPU clusters which are pretty much exclusively Linux based, so GNU Make support is a must I think. Do you have any plans on supporting this so it becomes portable to Linux?
If you look for a more engineered installation solution, give a try to PKGSRC, which is the (portable) ports tree of NetBSD – though I never used it intensively. This even used to work in a (now obsolete) Unix-like environment on windows.
When you'll find time to experiment with the Makefiles, feel free to get in touch (my email is in the source, or with the issue tracker) I will be happy to help.
https://github.com/michipili/anvil/blob/master/subr/anvil_travisci_autoinstall.sh
It will install both of them under ~/.local, so that you need to tweak your path accordingly, but you can choose another prefix with the `-p` flag, like sh anvil_travisci_autoinstall.sh -p "${HOME}"
If you want to customise it, you can trim most of the script (autoinstall_opam*) because you do not need this. :) And if you need something more specific, just ping me on the issue tracker for instance. :)