UTOSC 2008/The Dark Art of Autotools: Difference between revisions

From Omnia
Jump to navigation Jump to search
(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...")
 
(No difference)

Latest revision as of 06:17, 9 May 2015

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