2018-07-05 16:04:33 -04:00
|
|
|
# @configure_input@
|
|
|
|
#
|
|
|
|
# TAME Makefile
|
|
|
|
#
|
2023-01-17 23:09:25 -05:00
|
|
|
# Copyright (C) 2014-2023 Ryan Specialty, LLC.
|
2018-07-05 16:04:33 -04:00
|
|
|
#
|
|
|
|
# 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 <http://www.gnu.org/licenses/>.
|
2018-10-08 23:27:02 -04:00
|
|
|
##
|
2018-07-05 16:04:33 -04:00
|
|
|
|
|
|
|
path_rates := $(path_suppliers)/rates
|
|
|
|
path_map := map
|
|
|
|
path_c1map := $(path_map)/c1
|
2018-11-08 11:05:38 -05:00
|
|
|
path_dsl := $(CALCROOT)
|
2018-10-16 22:33:04 -04:00
|
|
|
path_tame := $(path_dsl)/tame
|
2018-07-05 16:04:33 -04:00
|
|
|
path_ui := ui
|
|
|
|
path_tests := test
|
|
|
|
path_suppliers := suppliers
|
|
|
|
path_lv := lovullo
|
|
|
|
path_srv := srv
|
|
|
|
path_lvroot := lvroot
|
2018-11-28 15:55:49 -05:00
|
|
|
path_c1root := c1root
|
2018-12-18 16:40:35 -05:00
|
|
|
path_common := common
|
2018-07-05 16:04:33 -04:00
|
|
|
path_intralov_root := "intralov-root/@program@"
|
|
|
|
|
2018-10-08 23:27:02 -04:00
|
|
|
src_suppliers := $(wildcard $(path_suppliers)/*.xml)
|
|
|
|
src_map := $(wildcard $(path_map)/*.xml)
|
|
|
|
src_c1map := $(wildcard $(path_c1map)/*.xml)
|
|
|
|
|
2018-12-18 16:40:35 -05:00
|
|
|
src_common := $(shell find $(path_common) -name '*.xml')
|
|
|
|
xmlo_common := $(patsubst %.xml, %.xmlo, $(src_common))
|
|
|
|
|
2018-12-18 21:42:54 -05:00
|
|
|
# Intended to be (optionally) overridden from the command line
|
|
|
|
SUPPLIERS=$(src_suppliers) $(path_ui)/package.xml
|
|
|
|
suppliers_strip=$(patsubst %.xml, %.strip.js, $(SUPPLIERS))
|
|
|
|
|
2018-10-08 23:27:02 -04:00
|
|
|
dest_summary_html := $(patsubst \
|
|
|
|
$(path_suppliers)/%.xml, \
|
|
|
|
$(path_suppliers)/%.html, \
|
|
|
|
$(src_suppliers))
|
|
|
|
dest_standalone := $(patsubst \
|
|
|
|
$(path_suppliers)/%.xml, \
|
|
|
|
$(path_suppliers)/%.js, \
|
|
|
|
$(src_suppliers))
|
2018-10-16 22:33:04 -04:00
|
|
|
dest_standalone_strip := $(patsubst \
|
|
|
|
$(path_suppliers)/%.js, \
|
|
|
|
$(path_suppliers)/%.strip.js, \
|
|
|
|
$(dest_standalone))
|
2018-10-08 23:27:02 -04:00
|
|
|
dest_map := $(patsubst \
|
|
|
|
$(path_map)/%.xml, \
|
|
|
|
$(path_map)/%.xmle, \
|
|
|
|
$(src_map))
|
|
|
|
dest_c1map := $(patsubst \
|
|
|
|
$(path_c1map)/%.xml, \
|
|
|
|
$(path_c1map)/%.php, \
|
|
|
|
$(src_c1map))
|
|
|
|
|
2021-02-22 12:42:16 -05:00
|
|
|
# Program fragments combined to form one large program.expanded.xml
|
|
|
|
# TODO: Move into liza-proguic
|
2018-10-19 10:13:37 -04:00
|
|
|
program_fragments=$(shell \
|
|
|
|
find $(path_ui)/program/ -name '*.xml' 2>/dev/null \
|
|
|
|
| LC_ALL=C sort \
|
2018-10-19 10:38:08 -04:00
|
|
|
| tr '\n' ' ' \
|
2018-10-19 10:13:37 -04:00
|
|
|
)
|
|
|
|
|
2021-02-22 12:42:16 -05:00
|
|
|
# Packages associated with each program step.
|
|
|
|
# TODO: Move into liza-proguic
|
|
|
|
package_dfns_pkgs = $(shell \
|
|
|
|
find $(path_ui)/package/ -name 'progui-pkg-*.xml' 2>/dev/null 2>/dev/null \
|
|
|
|
| LC_ALL=C sort \
|
|
|
|
| tr '\n' ' ' \
|
|
|
|
)
|
|
|
|
package_dfns_xmlos = $(patsubst %.xml, %.xmlo, $(package_dfns_pkgs))
|
|
|
|
|
2021-02-22 16:47:07 -05:00
|
|
|
# Dependencies for suppliers.mk.
|
|
|
|
src_suppliersmk = $(src_common) \
|
|
|
|
$(shell find $(path_suppliers) ui/package ui/map rater/core -name '*.xml') \
|
|
|
|
$(program_fragments) \
|
|
|
|
ui/program.xml \
|
|
|
|
ui/package-dfns.xml
|
|
|
|
|
2018-10-08 23:27:02 -04:00
|
|
|
compiled_suppliers := $(src_suppliers:.xml=.xmlo)
|
|
|
|
linked_suppliers := $(src_suppliers:.xml=.xmle)
|
|
|
|
|
|
|
|
comma := ,
|
|
|
|
extless_supp_delim := $(subst .xml,,$(subst .xml ,$(comma),$(src_suppliers)))
|
|
|
|
|
|
|
|
ant = @ANT@ -e
|
|
|
|
|
2018-12-18 20:52:19 -05:00
|
|
|
.PHONY: FORCE default program-data-copy lvroot c1root test \
|
2018-12-18 16:40:35 -05:00
|
|
|
default clean interp-rate-tables summary-html c1map standalones common \
|
2018-10-16 22:33:04 -04:00
|
|
|
strip program-ui version FORCE
|
2018-10-08 23:27:02 -04:00
|
|
|
|
|
|
|
default: program-ui c1map FORCE
|
2018-07-05 16:04:33 -04:00
|
|
|
|
|
|
|
.DELETE_ON_ERROR:
|
|
|
|
|
2018-10-11 23:50:53 -04:00
|
|
|
# keep all intermediate files for easy introspection
|
|
|
|
.SECONDARY:
|
2018-07-05 16:04:33 -04:00
|
|
|
|
2018-12-10 10:46:31 -05:00
|
|
|
SHELL = /bin/bash -O extglob -O nullglob
|
2018-07-05 16:04:33 -04:00
|
|
|
|
2018-10-16 09:26:37 -04:00
|
|
|
# propagate to tame{,d}
|
2018-10-19 09:51:41 -04:00
|
|
|
export TAME_CMD_WAITTIME
|
2018-10-16 09:26:37 -04:00
|
|
|
export TAMED_STALL_SECONDS
|
2020-08-14 00:03:01 -04:00
|
|
|
export TAMED_JAVA_OPTS
|
tamed --report and runner status line (TAMED_TUI)
This is something that I've wanted to do for quite some time, but for good
reason, have been avoiding.
`tamed --report` is fairly basic right now, but allows you to see what each
of the runners are doing. This will be expanded further to gather data for
further analysis.
The thing that I was avoiding was a status line during the build to
summarize what the runners are doing, since it's nearly impossible to do so
from the build output with multiple runners. This will not only allow me to
debug more easily, but will keep the output plainly visible to developers at
all times in the hope that it can help them improve the build times
themselves in certain cases.
It is currently gated behind TAMED_TUI, since, while it works well overall,
it is imperfect, and will cause artifacts from build output partly
overwriting the status line, and may even occasionally clobber the PS1 by
erasing the line. This will be improved upon in the future; something is
better than nothing.
2022-01-19 11:43:10 -05:00
|
|
|
export TAMED_TUI
|
2022-01-19 16:47:12 -05:00
|
|
|
export TAMED_RUNTAB_OUT
|
2018-10-16 09:26:37 -04:00
|
|
|
|
2018-12-03 16:25:24 -05:00
|
|
|
TAMED_SPAWNER_PID=$(shell echo $$PPID)
|
|
|
|
export TAMED_SPAWNER_PID
|
|
|
|
|
2020-01-02 10:42:07 -05:00
|
|
|
# Optional timestamping for TAME commands
|
tamed --report and runner status line (TAMED_TUI)
This is something that I've wanted to do for quite some time, but for good
reason, have been avoiding.
`tamed --report` is fairly basic right now, but allows you to see what each
of the runners are doing. This will be expanded further to gather data for
further analysis.
The thing that I was avoiding was a status line during the build to
summarize what the runners are doing, since it's nearly impossible to do so
from the build output with multiple runners. This will not only allow me to
debug more easily, but will keep the output plainly visible to developers at
all times in the hope that it can help them improve the build times
themselves in certain cases.
It is currently gated behind TAMED_TUI, since, while it works well overall,
it is imperfect, and will cause artifacts from build output partly
overwriting the status line, and may even occasionally clobber the PS1 by
erasing the line. This will be improved upon in the future; something is
better than nothing.
2022-01-19 11:43:10 -05:00
|
|
|
TS = 0
|
2020-01-02 10:42:07 -05:00
|
|
|
TS_FMT=%s
|
tamed --report and runner status line (TAMED_TUI)
This is something that I've wanted to do for quite some time, but for good
reason, have been avoiding.
`tamed --report` is fairly basic right now, but allows you to see what each
of the runners are doing. This will be expanded further to gather data for
further analysis.
The thing that I was avoiding was a status line during the build to
summarize what the runners are doing, since it's nearly impossible to do so
from the build output with multiple runners. This will not only allow me to
debug more easily, but will keep the output plainly visible to developers at
all times in the hope that it can help them improve the build times
themselves in certain cases.
It is currently gated behind TAMED_TUI, since, while it works well overall,
it is imperfect, and will cause artifacts from build output partly
overwriting the status line, and may even occasionally clobber the PS1 by
erasing the line. This will be improved upon in the future; something is
better than nothing.
2022-01-19 11:43:10 -05:00
|
|
|
tamed_clear__1 = @printf '\e[2K' # clear line
|
|
|
|
tame__ts_0 = $(tamed_clear__$(TAMED_TUI)) # clear line if TUI
|
2020-01-02 10:42:07 -05:00
|
|
|
tame__ts_1 = @printf '[%($(TS_FMT))T] '
|
|
|
|
TAME_TS = $(tame__ts_$(TS))
|
|
|
|
|
2018-10-08 23:27:02 -04:00
|
|
|
all: program-data-copy
|
2018-07-05 16:04:33 -04:00
|
|
|
|
2018-12-18 16:40:35 -05:00
|
|
|
# Building all common files is useful in a distributed pipeline so that
|
|
|
|
# suppliers can be concurrently built without rebuilding common dependencies
|
|
|
|
common: $(xmlo_common)
|
|
|
|
|
2018-12-18 20:58:29 -05:00
|
|
|
program-ui: ui/package.strip.js ui/Program.js ui/html/index.phtml
|
2018-10-08 23:27:02 -04:00
|
|
|
|
2023-06-14 12:02:57 -04:00
|
|
|
# Handle an intermediate step as we transition to the new compiler.
|
|
|
|
# If a source file is paired with an `*.experimental` file with the same
|
|
|
|
# stem, then it will trigger compilation using `xmlo-experimental`. The
|
|
|
|
# file may contain additional arguments to the pass to the compiler.
|
|
|
|
%.xmli: %.xml %.experimental
|
|
|
|
$(path_tame)/tamer/target/release/tamec --emit xmlo-experimental $$(grep -v '^#' $*.experimental) -o $@ $<
|
2020-04-07 14:29:12 -04:00
|
|
|
%.xmli: %.xml
|
2020-04-08 16:28:23 -04:00
|
|
|
$(path_tame)/tamer/target/release/tamec --emit xmlo -o $@ $<
|
2020-04-07 14:29:12 -04:00
|
|
|
|
2020-05-01 13:33:41 -04:00
|
|
|
%.graphml: %.xmlo
|
|
|
|
$(TAME_TS)
|
|
|
|
$(path_tame)/tamer/target/release/tameld --emit graphml -o $@ $<
|
|
|
|
|
2020-01-02 10:42:07 -05:00
|
|
|
# Individual dependencies appear in suppliers.mk (see below)
|
2020-04-07 14:29:12 -04:00
|
|
|
%.xmlo: %.xmli $(path_tame)/.rev-xmlo
|
2020-01-02 10:42:07 -05:00
|
|
|
$(TAME_TS)
|
2022-02-28 10:04:56 -05:00
|
|
|
$(TAME) compile $< $@ $(TAME_PARAMS)
|
2020-01-02 10:42:07 -05:00
|
|
|
|
2018-10-08 23:27:02 -04:00
|
|
|
# Note the `$()' here to prevent Automake from inlining this file---it is
|
|
|
|
# to be generated when imports change, which can be at any time.
|
|
|
|
include $()suppliers.mk
|
|
|
|
|
|
|
|
summary-html: $(dest_summary_html) ;
|
|
|
|
|
2018-10-11 23:50:53 -04:00
|
|
|
%.html: %.js %.xmle
|
2020-01-02 10:42:07 -05:00
|
|
|
$(TAME_TS)
|
2022-02-28 10:04:56 -05:00
|
|
|
$(TAME) summary $*.xmle $@ $(TAME_PARAMS)
|
2018-10-08 23:27:02 -04:00
|
|
|
|
|
|
|
standalones: $(dest_standalone)
|
2018-10-16 22:33:04 -04:00
|
|
|
strip: $(dest_standalone_strip) ui/package.strip.js
|
2020-01-14 01:13:51 -05:00
|
|
|
%.xmle: %.xmlo $(path_tame)/.rev-xmle
|
2020-01-02 10:42:07 -05:00
|
|
|
$(TAME_TS)
|
2020-05-01 13:33:41 -04:00
|
|
|
$(path_tame)/tamer/target/release/tameld --emit xmle -o $@ $<
|
2018-10-08 23:27:02 -04:00
|
|
|
%.js: %.xmle
|
2020-01-02 10:42:07 -05:00
|
|
|
$(TAME_TS)
|
2022-02-28 10:04:56 -05:00
|
|
|
$(TAME) standalone $< $@ $(TAME_PARAMS)
|
2018-10-16 22:33:04 -04:00
|
|
|
%.strip.js: %.js
|
|
|
|
cp $< $@
|
|
|
|
$(path_tame)/tools/strip $@
|
2018-10-08 23:27:02 -04:00
|
|
|
|
|
|
|
# C1 XML (specific recipes are in suppliers.mk)
|
|
|
|
c1map: $(dest_c1map)
|
|
|
|
|
|
|
|
%.dot: %.xmlo
|
2020-01-02 10:42:07 -05:00
|
|
|
$(TAME_TS)
|
2022-02-28 10:04:56 -05:00
|
|
|
$(TAME) dot $< $@ $(TAME_PARAMS)
|
2018-10-08 23:27:02 -04:00
|
|
|
%.dote: %.xmle
|
2020-01-02 10:42:07 -05:00
|
|
|
$(TAME_TS)
|
2022-02-28 10:04:56 -05:00
|
|
|
$(TAME) dot $< $@ $(TAME_PARAMS)
|
2018-10-08 23:27:02 -04:00
|
|
|
|
2019-08-01 14:56:19 -04:00
|
|
|
%.neo4j: %.xmlo
|
2022-02-28 10:04:56 -05:00
|
|
|
$(TAME) neo4j $< $@ $(TAME_PARAMS)
|
2019-08-01 14:56:19 -04:00
|
|
|
%.neo4je: %.xmle
|
2022-02-28 10:04:56 -05:00
|
|
|
$(TAME) neo4j $< $@ $(TAME_PARAMS)
|
2019-08-01 14:56:19 -04:00
|
|
|
|
|
|
|
|
2018-10-08 23:27:02 -04:00
|
|
|
%.svg: %.dote
|
|
|
|
dot -Tsvg "$<" > "$@"
|
|
|
|
%.svg: %.dot
|
|
|
|
dot -Tsvg "$<" > "$@"
|
|
|
|
|
2021-02-22 12:38:38 -05:00
|
|
|
# These are deprecated and will be removed in a future version of TAME (in
|
|
|
|
# favor of CSVM tables).
|
2022-04-07 09:29:11 -04:00
|
|
|
%.xml: %.dat rater/core/tdat.xmlo rater/tools/tdat2xml
|
2018-10-08 23:27:02 -04:00
|
|
|
rater/tools/tdat2xml $< > $@
|
|
|
|
|
2022-08-22 15:29:40 -04:00
|
|
|
%.xml: %.typelist rater/tame/build-aux/list2typedef
|
2018-10-08 23:27:02 -04:00
|
|
|
rater/tame/build-aux/list2typedef $(*F) < $< > $@
|
|
|
|
|
2022-04-07 09:29:11 -04:00
|
|
|
%.csvo: %.csvm rater/tools/csvm2csv
|
2018-10-08 23:27:02 -04:00
|
|
|
rater/tools/csvm2csv $< > $@
|
2022-04-07 09:29:11 -04:00
|
|
|
%.csvo: %.csvi rater/tools/csvi
|
2018-10-08 23:27:02 -04:00
|
|
|
rater/tools/csvi $< > $@
|
|
|
|
%.csvo: %.csv
|
|
|
|
cp $< $@
|
|
|
|
|
2022-04-07 09:29:11 -04:00
|
|
|
%.xml: %.csvo rater/tools/csv2xml
|
2021-03-17 17:02:58 -04:00
|
|
|
rater/tools/csv2xml $< > $@
|
|
|
|
|
|
|
|
# All lookup tables rely on rater/core/vector/package. This rule applies to
|
|
|
|
# xmlo files only when there is a corresponding csvo file. Note that this
|
|
|
|
# relies on .SECONDARY above to work properly.
|
|
|
|
#
|
2019-04-03 15:26:22 -04:00
|
|
|
# TODO: This is necessary right now because of the current depgen
|
|
|
|
# process. Once that is eliminated in favor of individual dependency files
|
|
|
|
# (e.g. the %.d convention), this can go away since dependency generation
|
|
|
|
# can properly take place for the various file formats.
|
2021-03-17 17:02:58 -04:00
|
|
|
%.xmlo: %.csvo rater/core/vector/table.xmlo
|
2018-10-08 23:27:02 -04:00
|
|
|
|
2021-02-22 12:37:38 -05:00
|
|
|
# This target is always run, but only update the file (and thus its
|
|
|
|
# timestamp) if the hash actually changes, so that we do not rebuild any
|
|
|
|
# dependencies unnecessarily.
|
2018-10-08 23:27:02 -04:00
|
|
|
version: .version.xml
|
|
|
|
.version.xml: FORCE
|
2021-02-22 12:37:38 -05:00
|
|
|
git log HEAD^.. -1 --pretty=format:'<version>%h</version>' > $@.new
|
|
|
|
cmp $@ $@.new || mv $@.new $@
|
|
|
|
$(RM) $@.new
|
2018-10-08 23:27:02 -04:00
|
|
|
|
2021-02-22 12:42:16 -05:00
|
|
|
ui/program.expanded.xml: ui/program.xml $(program_fragments) .version.xml
|
2020-01-02 10:42:07 -05:00
|
|
|
$(TAME_TS)
|
2022-02-28 10:04:56 -05:00
|
|
|
$(TAME) progui-expand $< $@ $(TAME_PARAMS)
|
2018-10-08 23:27:02 -04:00
|
|
|
ui/Program.js: ui/program.expanded.xml ui/package.js
|
2020-01-02 10:42:07 -05:00
|
|
|
$(TAME_TS)
|
2022-02-28 10:04:56 -05:00
|
|
|
$(TAME) progui-class $< $@ include-path=$$(pwd)/ui/ $(TAME_PARAMS)
|
2018-10-08 23:27:02 -04:00
|
|
|
ui/html/index.phtml: ui/program.expanded.xml
|
2020-01-02 10:42:07 -05:00
|
|
|
$(TAME_TS)
|
2022-02-28 10:04:56 -05:00
|
|
|
$(TAME) progui-html $< $@ out-path=./ $(TAME_PARAMS)
|
2021-02-22 12:42:16 -05:00
|
|
|
ui/package-dfns.xmlo: ui/package-dfns.xml $(package_dfns_xmlos)
|
2018-10-08 23:27:02 -04:00
|
|
|
ui/package-dfns.xml: ui/program.expanded.xml
|
2020-01-02 10:42:07 -05:00
|
|
|
$(TAME_TS)
|
2022-02-28 10:04:56 -05:00
|
|
|
$(TAME) progui-pkg $< $@ $(TAME_PARAMS)
|
2021-02-22 12:42:16 -05:00
|
|
|
$(package_dfns_pkgs): ui/package-dfns.xml
|
|
|
|
ui/package-map.xmlo: ui/package-map.xml ui/package-dfns.xmlo $(package_dfns_xmlos)
|
2018-10-08 23:27:02 -04:00
|
|
|
ui/package-map.xml: ui/program.expanded.xml ui/package-dfns.xml
|
2020-01-02 10:42:07 -05:00
|
|
|
$(TAME_TS)
|
2022-02-28 10:04:56 -05:00
|
|
|
$(TAME) progui-pkg-map $< $@ $(TAME_PARAMS)
|
2018-10-08 23:27:02 -04:00
|
|
|
|
|
|
|
# for the time being, this does not depend on clean-rate-tables because $(ant) will
|
|
|
|
specs:
|
|
|
|
$(MAKE) -C doc/specs
|
|
|
|
|
|
|
|
# for the time being, this does not depend on clean-rate-tables because ant will
|
|
|
|
# run it
|
|
|
|
clean:
|
|
|
|
find -L $(path_suppliers) $(path_map) $(path_c1map) common/ rater/core rater/lv \( \
|
|
|
|
-name '*.xmlo' \
|
|
|
|
-o -name '*.xmle' \
|
2020-04-07 14:29:12 -04:00
|
|
|
-o -name '*.xmli' \
|
2018-10-08 23:27:02 -04:00
|
|
|
-o -name '*.js' \
|
|
|
|
-o -name '*.html' \
|
|
|
|
-o -name '*.dep' \
|
|
|
|
-o -name '*.tmp' \
|
|
|
|
-o -name '*.php' \
|
|
|
|
\) -exec rm -v {} \;
|
|
|
|
rm -rf $(path_ui)/package-dfns.* \
|
|
|
|
$(path_ui)/package-map.* \
|
|
|
|
$(path_ui)/program.expanded.xml \
|
|
|
|
$(path_ui)/include.js \
|
|
|
|
$(path_ui)/Program.js \
|
|
|
|
$(path_ui)/html
|
|
|
|
find . -path '*/tables/*.csvm' -o -path '*/territories/*.dat' \
|
|
|
|
| sed 's/\.csvm$$/\.xml/; s/\.dat$$/\.xml/' \
|
|
|
|
| xargs rm -fv
|
|
|
|
|
2022-09-07 11:07:39 -04:00
|
|
|
# A target to be optionally overridden by `bootstrap.mk`.
|
|
|
|
.PHONY: bootstrap-if-necessary
|
|
|
|
bootstrap-if-necessary: FORCE
|
|
|
|
|
|
|
|
# Targets intended to be run before the generation of `suppliers.mk`.
|
|
|
|
# This should be used to re-bootstrap the system if necessary
|
|
|
|
# (see `bootstrap-if-necessary` target).
|
|
|
|
-include bootstrap.mk
|
|
|
|
|
2021-02-22 16:47:07 -05:00
|
|
|
# Generates a Makefile that will properly build all package
|
|
|
|
# dependencies. The redirect of ant to /dev/null is because it's still too
|
|
|
|
# noisy even with -q---the "BUILD SUCCESSFUL" line is confusing, considering
|
|
|
|
# it's merely a small part of a broader build.
|
2022-09-07 11:07:39 -04:00
|
|
|
suppliers.mk: $(src_suppliersmk) | bootstrap-if-necessary
|
2021-02-22 16:47:07 -05:00
|
|
|
$(ant) -q pkg-dep >/dev/null
|
2021-02-22 12:42:16 -05:00
|
|
|
find $(path_ui)/program/ -name '*.dep' | xargs cat $(path_ui)/program.dep | sort -u \
|
|
|
|
> $(path_ui)/package-dfns.dep
|
|
|
|
$(RM) $(path_ui)/program.dep
|
2018-11-08 11:05:38 -05:00
|
|
|
$(path_dsl)/tame/build-aux/gen-make $(SRCPATHS) > $@
|
|
|
|
test ! -d $(path_c1map) || $(path_dsl)/tame/build-aux/gen-c1make $(path_c1map)/*.xml >> $@
|
2018-10-08 23:27:02 -04:00
|
|
|
|
2018-12-10 10:46:31 -05:00
|
|
|
# TODO: There is a potential for conflict in copying files to
|
|
|
|
# src/node/programs/rater/programs/@program@. Note that the `for' loop is
|
|
|
|
# used here to handle the situation where no such files exist.
|
2018-10-08 23:27:02 -04:00
|
|
|
program-data-copy: standalones program-ui c1map .version.xml
|
2018-07-05 16:04:33 -04:00
|
|
|
mkdir -p "$(path_lv)/src/node/program/rater/programs/@program@"
|
|
|
|
mkdir -p "$(path_lv)/src/node/program/classify"
|
|
|
|
mkdir -p "$(path_lv)/src/node/program/ui/custom"
|
|
|
|
mkdir -p "$(path_lv)/src/_gen/scripts/program/@program@"
|
|
|
|
mkdir -p "$(path_lv)/src/_gen/views/scripts/quote/@program@"
|
|
|
|
mkdir -p "$(path_lv)/src/lib/c1/interfaces/c1/contract/@program@"
|
|
|
|
mkdir -p "$(path_lv)/misc/rater/programs"
|
|
|
|
mkdir -p "$(path_lv)/src/www/scripts/program"
|
|
|
|
cp -v .version.xml \
|
|
|
|
"$(path_lv)/misc/rater/programs/.version-@program@.xml"
|
|
|
|
cp -v "$(path_ui)/custom.js" \
|
|
|
|
"$(path_lv)/src/www/scripts/program/@program@.js"
|
|
|
|
cp -v "$(path_ui)/"!(custom|package|include).js \
|
|
|
|
"$(path_lv)/src/node/program/ui/custom/"
|
|
|
|
cp -v "$(path_srv)/rater.js" \
|
|
|
|
"$(path_lv)/src/node/program/rater/programs/@program@.js"
|
2018-12-10 10:46:31 -05:00
|
|
|
for f in "$(path_srv)/"!(rater).js; do \
|
|
|
|
cp -v "$$f" "$(path_lv)/src/node/program/rater/programs/@program@/"; \
|
|
|
|
done
|
2018-10-16 23:00:59 -04:00
|
|
|
cp -v "$(path_ui)/package.strip.js" \
|
2018-07-05 16:04:33 -04:00
|
|
|
"$(path_lv)/src/node/program/classify/@program@.js"
|
|
|
|
cp -v "$(path_ui)/"{Program,include,package}.js \
|
|
|
|
"$(path_lv)/src/_gen/scripts/program/@program@/"
|
|
|
|
cp -vr "$(path_ui)/html/"* \
|
|
|
|
"$(path_lv)/src/_gen/views/scripts/quote/@program@/"
|
|
|
|
cp -v "$(path_suppliers)/"*.js \
|
|
|
|
"$(path_lv)/src/node/program/rater/programs/@program@"
|
|
|
|
test ! -d "$(path_c1map)" || cp -v "$(path_c1map)/"*.php \
|
2018-11-28 15:55:49 -05:00
|
|
|
"@C1_IMPORT_MAPDEST@/@program@/"
|
2018-07-05 16:04:33 -04:00
|
|
|
ant -f "$(path_lv)/build.xml" js-mod-order
|
|
|
|
|
|
|
|
# TODO: merge this and the above
|
2018-10-16 23:00:59 -04:00
|
|
|
lvroot: summary-html program-ui c1map strip
|
2018-07-05 16:04:33 -04:00
|
|
|
mkdir -p "$(path_lvroot)/src/node/program/rater/programs/@program@"
|
|
|
|
mkdir -p "$(path_lvroot)/src/node/program/classify"
|
|
|
|
mkdir -p "$(path_lvroot)/src/node/program/ui/custom"
|
|
|
|
mkdir -p "$(path_lvroot)/src/_gen/scripts/program/@program@"
|
|
|
|
mkdir -p "$(path_lvroot)/src/_gen/views/scripts/quote/@program@"
|
|
|
|
mkdir -p "$(path_lvroot)/src/www/scripts/program"
|
|
|
|
mkdir -p "$(path_lvroot)/src/lib/c1/interfaces/c1/contract/@program@"
|
|
|
|
cp -v "$(path_srv)/rater.js" \
|
|
|
|
"$(path_lvroot)/src/node/program/rater/programs/@program@.js"
|
2018-12-10 10:46:31 -05:00
|
|
|
for f in "$(path_srv)/"!(rater).js; do \
|
|
|
|
cp -v "$$f" "$(path_lvroot)/src/node/program/rater/programs/@program@/"; \
|
|
|
|
done
|
2018-07-05 16:04:33 -04:00
|
|
|
cp -v "$(path_suppliers)/"*.js \
|
|
|
|
"$(path_lvroot)/src/node/program/rater/programs/@program@"
|
2018-10-16 23:00:59 -04:00
|
|
|
cp -v "$(path_ui)/package.strip.js" \
|
2018-07-05 16:04:33 -04:00
|
|
|
"$(path_lvroot)/src/node/program/classify/@program@.js"
|
|
|
|
cp -v "$(path_ui)/"{Program,include,package}.js \
|
|
|
|
"$(path_lvroot)/src/_gen/scripts/program/@program@/"
|
|
|
|
cp -vr "$(path_ui)/html/"* \
|
|
|
|
"$(path_lvroot)/src/_gen/views/scripts/quote/@program@/"
|
|
|
|
cp -v "$(path_ui)/custom.js" \
|
|
|
|
"$(path_lvroot)/src/www/scripts/program/@program@.js"
|
|
|
|
cp -v "$(path_ui)/"*Ui.js \
|
|
|
|
"$(path_lvroot)/src/node/program/ui/custom/"
|
|
|
|
test ! -d "$(path_c1map)" || cp -v "$(path_c1map)/"*.php \
|
|
|
|
"$(path_lvroot)/src/lib/c1/interfaces/c1/contract/@program@/"
|
|
|
|
|
2018-11-28 15:55:49 -05:00
|
|
|
# used by newer systems (note that lvroot still contains the c1map files so
|
|
|
|
# as not to break BC)
|
|
|
|
c1root: c1map
|
|
|
|
mkdir -p "$(path_c1root)/src/RSG/ImportBundle/Lib/interfaces/c1/contract/@program@/"
|
|
|
|
cp -v "$(path_c1map)/"*.php \
|
|
|
|
"$(path_c1root)/src/RSG/ImportBundle/Lib/interfaces/c1/contract/@program@/"
|
|
|
|
|
2018-07-05 16:04:33 -04:00
|
|
|
intralov-root: summary-html
|
|
|
|
mkdir -p "$(path_intralov_root)/"{rater/scripts,suppliers}
|
|
|
|
ln -fL $(path_dsl)/summary.css "$(path_intralov_root)/rater"
|
|
|
|
ln -fL $(path_dsl)/scripts/*.js "$(path_intralov_root)/rater/scripts/"
|
|
|
|
ln -fL $(path_suppliers)/*.{html,js} "$(path_intralov_root)/suppliers"
|
|
|
|
|
2018-12-18 21:42:54 -05:00
|
|
|
# Suppliers to check may be overridden using SUPPLIERS. Multiple suppliers
|
|
|
|
# should be space-delimited. Note that the UI is considered to be a special
|
|
|
|
# type of supplier (ui/package.xml) and is included by default in the value
|
|
|
|
# of SUPPLIERS.
|
|
|
|
check-am: $(suppliers_strip)
|
|
|
|
$(path_dsl)/build-aux/progtest-runner $(path_tests) $(SUPPLIERS)
|
2018-07-05 16:04:33 -04:00
|
|
|
test: check
|
|
|
|
|
2018-10-08 23:27:02 -04:00
|
|
|
kill-tamed: tamed-die
|
|
|
|
tamed-die:
|
2020-01-02 10:42:07 -05:00
|
|
|
$(TAME_TS)
|
2018-10-08 23:27:02 -04:00
|
|
|
$(TAME) --kill
|
|
|
|
|
|
|
|
me-a-sandwich:
|
|
|
|
@test $$EUID -eq 0 \
|
|
|
|
&& echo 'You actually ran me as root? Are you insane!?' \
|
|
|
|
|| echo 'Make it yourself.'
|
|
|
|
|
2018-07-05 16:04:33 -04:00
|
|
|
FORCE: ;
|
2020-09-30 15:25:43 -04:00
|
|
|
|
|
|
|
# optionally include a "program.mk" file if it is
|
|
|
|
# present in the project's root directory
|
|
|
|
-include program.mk
|
|
|
|
|