build: Remove redundant -I options from AM_CPPFLAGS.

https://www.gnu.org/software/automake/manual/html_node/Program-Variables.html
documents that -I. -I$(srcdir) and -I$(top_builddir) (for config.h)
are already part of Automake's $(DEFAULT_INCLUDES), which is used
before $(AM_CPPFLAGS).

* gettext-runtime/src/Makefile.am (AM_CPPFLAGS): Remove redundant -I options.
* gettext-tools/gnulib-lib/Makefile.am (AM_CPPFLAGS): Likewise.
* gettext-tools/libgettextpo/Makefile.am (AM_CPPFLAGS): Likewise.
* gettext-tools/libgrep/Makefile.am (AM_CPPFLAGS): Likewise.
* gettext-tools/src/Makefile.am (AM_CPPFLAGS): Likewise.
* gettext-tools/system-tests/Makefile.am (AM_CPPFLAGS): Likewise.
* gettext-tools/tests/Makefile.am (AM_CPPFLAGS): Likewise.
* libtextstyle/adhoc-tests/Makefile.am (AM_CPPFLAGS): Likewise.
* libtextstyle/lib/Makefile.am (AM_CPPFLAGS): Likewise.
* gettext-runtime/intl/Makefile.am (AM_CPPFLAGS): Add comment.
* gettext-runtime/libasprintf/Makefile.am (AM_CPPFLAGS): Likewise.
This commit is contained in:
Bruno Haible 2023-10-01 20:16:36 +02:00
parent 599c8ac2b5
commit 1123b123dd
11 changed files with 32 additions and 17 deletions

View File

@ -31,6 +31,8 @@ DISTCLEANFILES =
MAINTAINERCLEANFILES =
SUFFIXES =
# Note that Automake's $(DEFAULT_INCLUDES) already contains
# -I. -I$(srcdir) -I$(top_builddir).
# -DBUILDING_LIBINTL: Change expansion of LIBINTL_SHLIB_EXPORTED macro.
# -DBUILDING_LIBRARY: Change expansion of SHLIB_EXPORTED macro. We're compiling
# a library. Exporting the relevant symbols is desired.

View File

@ -28,6 +28,8 @@ MOSTLYCLEANFILES =
RM = rm -f
# Note that Automake's $(DEFAULT_INCLUDES) already contains
# -I. -I$(srcdir) -I$(top_builddir).
AM_CPPFLAGS = -Ignulib-lib -I$(srcdir)/gnulib-lib
DEFS = -DIN_LIBASPRINTF @DEFS@

View File

@ -26,9 +26,9 @@ RM = rm -f
bin_PROGRAMS = gettext ngettext envsubst
# Note that Automake's $(DEFAULT_INCLUDES) already contains
# -I. -I$(srcdir) -I$(top_builddir).
AM_CPPFLAGS = \
-I. -I$(srcdir) \
-I.. \
-I../intl -I$(srcdir)/../intl \
-I../gnulib-lib -I$(srcdir)/../gnulib-lib
DEFS = -DLOCALEDIR=$(localedir_c_make) @DEFS@

View File

@ -34,12 +34,14 @@ noinst_LTLIBRARIES =
pkgdatadir = $(datadir)/gettext
pkgdata_DATA =
# Note that Automake's $(DEFAULT_INCLUDES) already contains
# -I. -I$(srcdir) -I$(top_builddir).
AM_CPPFLAGS =
# Needed for the gnulib source code that does '#include "gettext.h"'.
AM_CPPFLAGS += -I../../gettext-runtime/intl
# Needed so that config.h and woe32dll/export.h are found.
AM_CPPFLAGS += -I$(top_builddir) -I$(top_srcdir)
# Needed so that woe32dll/export.h is found.
AM_CPPFLAGS += -I$(top_srcdir)
# Parametrization of the 'relocatable' module.
AM_CPPFLAGS += -DDEPENDS_ON_LIBICONV=1 -DDEPENDS_ON_LIBINTL=1

View File

@ -34,10 +34,11 @@ noinst_LTLIBRARIES =
nodist_noinst_HEADERS = config.h
# Note that Automake's $(DEFAULT_INCLUDES) already contains
# -I. -I$(srcdir) -I$(top_builddir).
# The option -I$(top_srcdir) is needed so that woe32dll/export.h is found.
AM_CPPFLAGS = \
-I. -I$(srcdir) \
-I.. -I$(top_srcdir) \
-I$(top_srcdir) \
-I../src -I$(top_srcdir)/src \
-I../../gettext-runtime/intl -I$(top_srcdir)/../gettext-runtime/intl

View File

@ -27,7 +27,11 @@ MAINTAINERCLEANFILES =
noinst_LIBRARIES =
AM_CPPFLAGS = -I.. -I../gnulib-lib -I$(top_srcdir)/gnulib-lib -I../../gettext-runtime/intl
# Note that Automake's $(DEFAULT_INCLUDES) already contains
# -I. -I$(srcdir) -I$(top_builddir).
AM_CPPFLAGS = \
-I../gnulib-lib -I$(top_srcdir)/gnulib-lib \
-I../../gettext-runtime/intl
# Enable more warning options in this directory.
AM_CFLAGS = @WARN_CFLAGS@

View File

@ -90,10 +90,11 @@ projectsdir = $(pkgdatadir)/projects
pkglibdir = $(libdir)/gettext
pkglibexecdir = $(libexecdir)/gettext
# Note that Automake's $(DEFAULT_INCLUDES) already contains
# -I. -I$(srcdir) -I$(top_builddir).
# The option -I$(top_srcdir) is needed so that woe32dll/export.h is found.
AM_CPPFLAGS = \
-I. -I$(srcdir) \
-I.. -I$(top_srcdir) \
-I$(top_srcdir) \
-I$(top_srcdir)/libgrep \
-I../gnulib-lib -I$(top_srcdir)/gnulib-lib \
-I../../gettext-runtime/intl -I$(top_srcdir)/../gettext-runtime/intl

View File

@ -1,5 +1,5 @@
## Makefile for the gettext-tools/system-tests subdirectory of GNU gettext
## Copyright (C) 1995-2018 Free Software Foundation, Inc.
## Copyright (C) 1995-2023 Free Software Foundation, Inc.
##
## This program is free software: you can redistribute it and/or modify
## it under the terms of the GNU General Public License as published by
@ -55,7 +55,9 @@ LOG_COMPILER = $(SHELL) $(srcdir)/run-test
# It is important that the gnulib-generated *.h files are not visible here,
# except for config.h.
AM_CPPFLAGS = -I..
# Note that Automake's $(DEFAULT_INCLUDES) already contains
# -I. -I$(srcdir) -I$(top_builddir).
AM_CPPFLAGS =
# The USE_SYSTEM_LIBINTL flag distinguishes a compilation in the system-tests/
# directory from a compilation in the tests/ directory.

View File

@ -287,8 +287,9 @@ xg-c-1.ok.po: $(top_srcdir)/src/xgettext.c $(top_srcdir)/src/msgfmt.c
$(top_srcdir)/src/xgettext.c $(top_srcdir)/src/msgfmt.c
# Auxiliary programs used by the tests.
# Note that Automake's $(DEFAULT_INCLUDES) already contains
# -I. -I$(srcdir) -I$(top_builddir).
AM_CPPFLAGS = \
-I.. \
-I../gnulib-lib -I$(top_srcdir)/gnulib-lib \
-I../../gettext-runtime/intl
DEFS = -DLOCALEDIR=$(localedir_c_make) @DEFS@

View File

@ -1,5 +1,5 @@
## Makefile for the adhoc-tests subdirectory of GNU libtextstyle.
## Copyright (C) 2019 Free Software Foundation, Inc.
## Copyright (C) 2019-2023 Free Software Foundation, Inc.
##
## This program is free software: you can redistribute it and/or modify
## it under the terms of the GNU General Public License as published by
@ -33,9 +33,9 @@ hello_SOURCES = hello.c
# Define the styles.
noinst_DATA = hello-default.css
# Note that Automake's $(DEFAULT_INCLUDES) already contains
# -I. -I$(srcdir) -I$(top_builddir).
AM_CPPFLAGS = \
-I. -I$(srcdir) \
-I.. \
-I../lib -I$(srcdir)/../lib \
-DSRCDIR=\"$(srcdir)/\"

View File

@ -36,9 +36,9 @@ nobase_nodist_include_HEADERS =
noinst_HEADERS = notinline.h
# Note that Automake's $(DEFAULT_INCLUDES) already contains
# -I. -I$(srcdir) -I$(top_builddir).
AM_CPPFLAGS = \
-I. -I$(srcdir) \
-I$(top_builddir) \
-Iglib \
-DIN_LIBTEXTSTYLE