From 80a61986bdce60c17676ba0681476a20c9737686 Mon Sep 17 00:00:00 2001 From: Mike Gerwitz Date: Mon, 22 Feb 2021 12:38:38 -0500 Subject: [PATCH] build-aux/m4/calcdsl.m4: Do not generate suppliers.mk This will be generated automatically by the Makefile. It's not appropriate to generate in the configure script, and I do not recall why I did so---possibly to work around the issue of delayed tab completion when it needs regeneration? This removes suppmk-gen in favor of more generic Makefile targets---in this case, having `%.tdat` depend upon `rater/core/tdat.xml`, even though that's not quite true (the %.xml file generated from it needs it). But these files are going away soon; a pending TAME optimization branch removes support for the underlying pattern primitive entirely; CSVMs should be used instead. --- RELEASES.md | 3 +++ build-aux/Makefile.am | 4 +++- build-aux/m4/calcdsl.m4 | 8 -------- build-aux/suppmk-gen | 42 ----------------------------------------- 4 files changed, 6 insertions(+), 51 deletions(-) delete mode 100755 build-aux/suppmk-gen diff --git a/RELEASES.md b/RELEASES.md index f0caaec5..147b13c5 100644 --- a/RELEASES.md +++ b/RELEASES.md @@ -23,6 +23,9 @@ Build System ------------ - Only modify `.version.xml` timestamp when hash changes. This allows its use as a dependency without forcefully rebuilding each and every time. +- `configure` will no longer immediately generate `suppliers.mk`. + - Additionally, `build-aux/suppmk-gen`, which `configure` directly invoked + until now, was removed in favor of generic rules in `Makefile.am`. v17.7.0 (2020-12-09) diff --git a/build-aux/Makefile.am b/build-aux/Makefile.am index 5482c3f9..583c39e6 100644 --- a/build-aux/Makefile.am +++ b/build-aux/Makefile.am @@ -170,7 +170,9 @@ c1map: $(dest_c1map) %.svg: %.dot dot -Tsvg "$<" > "$@" -%.xml: %.dat +# These are deprecated and will be removed in a future version of TAME (in +# favor of CSVM tables). +%.xml: %.dat rater/core/tdat.xmlo rater/tools/tdat2xml $< > $@ %.xml: %.typelist diff --git a/build-aux/m4/calcdsl.m4 b/build-aux/m4/calcdsl.m4 index a329df8e..c8c2b421 100644 --- a/build-aux/m4/calcdsl.m4 +++ b/build-aux/m4/calcdsl.m4 @@ -88,11 +88,3 @@ AC_CONFIG_FILES(Makefile:m4_defn(`calc_root')/build-aux/Makefile.in) # Generate configure script AC_OUTPUT - -# we want this to run as part of the configure script, not during M4 -# expansion -"$CALCROOT/build-aux/suppmk-gen" $SRCPATHS || exit - -AC_MSG_NOTICE([complete - -You may now run `make` to build.]) diff --git a/build-aux/suppmk-gen b/build-aux/suppmk-gen deleted file mode 100755 index 347828be..00000000 --- a/build-aux/suppmk-gen +++ /dev/null @@ -1,42 +0,0 @@ -#!/bin/bash -# Configuration script to be run before `make' -# -# Copyright (C) 2014-2020 Ryan Specialty Group, LLC. -# -# 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 -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program. If not, see . -## - -set -euo pipefail - -echo "Generating suppliers.mk..." -# TODO: kluge; do properly. -rm -f suppliers.mk -make suppliers.mk - -# XXX: paths are hard-coded here! -while read csv; do - csvbase="${csv%%.*}" - echo "$csvbase.xmlo: $csvbase.xml" - echo "$csvbase.xml: $csvbase.csvo" -done < <( find "$@" -regex '^.+\.csv.?$' ) \ - >> suppliers.mk - -while read tdat; do - tbase="${tdat%%.*}" - echo "$tbase.xmlo: $tbase.xml rater/core/tdat.xmlo" - echo "$tbase.xml: $tdat" - echo -e "\trater/tools/tdat2xml \$< > \$@" -done < <( find "$@" -regex '^.+territories/.+\.dat$' ) \ - >> suppliers.mk -