Mirror of the C fix: the Rust generator emits the same XFrame C++ code, so it now defaults WIDGETS_DIR / LIGHTGUI_WIDGETS_DIR to /usr/local/include/lightgui instead of the hardcoded /opt/lightgui/widgets. Added a make install target (installs the 1100 header-only widget headers from the C repo, $(LIGHTGUI_SRC)/widgets, to PREFIX/include/lightgui). Fixtures regenerated from the fixed C++ gen_matrix output (all 16 cases: Makefile/CMakeLists.txt/README.md now reference the installed location; main.cpp unchanged). Fixture test passes.
54 lines
2.0 KiB
Makefile
54 lines
2.0 KiB
Makefile
# lightgui_rust — generated data tables
|
|
# The widget registry, palette, property/event tables and indicator
|
|
# catalog are DATA extracted from the C++ sources in /opt/lightgui
|
|
# (repo https://github.com/cnmcdee/lightgui, HEAD eb0b5fc). They are
|
|
# never hand-edited: regenerate them with `make regen` and verify them
|
|
# against the sources with `make check`.
|
|
#
|
|
# make regen — re-run every extractor, rewriting data/*.json
|
|
# make check — re-derive every table from the C++ sources and fail
|
|
# if any data/*.json disagrees (drift detection)
|
|
# make check-<name> — check one table (registry|palette|props|events|indicators)
|
|
|
|
LIGHTGUI_SRC ?= /opt/lightgui
|
|
PY ?= python3
|
|
|
|
.PHONY: regen check check-registry check-palette check-props check-events check-indicators install
|
|
|
|
# Install the XFrame widget headers (header-only) so generated apps
|
|
# build on any machine where LightGUI is installed. The headers live
|
|
# in the C repo ($(LIGHTGUI_SRC)/widgets); this just copies them to
|
|
# $(PREFIX)/include/lightgui. The Rust generator emits the same
|
|
# default include path as the C generator.
|
|
PREFIX ?= /usr/local
|
|
INCLUDEDIR ?= $(PREFIX)/include/lightgui
|
|
|
|
install:
|
|
@echo "Installing LightGUI widget headers to $(INCLUDEDIR)"
|
|
@mkdir -p $(INCLUDEDIR)
|
|
@cd $(LIGHTGUI_SRC)/widgets && find common core components -name '*.h' | while read f; do \
|
|
install -D -m 644 "$$f" "$(INCLUDEDIR)/$$f"; \
|
|
done
|
|
@echo "Installed $$(find $(LIGHTGUI_SRC)/widgets/common $(LIGHTGUI_SRC)/widgets/core $(LIGHTGUI_SRC)/widgets/components -name '*.h' | wc -l) headers to $(INCLUDEDIR)"
|
|
|
|
regen:
|
|
LIGHTGUI_SRC=$(LIGHTGUI_SRC) $(PY) tools/extract_all.py
|
|
|
|
check:
|
|
LIGHTGUI_SRC=$(LIGHTGUI_SRC) $(PY) tools/check.py
|
|
|
|
check-registry:
|
|
LIGHTGUI_SRC=$(LIGHTGUI_SRC) $(PY) tools/check.py registry
|
|
|
|
check-palette:
|
|
LIGHTGUI_SRC=$(LIGHTGUI_SRC) $(PY) tools/check.py palette
|
|
|
|
check-props:
|
|
LIGHTGUI_SRC=$(LIGHTGUI_SRC) $(PY) tools/check.py props
|
|
|
|
check-events:
|
|
LIGHTGUI_SRC=$(LIGHTGUI_SRC) $(PY) tools/check.py events
|
|
|
|
check-indicators:
|
|
LIGHTGUI_SRC=$(LIGHTGUI_SRC) $(PY) tools/check.py indicators
|