2026-07-18 18:48:23 +02:00
|
|
|
# Klammertext sks/document/ Makefile
|
|
|
|
|
# Improved version with automatic header dependency tracking
|
|
|
|
|
|
|
|
|
|
K := $(KLAMMERTEXT_HOME)
|
|
|
|
|
KS := $(K)/sks
|
|
|
|
|
KM := $(K)/mac
|
|
|
|
|
|
Typed arguments, calculated tables, spans, closed-world fonts, top-level fnt/ and env/
Sync with klammertext-dev through b90b0e09:
- Argument types end to end: :python_cast values are applied (Python
@eval receives real bools/numbers/lists), argument values are
validated against their argtype patterns with the argtype's
description as the error message, argtypes can declare :default
(overridable per declaration), and parameterized type families are
supported: rest(N) casts a rest argument to an N-dimensional list
(bar-count = dimension).
- Unified indexed_range syntax (selector with parenthesized subsets,
composable mnemonic names) for table lines and spans.
- Table klammer: caption fonts fixed in both targets, :column_width /
:leading / :colsep wired, :colspan and :rowspan render (HTML
attributes; \multicolumn / \multirow), calculated cell values (:calc)
with prefix operators, display-precision semantics, :calc_format and
:decimal period|comma.
- Fonts: closed-world resolution on the Klammertext font store
(infrastructure in mac/font_store; no Google Fonts links or fetch).
Default fonts live in the top-level fnt/; additional fonts install
into KLAMMERTEXT_FONTS directories via kdesc --font (list, samples,
preview, install — classification by font metadata). CSS font family
names are quoted (digit-initial families were silently lost).
- Environment files moved from mac/env/ to the top-level env/; shell
profiles source env/runtime.env. Dead per-host variants removed.
- Container: fnt/ ships in the image; curl removed (no network use).
2026-07-22 18:17:43 +02:00
|
|
|
include $(K)/env/makefile.env
|
2026-07-18 18:48:23 +02:00
|
|
|
|
|
|
|
|
# Additional include paths for sks components
|
|
|
|
|
LOCAL_CPPFLAGS := -I$(KM) -I$(KS)/kutil -I$(KS)/target
|
|
|
|
|
|
|
|
|
|
# Shared library location
|
|
|
|
|
LIBDIR := $(K)/lib
|
|
|
|
|
LIBRARY := $(LIBDIR)/libklammertext.so
|
|
|
|
|
|
|
|
|
|
# Linker flags for document.so
|
|
|
|
|
DOC_LDFLAGS := $(SHARED) $(EXPORT_DYNAMIC) -Wl,-rpath,'$(ORIGIN)/../../lib' -L$(LIBDIR)
|
|
|
|
|
|
|
|
|
|
# Local object files
|
|
|
|
|
LOCAL_OBJECTS := document_class.o document_html.o document_latex.o heading.o reference.o
|
|
|
|
|
LOCAL_DEPFILES := document_class.d document_html.d document_latex.d heading.d reference.d document.d
|
|
|
|
|
|
|
|
|
|
# External object files from sks/ (mac/*.o now in libklammertext.so)
|
|
|
|
|
SKS_OBJECTS := $(KS)/kutil/kutil.o $(KS)/kutil/klammer_base.o \
|
Typed arguments, calculated tables, spans, closed-world fonts, top-level fnt/ and env/
Sync with klammertext-dev through b90b0e09:
- Argument types end to end: :python_cast values are applied (Python
@eval receives real bools/numbers/lists), argument values are
validated against their argtype patterns with the argtype's
description as the error message, argtypes can declare :default
(overridable per declaration), and parameterized type families are
supported: rest(N) casts a rest argument to an N-dimensional list
(bar-count = dimension).
- Unified indexed_range syntax (selector with parenthesized subsets,
composable mnemonic names) for table lines and spans.
- Table klammer: caption fonts fixed in both targets, :column_width /
:leading / :colsep wired, :colspan and :rowspan render (HTML
attributes; \multicolumn / \multirow), calculated cell values (:calc)
with prefix operators, display-precision semantics, :calc_format and
:decimal period|comma.
- Fonts: closed-world resolution on the Klammertext font store
(infrastructure in mac/font_store; no Google Fonts links or fetch).
Default fonts live in the top-level fnt/; additional fonts install
into KLAMMERTEXT_FONTS directories via kdesc --font (list, samples,
preview, install — classification by font metadata). CSS font family
names are quoted (digit-initial families were silently lost).
- Environment files moved from mac/env/ to the top-level env/; shell
profiles source env/runtime.env. Dead per-host variants removed.
- Container: fnt/ ships in the image; curl removed (no network use).
2026-07-22 18:17:43 +02:00
|
|
|
$(KS)/target/html_util.o $(KS)/target/latex_util.o
|
2026-07-18 18:48:23 +02:00
|
|
|
|
|
|
|
|
ALL_OBJECTS := $(LOCAL_OBJECTS) $(SKS_OBJECTS)
|
|
|
|
|
|
|
|
|
|
# Compiler flags for dependency generation
|
|
|
|
|
DEPFLAGS = -MMD -MP -MF $(@:.o=.d)
|
|
|
|
|
|
|
|
|
|
.PHONY: all clean deps
|
|
|
|
|
|
|
|
|
|
# Default target
|
|
|
|
|
all : document.so
|
|
|
|
|
|
|
|
|
|
# Build external dependencies first
|
|
|
|
|
deps :
|
|
|
|
|
$(MAKE) -C $(KS)/kutil
|
|
|
|
|
$(MAKE) -C $(KS)/target
|
|
|
|
|
|
|
|
|
|
# Pattern rule for object files
|
|
|
|
|
%.o : %.cpp
|
|
|
|
|
@echo Compiling $<
|
|
|
|
|
$(CXX) -c $(CPPFLAGS) $(LOCAL_CPPFLAGS) $(CXXFLAGS) $(DEPFLAGS) $< -o $@
|
|
|
|
|
|
|
|
|
|
# Shared object - link against libklammertext.so
|
|
|
|
|
document.so : $(LOCAL_OBJECTS) $(SKS_OBJECTS) $(LIBRARY) document.cpp | deps
|
|
|
|
|
$(CXX) $(CPPFLAGS) $(LOCAL_CPPFLAGS) $(CXXFLAGS) $(DOC_LDFLAGS) $(LDFLAGS) \
|
|
|
|
|
document.cpp -o $@ $(ALL_OBJECTS) -lklammertext $(LDLIBS)
|
|
|
|
|
|
|
|
|
|
clean :
|
|
|
|
|
rm -f $(LOCAL_OBJECTS) $(LOCAL_DEPFILES) *.so *~ __pycache__
|
|
|
|
|
|
|
|
|
|
# Include generated dependency files (if they exist)
|
|
|
|
|
-include $(LOCAL_DEPFILES)
|