News for hackers. Stuff that matters.
Re:How to Write Portable C Without Complicating Your Build by tannhaeuser on Friday March 31, 2017 @06:58AM (#14002589)
I wish standard (POSIX) Make would be sufficient but it frequently isn't. While some Make features from GNU and BSD Make made it into the POSIX spec (such as "include"), I frequently find myself desiring a more orthogonal facility to integrate output of external programs into Make builds. That is, by using POSIX Make's "VAR=`cmd`" syntax with backtick-quoted commands (or other shell evaluation syntax), you can define macros programmatically for incorporation into build rules as lazily evaluated text substitution variables, but you can use those only in build rules rather than in requisites or targets (where they get interpreted verbatim). A partial solution would be adopting GNU Make's eager evaluation syntax (VAR:=`...`) into POSIX.

OTOH, while I'm not a big fan of autotools internals (especially libtool), being able to run "./configure && make install" on tens of thousands of F/OSS packages is something I'd hate to loose. In fact, the extreme consistency in installation procedures (including use of pkg_conf etc.) and discipline in directory layout accross so many F/OSS packages is something I very much admire, given it's an unexpected outcome of a "Bazaar" style development model.

Re:How to Write Portable C Without Complicating Your Build by dTal on Friday March 31, 2017 @12:11PM (#14005197)
>"./configure && make install"

You forgot 'make'!

I'm tempted to turn this into a cheap shot about how the consistency obviously isn't worth much, but I won't.

Re:How to Write Portable C Without Complicating Your Build by dfox on Friday March 31, 2017 @01:05PM (#14005775)
Explicitly doing 'make' is redundant for makefiles generated by any version of automake I've ever used. Dependencies are setup correctly so that install also builds everything that it installs and isn't already uptodate (I'm not sure whether 'install' also explicitly depends on 'all')
Re:How to Write Portable C Without Complicating Your Build by derefr on Friday March 31, 2017 @03:07PM (#14007089)
The usual reason to separate them is that if you're installing to a prefix that needs root privileges to write to, then you'll be doing something like:

    ./configure && make && sudo make install
If you do this instead:

    ./configure && sudo make install
...then the compiler toolchain gets invoked as root and all the intermediate build products end up owned by root.
Re:How to Write Portable C Without Complicating Your Build by xtreme on Saturday April 01, 2017 @02:29AM (#14010841)
There is another reason. `make -j4 && make install' would be faster than just `make install' (multi-process vs. single-process).
Re:How to Write Portable C Without Complicating Your Build by atso on Saturday April 01, 2017 @07:05AM (#14011550)
You can do `make -j4 install`. Works as intended.