From d94dc663529b4e05ec1e7c47c1e73310abb1d3b4 Mon Sep 17 00:00:00 2001 From: Ben Pfaff Date: Sun, 11 Oct 2009 14:07:00 -0700 Subject: [PATCH] Use @VARIABLE@ instead of $(VARIABLE) consistently in Makefiles. The $(VARIABLE) syntax is usually preferred, because it is possible for the user to override it at "make" time, whereas @VARIABLE@ is hardwired at "configure" time. There was some discussion of this on bug-gnulib@gnu.org: http://comments.gmane.org/gmane.comp.lib.gnulib.bugs/18588 The summary is that Bruno Haible sometimes prefers @VARIABLE@ but most others generally prefer $(VARIABLE), for the reason given above. --- Makefile.am | 2 +- doc/automake.mk | 2 +- src/automake.mk | 4 ++-- src/libpspp/automake.mk | 6 +++--- src/ui/gui/automake.mk | 2 +- src/ui/terminal/automake.mk | 2 +- tests/automake.mk | 30 +++++++++++++++--------------- 7 files changed, 24 insertions(+), 24 deletions(-) diff --git a/Makefile.am b/Makefile.am index e937fa7b..b3ebdad0 100644 --- a/Makefile.am +++ b/Makefile.am @@ -26,7 +26,7 @@ endif $(all_q_sources:.q=.c): src/language/lexer/q2c$(EXEEXT_FOR_BUILD) all_q_sources = -pkgsysconfdir = $(sysconfdir)/@PACKAGE@ +pkgsysconfdir = $(sysconfdir)/$(PACKAGE) EXTRA_DIST = OChangeLog ONEWS config.rpath pspp-mode.el diff --git a/doc/automake.mk b/doc/automake.mk index d1475c4c..26ff4e65 100644 --- a/doc/automake.mk +++ b/doc/automake.mk @@ -46,7 +46,7 @@ EXTRA_DIST += doc/pspp.man \ doc/ni.texi: $(top_srcdir)/src/language/command.def doc/get-commands.pl @$(MKDIR_P) doc - @PERL@ $(top_srcdir)/doc/get-commands.pl $(top_srcdir)/src/language/command.def > $@ + $(PERL) $(top_srcdir)/doc/get-commands.pl $(top_srcdir)/src/language/command.def > $@ doc/tut.texi: @$(MKDIR_P) doc diff --git a/src/automake.mk b/src/automake.mk index 56f75904..46e0ef73 100644 --- a/src/automake.mk +++ b/src/automake.mk @@ -14,7 +14,7 @@ lib_LTLIBRARIES = src/libpspp-core.la src/libpspp.la src_libpspp_core_la_SOURCES = -src_libpspp_core_la_LDFLAGS = -release @VERSION@ +src_libpspp_core_la_LDFLAGS = -release $(VERSION) src_libpspp_core_la_LIBADD = \ src/data/libdata.la \ @@ -24,7 +24,7 @@ src_libpspp_core_la_LIBADD = \ src_libpspp_la_SOURCES = -src_libpspp_la_LDFLAGS = -release @VERSION@ +src_libpspp_la_LDFLAGS = -release $(VERSION) src_libpspp_la_LIBADD = \ src/language/liblanguage.la \ diff --git a/src/libpspp/automake.mk b/src/libpspp/automake.mk index 7cd5bbfa..746756d8 100644 --- a/src/libpspp/automake.mk +++ b/src/libpspp/automake.mk @@ -92,9 +92,9 @@ src/libpspp/version.c: $(top_srcdir)/AUTHORS Makefile echo "\$$VERSION='$(VERSION_FOR_PERL)';" >> $@ echo "*/" >> $@ echo "#include \"version.h\"" >> $@ - echo "const char bare_version[] = \"@VERSION@\";" >> $@ - echo "const char version[] = \"GNU @PACKAGE@ @VERSION@\";" >> $@ - echo "const char stat_version[] = \"GNU @PACKAGE@ @VERSION@ \ + echo "const char bare_version[] = \"$(VERSION)\";" >> $@ + echo "const char version[] = \"GNU $(PACKAGE) $(VERSION)\";" >> $@ + echo "const char stat_version[] = \"GNU $(PACKAGE) $(VERSION) \ (`date`).\";" >> $@ echo "const char host_system[] = \"$(host_triplet)\";" >> $@ echo "const char build_system[] = \"$(build_triplet)\";" >> $@ diff --git a/src/ui/gui/automake.mk b/src/ui/gui/automake.mk index 19e5bdd6..a52f2802 100644 --- a/src/ui/gui/automake.mk +++ b/src/ui/gui/automake.mk @@ -26,7 +26,7 @@ src_ui_gui_psppire_LDADD = \ src/libpspp.la \ src/libpspp-core.la \ $(GTK_LIBS) \ - @LIBINTL@ + $(LIBINTL) src_ui_gui_psppiredir = $(pkgdatadir) diff --git a/src/ui/terminal/automake.mk b/src/ui/terminal/automake.mk index 0bfa32cc..9cde11c9 100644 --- a/src/ui/terminal/automake.mk +++ b/src/ui/terminal/automake.mk @@ -27,7 +27,7 @@ src_ui_terminal_pspp_LDADD = \ src/libpspp-core.la \ $(NCURSES_LIBS) \ $(LIBICONV) \ - @LIBINTL@ @LIBREADLINE@ + $(LIBINTL) $(LIBREADLINE) src_ui_terminal_pspp_LDFLAGS = $(PSPP_LDFLAGS) $(PG_LDFLAGS) diff --git a/tests/automake.mk b/tests/automake.mk index 0e13a387..a95bf3e5 100644 --- a/tests/automake.mk +++ b/tests/automake.mk @@ -1,7 +1,7 @@ ## Process this file with automake to produce Makefile.in -*- makefile -*- TESTS_ENVIRONMENT = top_srcdir='$(top_srcdir)' top_builddir='$(top_builddir)' -TESTS_ENVIRONMENT += PERL='@PERL@' PG_CONFIG='@PG_CONFIG@' +TESTS_ENVIRONMENT += PERL='$(PERL)' PG_CONFIG='$(PG_CONFIG)' # Allow locale_charset to find charset.alias before running "make install". TESTS_ENVIRONMENT += CHARSETALIASDIR='$(abs_top_builddir)/gl' @@ -206,7 +206,7 @@ check_PROGRAMS += \ tests_data_datasheet_test_SOURCES = \ tests/data/datasheet-test.c -tests_data_datasheet_test_LDADD = gl/libgl.la src/libpspp-core.la @LIBINTL@ +tests_data_datasheet_test_LDADD = gl/libgl.la src/libpspp-core.la $(LIBINTL) tests_data_datasheet_test_CFLAGS = $(AM_CFLAGS) # This seems to be necessary as the libtool artifacts aren't removed @@ -220,7 +220,7 @@ tests_libpspp_ll_test_SOURCES = \ src/libpspp/ll.c \ src/libpspp/ll.h \ tests/libpspp/ll-test.c -tests_libpspp_ll_test_LDADD = gl/libgl.la @LIBINTL@ +tests_libpspp_ll_test_LDADD = gl/libgl.la $(LIBINTL) tests_libpspp_ll_test_CFLAGS = $(AM_CFLAGS) tests_libpspp_llx_test_SOURCES = \ @@ -229,7 +229,7 @@ tests_libpspp_llx_test_SOURCES = \ src/libpspp/llx.c \ src/libpspp/llx.h \ tests/libpspp/llx-test.c -tests_libpspp_llx_test_LDADD = gl/libgl.la @LIBINTL@ +tests_libpspp_llx_test_LDADD = gl/libgl.la $(LIBINTL) tests_libpspp_llx_test_CFLAGS = $(AM_CFLAGS) tests_libpspp_heap_test_SOURCES = \ @@ -238,14 +238,14 @@ tests_libpspp_heap_test_SOURCES = \ src/libpspp/pool.c \ src/libpspp/pool.h \ tests/libpspp/heap-test.c -tests_libpspp_heap_test_LDADD = gl/libgl.la @LIBINTL@ +tests_libpspp_heap_test_LDADD = gl/libgl.la $(LIBINTL) tests_libpspp_heap_test_CPPFLAGS = $(AM_CPPFLAGS) -DASSERT_LEVEL=10 tests_libpspp_hmap_test_SOURCES = \ src/libpspp/hmap.c \ src/libpspp/hmap.h \ tests/libpspp/hmap-test.c -tests_libpspp_hmap_test_LDADD = gl/libgl.la @LIBINTL@ +tests_libpspp_hmap_test_LDADD = gl/libgl.la $(LIBINTL) tests_libpspp_hmap_test_CPPFLAGS = $(AM_CPPFLAGS) -DASSERT_LEVEL=10 tests_libpspp_hmapx_test_SOURCES = \ @@ -254,14 +254,14 @@ tests_libpspp_hmapx_test_SOURCES = \ src/libpspp/hmapx.c \ src/libpspp/hmapx.h \ tests/libpspp/hmapx-test.c -tests_libpspp_hmapx_test_LDADD = gl/libgl.la @LIBINTL@ +tests_libpspp_hmapx_test_LDADD = gl/libgl.la $(LIBINTL) tests_libpspp_hmapx_test_CPPFLAGS = $(AM_CPPFLAGS) -DASSERT_LEVEL=10 tests_libpspp_abt_test_SOURCES = \ src/libpspp/abt.c \ src/libpspp/abt.h \ tests/libpspp/abt-test.c -tests_libpspp_abt_test_LDADD = gl/libgl.la @LIBINTL@ +tests_libpspp_abt_test_LDADD = gl/libgl.la $(LIBINTL) tests_libpspp_abt_test_CPPFLAGS = $(AM_CPPFLAGS) -DASSERT_LEVEL=10 tests_libpspp_bt_test_SOURCES = \ @@ -277,7 +277,7 @@ tests_libpspp_range_map_test_SOURCES = \ src/libpspp/range-map.c \ src/libpspp/range-map.h \ tests/libpspp/range-map-test.c -tests_libpspp_range_map_test_LDADD = gl/libgl.la @LIBINTL@ +tests_libpspp_range_map_test_LDADD = gl/libgl.la $(LIBINTL) tests_libpspp_range_map_test_CPPFLAGS = $(AM_CPPFLAGS) -DASSERT_LEVEL=10 tests_libpspp_range_set_test_SOURCES = \ @@ -288,12 +288,12 @@ tests_libpspp_range_set_test_SOURCES = \ src/libpspp/range-set.c \ src/libpspp/range-set.h \ tests/libpspp/range-set-test.c -tests_libpspp_range_set_test_LDADD = gl/libgl.la @LIBINTL@ +tests_libpspp_range_set_test_LDADD = gl/libgl.la $(LIBINTL) tests_libpspp_range_set_test_CPPFLAGS = $(AM_CPPFLAGS) -DASSERT_LEVEL=10 tests_libpspp_str_test_SOURCES = \ tests/libpspp/str-test.c -tests_libpspp_str_test_LDADD = src/libpspp/libpspp.la gl/libgl.la @LIBINTL@ +tests_libpspp_str_test_LDADD = src/libpspp/libpspp.la gl/libgl.la $(LIBINTL) tests_libpspp_tower_test_SOURCES = \ src/libpspp/abt.c \ @@ -303,7 +303,7 @@ tests_libpspp_tower_test_SOURCES = \ src/libpspp/tower.c \ src/libpspp/tower.h \ tests/libpspp/tower-test.c -tests_libpspp_tower_test_LDADD = gl/libgl.la @LIBINTL@ +tests_libpspp_tower_test_LDADD = gl/libgl.la $(LIBINTL) tests_libpspp_tower_test_CPPFLAGS = $(AM_CPPFLAGS) -DASSERT_LEVEL=10 tests_libpspp_sparse_array_test_SOURCES = \ @@ -312,7 +312,7 @@ tests_libpspp_sparse_array_test_SOURCES = \ src/libpspp/pool.c \ src/libpspp/pool.h \ tests/libpspp/sparse-array-test.c -tests_libpspp_sparse_array_test_LDADD = gl/libgl.la @LIBINTL@ +tests_libpspp_sparse_array_test_LDADD = gl/libgl.la $(LIBINTL) tests_libpspp_sparse_array_test_CPPFLAGS = $(AM_CPPFLAGS) -DASSERT_LEVEL=10 tests_libpspp_sparse_xarray_test_SOURCES = \ @@ -327,7 +327,7 @@ tests_libpspp_sparse_xarray_test_SOURCES = \ src/libpspp/pool.c \ src/libpspp/tmpfile.c \ tests/libpspp/sparse-xarray-test.c -tests_libpspp_sparse_xarray_test_LDADD = gl/libgl.la @LIBINTL@ +tests_libpspp_sparse_xarray_test_LDADD = gl/libgl.la $(LIBINTL) tests_libpspp_sparse_xarray_test_CPPFLAGS = $(AM_CPPFLAGS) -DASSERT_LEVEL=10 tests_formats_inexactify_SOURCES = tests/formats/inexactify.c @@ -337,7 +337,7 @@ tests_dissect_sysfile_SOURCES = \ src/libpspp/integer-format.c \ src/libpspp/float-format.c \ tests/dissect-sysfile.c -tests_dissect_sysfile_LDADD = gl/libgl.la @LIBINTL@ +tests_dissect_sysfile_LDADD = gl/libgl.la $(LIBINTL) tests_dissect_sysfile_CPPFLAGS = $(AM_CPPFLAGS) -DINSTALLDIR=\"$(bindir)\" EXTRA_DIST += \ -- 2.30.2