News for hackers. Stuff that matters.
Re:What's in a Build Tool? by luckydude on Friday March 04, 2016 @11:50PM (#11228459)
I thought this was going to be a rant against autoconf. When that rant comes I'll post our 186 line shell script that does what autoconf does for pretty much any platform. Handles AIX, Solaris, FreeBSD, HP-UX, IRIX, Linux, NetBSD, OpenBSD, SCO, SunOS, Windows, MacOS.

I hate autoconf but that's not part of this thread. I'll wait.

Re:What's in a Build Tool? by bhaak on Saturday March 05, 2016 @06:12AM (#11229159)
Unix, Unix, Unix, Unix, Unix, Unix clone, Unix, Unix, Unix, Unix, Windows, Unix.

So, your shell script handles Unix, its most popular clone and Windows. ;-)

The Windows part is interesting. What are the requirements to run your shell script on Windows?

Re:What's in a Build Tool? by thristian on Saturday March 05, 2016 @07:45AM (#11229324)
I'm interested that you count BSD-derived OSs as "Unix" but Linux as a "Unix clone", even though they include the same amount of code from AT&T Unix (i.e. zero), and Linux and GNU have traditionally followed AT&T Unix conventions over BSD conventions.
Re:What's in a Build Tool? by danieldk on Saturday March 05, 2016 @07:58AM (#11229361)
BSD derived directly from AT&T UNIX. In fact, the last releases of BSD from Berkeley still contained substantial amounts of AT&T code. They made the Net/2 release without AT&T code, but this was not a complete system. 386BSD reimplemented most of the missing parts and modern BSDs built on that work.

tl;dr: while modern BSD does not contain AT&T UNIX code anymore, it evolved from AT&T UNIX. In contrast to Linux, it was not a clean-room implementation.

Re:What's in a Build Tool? by rat87 on Saturday March 05, 2016 @10:21AM (#11229692)
It's a ship of theseus.

If you replace the whole things step by step, each step a small one, is it still the same thing or isn't it?

Re:What's in a Build Tool? by danieldk on Saturday March 05, 2016 @01:42PM (#11230419)
The point is that it is not a clone of UNIX, it's one of the evolutionary strains of UNIX. You probably won't find substantial amounts of AT&T Research UNIX in Solaris, but it's still UNIX. The lineages of BSD and Solaris can be traced back directly to AT&T Research UNIX.
Re:What's in a Build Tool? by abiox on Saturday March 05, 2016 @02:07PM (#11230556)
it seems to me that, today, this seems perhaps more a discussion of "historical context" than material reality.

after all the evolution and adaptation that's gone on over the last couple decades i wonder if saying "bsd is unix" is any more than a notional thing.

is the linux kernel materially and substantially different from any current bsd kernels?

Re:What's in a Build Tool? by Ace17 on Saturday March 05, 2016 @04:30AM (#11228972)
I'm curious about this shell script ; this looks to good to be true!

Having automated the build of dozens of FOSS packages, I can definitely say that autoconf-based packages are _by far_ the easiest ones to build ; especially if you want to do funny stuff like out-of-tree builds or cross-compilation (can your 186-line script do this?).

Some projects (x264, ffmpeg) provide 'configure'-like custom scripts, trying to imitate what autoconf does ; but in practise you can't automate their build the same way you did with autoconf-based projects.

Re:What's in a Build Tool? by bhaak on Saturday March 05, 2016 @06:16AM (#11229169)
I see where the hate for autoconf comes from.

Properly done autoconf is very developer-friendly for building but if you have to maintain it, it can be a nightmare.

OTOH, because you can always escape to shell scripts, I usually can fix any issue that crops up.

With cmake, I regularly fail, e.g. configuring succeeds but building fails because of a missing library and because I actually have no clue what the standard approach should be (online documentation is abysmal with cmake).

Re:What's in a Build Tool? by atilaneves on Saturday March 05, 2016 @06:46AM (#11229225)
Have you tried CMake?
Re:What's in a Build Tool? by Ace17 on Saturday March 05, 2016 @01:16PM (#11230286)
Yes.

Cross-compilation of existing packets has proven to be a nightmare with cmake. I have to override manually CMAKE_C_COMPILER, CMAKE_CXX_COMPILER ...

Have a look at zenbuild, which is a toy-project of mine trying to homogeneize the build interface of many FOSS projects. Each packet get its script (ala PKGBUILD), it can be seen as a list of hacks around the quirks of each project's build system.

Projects using autoconf are a breeze to build: https://github.com/Ace17/zenbuild/blob/master/zen-libxau.sh

But projects using cmake are another story: https://github.com/Ace17/zenbuild/blob/master/zen-x265.sh

Re:What's in a Build Tool? by abiox on Saturday March 05, 2016 @02:10PM (#11230567)
i like the idea of cmake, but i thoroughly despise the pseudo-language.

i haven't used it in some time, so perhaps it's improved; but the ergonomics, documentation and developer-friendliness of it was absolutely dreadful.

Re:What's in a Build Tool? by qznc on Saturday March 05, 2016 @02:27AM (#11228776)
Why not write a preemptive blog post?
Re:What's in a Build Tool? by yeowMeng on Saturday March 05, 2016 @12:26AM (#11228545)
Can you please GNU me yr 186 lines of bytes. I am curious.