1. 24
  1.  

  2. 0

    Save yourself the trouble and use Autotools: https://autotools.io/index.html

    1. 8

      spits out water in disbelief, record scratch to silence – the more common position that I hear is “autotools” is not very “auto”, and in fact more trouble than it’s worth.

      1. 1

        the more common position that I hear is “autotools” is not very “auto”, and in fact more trouble than it’s worth

        And it usually comes from those that never needed complicated things from their build system. The ones jumping at the chance of using some exciting new build system with a quarter of Autotools’ functionality because all they do is the simple stuff.

        Even if that’s you right now, pay some respect to the old software gods. You’re going to need them when the going gets tough.

        1. 1

          Personally, I’m in the camp of using make, and would probably reach for autotools when the going got tough. But build tools seem to be becoming as controversial, in some circles, as using C instead of the “safer” rust.

          1. 1

            Personally, I’m in the camp of using make, and would probably reach for autotools when the going got tough.

            Why not do it the right way from the start and get most of the portability for free?

          2. 1

            Autotools definately has its uses, but part of the reason for some of the new build systems is that portable sometimes means Windows (MSVC), OS X, and Linux, rather than POSIX.

            1. 2

              Autotools definately has its uses, but part of the reason for some of the new build systems is that portable sometimes means Windows (MSVC), OS X, and Linux, rather than POSIX.

              Autotools support all these operating systems: https://github.com/opentoonz/GTS/pull/4

              I did the Linux port and got an OS X port for free (and probably a Windows port through Cygwin or MinGW).

              1. 1

                While I appreciate what you are trying to say, I stuck the MSVC after Windows because that is the reality that many Windows developers have to deal with. Using a POSIX emulation environment like Cygwin or MSYS2 is not always an option. The OP article also mentions that if you are using Makefiles you will (most likely) need a separate one to support MSVC.

            2. 1

              I’ll ask the question I ask everytime autotools comes up: Can you name some of this functionality that autotools provides – which is actually still useful today?

              Respect is all very well, but people should know why they use the tools they use, and not just cargo cult things long after they’re obsolete.

              1. 1

                I’ll ask the question I ask everytime autotools comes up: Can you name some of this functionality that autotools provides – which is actually still useful today?

                Here’s one for you - it makes the hard things possible. Hard things like combining Go and C code in a library: https://github.com/stefantalpalaru/golib/blob/master/Makefile.am

                1. 3

                  What is autotools doing here, as regards the problem of linking Go and C object files together, that vanilla GNU/BSD make couldn’t?

                  If you want to limit the conversation to things which produce Makefiles, such a thing is fairly easily done in cmake, too (or, in the Rust world, with cargo). And it would likely “just work” as well with cmake’s ninja generator.

                  1. 1

                    What is autotools doing here, as regards the problem of linking Go and C object files together, that vanilla GNU/BSD make couldn’t?

                    • conditional benchmark compilation if the default Go compiler is available (determined by the configure script).

                    • shared and static library creation for multiple platforms, thanks to libtool.

                    • enabling extra CFLAGS (and related features) if gcc is new enough to support them

                    such a thing is fairly easily done in cmake, too

                    Good luck with using gccgo as a compiler and passing it custom flags. You’ll probably end up writing one or more CMake modules.