From 6db7c7d440d5971c8ad3deba08b52e6a34728541 Mon Sep 17 00:00:00 2001 From: Joachim Nilsson Date: Wed, 1 Jun 2016 07:17:46 +0200 Subject: [PATCH] Minor cleanup and simplification of build system - Move 'foreign' declaration from Makefile.am's to configure script - Move CFLAGS from configure script to src/Makefile.am - Remove faltering license blurb at top of configure script, no need for this since we a) do not care, b) falls under project license Signed-off-by: Joachim Nilsson --- Makefile.am | 7 +++---- configure.ac | 19 +------------------ examples/Makefile.am | 2 -- include/Makefile.am | 4 +--- src/Makefile.am | 4 +++- 5 files changed, 8 insertions(+), 28 deletions(-) diff --git a/Makefile.am b/Makefile.am index 9ca6216..49bf8a8 100644 --- a/Makefile.am +++ b/Makefile.am @@ -1,4 +1,3 @@ -AUTOMAKE_OPTIONS = foreign -doc_DATA = README LICENSE CHANGELOG -EXTRA_DIST = LICENSE CHANGELOG INSTALL -SUBDIRS = src include man examples +doc_DATA = README LICENSE CHANGELOG +EXTRA_DIST = LICENSE CHANGELOG INSTALL +SUBDIRS = src include man examples diff --git a/configure.ac b/configure.ac index 00b1b25..3e91f94 100644 --- a/configure.ac +++ b/configure.ac @@ -1,20 +1,5 @@ -# Minix libeditline -*- Autoconf -*- -# -# Copyright (c) 2008-2013 Joachim Nilsson -# -# Process this file with autoconf to produce a configure script. -# -# This file is free software; as a special exception the author gives -# unlimited permission to copy and/or distribute it, with or without -# modifications, as long as this notice is preserved. -# -# This program is distributed in the hope that it will be useful, but -# WITHOUT ANY WARRANTY, to the extent permitted by law; without even the -# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - -AC_PREREQ(2.61) AC_INIT(editline, 1.15.2-beta1, https://github.com/troglobit/editline/issues) -AM_INIT_AUTOMAKE([1.11 no-dist-gzip dist-xz]) +AM_INIT_AUTOMAKE([1.11 foreign no-dist-gzip dist-xz]) AM_SILENT_RULES([yes]) AC_CONFIG_MACRO_DIR([m4]) @@ -83,8 +68,6 @@ AC_ARG_ENABLE(termcap, [AS_HELP_STRING([--enable-termcap], [Use termcap library to query terminal size.])], AC_DEFINE([CONFIG_USE_TERMCAP], 1, [Define to use the termcap library for terminal size.])) -AM_CFLAGS="-std=gnu99 $inline_cflags -W -Wall -Wundef -Wunused -Wstrict-prototypes -Werror-implicit-function-declaration $nopointersign_cflags -Wshadow -Wcast-qual" -AC_SUBST(AM_CFLAGS) # Check for a termcap compatible library if enabled AS_IF([test "$enable_termcap" != no], AC_CHECK_LIB(termcap, tgetent, , [ diff --git a/examples/Makefile.am b/examples/Makefile.am index f7726bc..a4cf40f 100644 --- a/examples/Makefile.am +++ b/examples/Makefile.am @@ -1,5 +1,3 @@ -AUTOMAKE_OPTIONS = foreign - noinst_PROGRAMS = testit cli LDADD = $(top_builddir)/src/libeditline.la AM_CFLAGS = -I$(top_srcdir)/src -I$(top_srcdir)/include diff --git a/include/Makefile.am b/include/Makefile.am index fc019bb..17bdc7e 100644 --- a/include/Makefile.am +++ b/include/Makefile.am @@ -1,4 +1,2 @@ -AUTOMAKE_OPTIONS = foreign - -library_includedir=$(includedir) +library_includedir = $(includedir) library_include_HEADERS = editline.h diff --git a/src/Makefile.am b/src/Makefile.am index 47cb2fd..14fd64c 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -1,3 +1,5 @@ -AUTOMAKE_OPTIONS = foreign lib_LTLIBRARIES = libeditline.la libeditline_la_SOURCES = editline.c editline.h complete.c sysunix.c unix.h +libeditline_la_CFLAGS = -std=gnu99 +libeditline_la_CFLAGS += -W -Wall -Wundef -Wunused -Wstrict-prototypes +libeditline_la_CFLAGS += -Werror-implicit-function-declaration -Wshadow -Wcast-qual