UTOSC 2008/The Dark Art of Autotools

From Omnia
Revision as of 06:17, 9 May 2015 by Kenneth (talk | contribs) (Created page with " autoscan creates: autoscan.log configure.scan Need to add to configure.scan AM_INIT_AUTOMAKE([-Wall -Werror foreign]) The foreign option says this does not have all the...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

autoscan creates:

autoscan.log
configure.scan

Need to add to configure.scan

AM_INIT_AUTOMAKE([-Wall -Werror foreign])

The foreign option says this does not have all the GNU needed files (ie. README)

rename configure.scan configure.ac

Makefile.am

SUBDIRS = . src

src/Makefile.am

bin_PROGRAMS = ntime
ntime_SOURCES = ntime.c ntime_ui.c ntime_ui.h
  1. library example

lib/Makefile.am

noinst_LIBRARIES = libntime_ui.a
libntime_ui_a_SOURCES = ntime_ui.c ntime_ui.h

ntime_LDADD = ../lib/libntime_ui.a
ntime_CPPFLAGS = -I../lib

A tool to run all the tools:

# first time
autoreconf -i
# or
autoreconf --install
# repeated use
autocreconf
# needs Makefile.am, autoscan.log and configure.scan

Create tar ball, and verify

make distcheck