]> git.ipfire.org Git - thirdparty/gettext.git/commitdiff
build: Remove redundant -I options from AM_CPPFLAGS.
authorBruno Haible <bruno@clisp.org>
Sun, 1 Oct 2023 18:16:36 +0000 (20:16 +0200)
committerBruno Haible <bruno@clisp.org>
Fri, 6 Oct 2023 14:25:03 +0000 (16:25 +0200)
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.

gettext-runtime/intl/Makefile.am
gettext-runtime/libasprintf/Makefile.am
gettext-runtime/src/Makefile.am
gettext-tools/gnulib-lib/Makefile.am
gettext-tools/libgettextpo/Makefile.am
gettext-tools/libgrep/Makefile.am
gettext-tools/src/Makefile.am
gettext-tools/system-tests/Makefile.am
gettext-tools/tests/Makefile.am
libtextstyle/adhoc-tests/Makefile.am
libtextstyle/lib/Makefile.am

index 32b26b46b26a71dd57a6578af1d588e1ba6f50d5..ea166277b02e50c92579817fa3c5157c7857c960 100644 (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.
index c0eb4062d3e2f25298263f4ac94fafc7ac4ae095..fa4e4e6b88c63c11c800fb29246f19025e874b20 100644 (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@
index e9974c4c28fc43632b6a5dc81074d748c4cdc2c4..f696fe94af87870c7a432e17ecf536ce9cf5e0ac 100644 (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@
index 053ba6285f3d214840fd6da4b84d9011e9564e77..6b9d43f9b135fbed5f4e30e5648afda31eee992d 100644 (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
index c823a01185788b9b78089c44a50d775d97ac2c03..0fe0995d0dac49dfa65dfc0f228897c5bccc6fac 100644 (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
 
index ea5e4f5d0273795a8f7c44b9b2d0425f27ca45c2..0d0d2b2c654d9eb2e7347bf253ba4f5c68ec5e15 100644 (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@
index 971dc6882569e9da6d8679b7c779d234fb23a1b4..ae50de135c4c20fc6c6c57dd2aa29c7770adc034 100644 (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
index 4c15ec234688ae3c48742a7e40917108a6571995..63076aee1ff9d572de888fc84234a0ab06b79999 100644 (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.
index e45042888e896bef265c5787943f575d908c663f..ce0352e731610554a7de492e4dd3310ba642c7b0 100644 (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@
index 88f3840966f88307c3ecca3327c77568abb6c839..0276137b58adc58ac568d5f83b43ee9e9f37ba61 100644 (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)/\"
 
index 74ec39b4c2fd38aad3be94181b7802445b6d381c..943bb60e348b84c8dea7835cd86534ab3dcda8f4 100644 (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