Expose CALCROOT and new SRCPATHS to build scripts
This begins to decouple the rater directory conventions using an incremental approach, defaulting to the existing structure. Not all things were modified (for example, cleaning will not work properly with a custom SRCPATHS if those directories do not exist); WIP. * build-aux/Makefile.am (path_dsl): Use `CALCROOT'. (suppliers.mk): Test for existence of program.dep and c1map directory before acting on them. * build-aux/m4/calcdsl.m4: Default SRCPATHS. Output it during configure. Expose CALCROOT and SRCPATHS using AC_SUBST. Invoke suppmk-gen using SRCPATHS. * build-aux/suppmk-gen: Use arguments (SRCPATHS) in place of hard-coded paths.master
parent
5cb78cc47d
commit
62089877b2
|
@ -21,7 +21,7 @@
|
|||
path_rates := $(path_suppliers)/rates
|
||||
path_map := map
|
||||
path_c1map := $(path_map)/c1
|
||||
path_dsl := rater
|
||||
path_dsl := $(CALCROOT)
|
||||
path_tame := $(path_dsl)/tame
|
||||
path_ui := ui
|
||||
path_tests := test
|
||||
|
@ -189,9 +189,9 @@ clean:
|
|||
# an explanation
|
||||
suppliers.mk:
|
||||
$(ant) pkg-dep
|
||||
mv $(path_ui)/program.dep $(path_ui)/package-dfns.dep
|
||||
./rater/tame/build-aux/gen-make common/ $(path_suppliers)/ $(path_dsl)/ $(path_map)/ $(path_ui)/ >$@
|
||||
./rater/tame/build-aux/gen-c1make $(path_c1map)/*.xml >>$@
|
||||
test ! -f $(path_ui)/program.dep || mv $(path_ui)/program.dep $(path_ui)/package-dfns.dep
|
||||
$(path_dsl)/tame/build-aux/gen-make $(SRCPATHS) > $@
|
||||
test ! -d $(path_c1map) || $(path_dsl)/tame/build-aux/gen-c1make $(path_c1map)/*.xml >> $@
|
||||
|
||||
program-data-copy: standalones program-ui c1map .version.xml
|
||||
mkdir -p "$(path_lv)/src/node/program/rater/programs/@program@"
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
# Common build configuration for TAME-based build systems
|
||||
#
|
||||
# Copyright (C) 2017 R-T Specialty, LLC.
|
||||
# Copyright (C) 2017, 2018 R-T Specialty, 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
|
||||
|
@ -49,6 +49,13 @@ AS_IF([test "$ANT"],,
|
|||
# Automake runs before shell is available, thus the separate m4 variable
|
||||
CALCROOT="m4_defn(`calc_root')"
|
||||
|
||||
# Default source paths for BC
|
||||
test -n "$SRCPATHS" || SRCPATHS='common/ suppliers/ map/ ui/ rater/'
|
||||
AC_MSG_NOTICE([using source paths: $SRCPATHS])
|
||||
|
||||
AC_SUBST([CALCROOT], [$CALCROOT])
|
||||
AC_SUBST([SRCPATHS], [$SRCPATHS])
|
||||
|
||||
# Checks to ensure that dslc is built, and gives instructions on how to
|
||||
# build it otherwise. We do not want to build that for them---that can be
|
||||
# added to a bootstrap script, but isn't permissible in build scripts.
|
||||
|
@ -79,7 +86,7 @@ AC_OUTPUT
|
|||
|
||||
# we want this to run as part of the configure script, not during M4
|
||||
# expansion
|
||||
"$CALCROOT/build-aux/suppmk-gen"
|
||||
"$CALCROOT/build-aux/suppmk-gen" $SRCPATHS
|
||||
|
||||
AC_MSG_NOTICE([complete
|
||||
|
||||
|
|
|
@ -27,7 +27,7 @@ while read csv; do
|
|||
csvbase="${csv%%.*}"
|
||||
echo "$csvbase.xmlo: $csvbase.xml"
|
||||
echo "$csvbase.xml: $csvbase.csvo"
|
||||
done < <( find suppliers common -regex '^.+\.csv.?$' ) \
|
||||
done < <( find "$@" -regex '^.+\.csv.?$' ) \
|
||||
>> suppliers.mk
|
||||
|
||||
while read tdat; do
|
||||
|
@ -35,6 +35,6 @@ while read tdat; do
|
|||
echo "$tbase.xmlo: $tbase.xml rater/core/tdat.xmlo"
|
||||
echo "$tbase.xml: $tdat"
|
||||
echo -e "\trater/tools/tdat2xml \$< > \$@"
|
||||
done < <( find suppliers common -regex '^.+territories/.+\.dat$' ) \
|
||||
done < <( find "$@" -regex '^.+territories/.+\.dat$' ) \
|
||||
>> suppliers.mk
|
||||
|
||||
|
|
Loading…
Reference in New Issue