On Mon, May 29, 2017 at 01:58:41PM +0000, rain1_AT_openmailbox.org wrote:
> one of the most widely reported sources of suck are the autotools that gives
> you the (in)ability to compile programs from source. ./configure, automake,
> autoconf, autoreconf, m4, intltool, libtoolize, etc.
>
> the best practice used in suckless projects is generally to have a main
> makefile that imports a config.mk that allows for customization. Still
> people created tools like scons, cmake, waf, boost build, raft, rebar, rake
> and more. I have often heard it reported that working with these is worse
> than simply using makefiles, it certainly requires extra dependencies.
>
> The reason people want these build systems despite the suckless approach
> working so well is they want config.mk to be filled in automatically (based
> on which libraries are available on the system and similar).
>
> Here's how a suckless configure tool could subsume all the GNU autotools
> stuff in a fraction of the code without giving any control over build
> configuration up:
>
> There would be a single tool 'slconfigure' which is able to parse a standard
> format for config.mk files. It will parse these in to know what can be
> configured then it will process the command lines args to allow
> customization, it can automatically detect which libraries are needed based
> on the options inside config.mk and then it will overwrite the config.mk
> file.
>
> So to build a project you go slconfigure ; make ; make install. If you
> wanted to edit the config.mk file manually (like we have been doing) you
> would simply not invoke (maybe not even install slconfigure) just run make.
>
> All the old GNU software could be patched to use this new build system
> format and the autoreconf stuff deleted.
>
Hey,
If dynamic configure options are really needed just name the script
"configure".
Often it is not needed and an example Makefile can be copied to your project
and modified a little.
Also the use of #ifdefs should be considered carefully.
--
Kind regards,
Hiltjo
Received on Mon May 29 2017 - 17:34:24 CEST