Skip to Main Content
Autotools
book

Autotools

by John Calcote
July 2010
Intermediate to advanced content levelIntermediate to advanced
360 pages
11h 12m
English
No Starch Press
Content preview from Autotools

Item 13: Watch Those Tab Characters!

Having made the transition to Automake, you're not using raw makefiles anymore, so why should you still care about tab characters? Remember that Makefile.am files are simply stylized makefiles. Ultimately, every line in a Makefile.am file will be either consumed directly by Automake and then transformed into true make syntax, or copied directly into the final makefile. This means that tab characters matter within Makefile.am files.

Consider this example from the Automake mailing list:

lib_LTLIBRARIES = libfoo.la
  libfoo_la_SOURCES = foo.cpp
  if WANT_BAR
❶         libfoo_la_SOURCES += a.cpp
  else
❷         libfoo_la_SOURCES += b.cpp
  endif

  AM_CPPFLAGS = -I${top_srcdir}/include
  libfoo_la_LDFLAGS = -version-info 0:0:0

I have been reading ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

GNU Autoconf, Automake, and Libtool

GNU Autoconf, Automake, and Libtool

Gary V. Vaughan, Ben Elliston, Tom Tromey, Ian Lance Taylor
Red Hat® Linux® 7 Unleashed

Red Hat® Linux® 7 Unleashed

Bill Ball, David Pitts

Publisher Resources

ISBN: 9781593272067Errata