Skip to content

Instantly share code, notes, and snippets.

@ralph-tice
Created August 22, 2013 17:55
Show Gist options
  • Save ralph-tice/6310571 to your computer and use it in GitHub Desktop.
Save ralph-tice/6310571 to your computer and use it in GitHub Desktop.
ISCABBS rant on autocruft.
Jun 4, 2007 12:38 from John Public
WORF> You just stepped in the worst pile of GNU horseshit ever to be barfed
all over the *nix world: autocruft.
The idea is this. You write your app in C. It's 99% portable. However,
different unixes have slightly different C functions, or are missing them. You
could easily workaround this with two lines of preprocessor #ifdefs, or just a
contrib/ directory for patches. Instead, you write some M4 macros to fuss with
some C headers to patch your code. Now your code is 99.1% portable. However,
different unixes have slightly different m4 variants. Damn. Now you need to
write it in bash, since everyone has bash, and you'll need a library of shell
scripts to drive the whole thing. Now your code is 99.2% portable. However,
different unixes have slightly different implementations of bash. Damn. You
have to use a paired down bottom-of-the-barrel least-common-denominator
version of 'sh' that is supported by everything. That's no fun. What if you
could write m4 that generates the archaic `sh` code? Do that. Now your code is
99.3% portable. However, nobody likes m4. You better invent a new language
specifically for your arsenal of m4-which-generates-sh. You call that ".in"
or autoconf. Now you code is 99.4% portable. However, the Makefile also
needs some customatization. You better invent another new syntax
specifically to generate the autoconf-which-generates-m4-which-generates-sh.
You call that ".am" or automake. Now your code is 99.5% portable. However,
different unixes have different linking models. Damn. You better invent some
kind of library tool which delays linking for no reason. Call that "libtool".
Only problem now is that all these generator-generators are so complex nobody
can remember which files are needed. You better write another generator which
generates all the stuff the generators need. Call that "autogen".
Now, it's all very clear. Your little C project can finally call the bcopy()
function. All you have to do now is run
autogen-which-generates-files-needed-by-automake-which-generates-an-autoconf-
script-which-calls-m4-libraries-to-generate-archaic-sh-scripts-which-
generate-a-Makefile-which-runs-libtool-which-generates-linker-IOUs-which-
eventually-can-be-used-to-call-GCC-to-link-your-C-code.
[Unix> msg #177435 (142 remaining)] Read cmd ->
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment