Windows: product names, the editors, WSL; the Linux page's image step
Assembled from development commit c3c40f6c8fca. Since 830b193: on Windows the
products carry Windows names (ktext.exe, klammertext.dll, document.dll,
reflect.dll) and the console's output code page is UTF-8 for a run; the
editor tooling works on Windows (VS Code, Sublime Text, Vim, with the
interpreter's name chosen by platform) and Notepad++ joins it
(doc/edit/notepadpp: a User Defined Language and two Run-menu commands);
a sixth install page, doc/install/windows_wsl_install.md, for Linux
inside WSL; the Windows page opens with the three routes and gains its
editor section, the PowerShell quoting and Path notes; the Linux page
installs OpenImageIO from the python3-openimageio package and verifies
with kdiag --machine; the README lists all six install pages. Linux and
macOS behaviour is unchanged.
This commit is contained in:
1 parent
830b19394d
commit
ee8bcf5300
33 files changed
+741
-122
No files matched your search
+14
-11
@@ -1,31 +1,34 @@
|
||||
# Klammertext sks/ Makefile
|
||||
# Builds all .so files in sks/ subdirectories
|
||||
# Builds all the DSOs (document$(DSO): .so, on Windows .dll) in sks/
|
||||
# subdirectories
|
||||
|
||||
K := $(KLAMMERTEXT_HOME)
|
||||
KS := $(K)/sks
|
||||
KM := $(K)/mac
|
||||
|
||||
# Shared library that all .so files depend on
|
||||
LIBRARY := $(K)/lib/libklammertext.so
|
||||
include $(K)/env/makefile.env
|
||||
|
||||
# Shared library that all the DSOs depend on
|
||||
LIBRARY := $(K)/lib/$(KLAMMERTEXT_LIBFILE)
|
||||
|
||||
# Support directories (build .o files used by other sks/ components)
|
||||
SUPPORT_DIRS := kutil target
|
||||
|
||||
# Excluded directories:
|
||||
# kutil, target - support directories that build .o files, not .so
|
||||
# book, phase - obsolete, not updated for libklammertext.so
|
||||
# kutil, target - support directories that build .o files, not a DSO
|
||||
# book, phase - obsolete, not updated for the shared library
|
||||
|
||||
# Directories that build .so files (excluding support and obsolete directories)
|
||||
# Find all subdirectories with Makefiles that have .so build targets
|
||||
# (look for lines like "xyz.so :" or "all : xyz.so")
|
||||
# Directories that build a DSO (excluding support and obsolete directories):
|
||||
# every subdirectory whose Makefile names its product with makefile.env's
|
||||
# $(DSO) suffix ("document$(DSO) :", "all : document$(DSO)").
|
||||
SO_DIRS := $(shell for dir in $(KS)/*/; do \
|
||||
if [ -f "$${dir}Makefile" ] && grep -qE '^[a-z]+\.so\s*:|all\s*:.*\.so' "$${dir}Makefile" 2>/dev/null; then \
|
||||
if [ -f "$${dir}Makefile" ] && grep -qE '\$$\(DSO\)' "$${dir}Makefile" 2>/dev/null; then \
|
||||
basename "$$dir"; \
|
||||
fi; done | grep -v -E '^(kutil|target|book|phase)$$')
|
||||
|
||||
.PHONY: all clean support $(SUPPORT_DIRS) $(SO_DIRS)
|
||||
|
||||
# Default target: build support first, then all .so files
|
||||
# Default target: build support first, then every DSO
|
||||
all : support $(SO_DIRS)
|
||||
|
||||
# Build support directories
|
||||
@@ -37,7 +40,7 @@ kutil :
|
||||
target : kutil
|
||||
$(MAKE) -j -C $(KS)/target
|
||||
|
||||
# Pattern rule for .so directories
|
||||
# Pattern rule for the DSO directories
|
||||
# Each depends on the library and support directories
|
||||
$(SO_DIRS) : support $(LIBRARY)
|
||||
$(MAKE) -j -C $(KS)/$@
|
||||
|
||||
+10
-7
@@ -12,16 +12,19 @@ LOCAL_CPPFLAGS := -I$(KM) -I$(KS)/kutil -I$(KS)/target
|
||||
|
||||
# Shared library location
|
||||
LIBDIR := $(K)/lib
|
||||
LIBRARY := $(LIBDIR)/libklammertext.so
|
||||
LIBRARY := $(LIBDIR)/$(KLAMMERTEXT_LIBFILE)
|
||||
|
||||
# Linker flags for document.so
|
||||
# The product: document.so, on Windows document.dll (makefile.env's DSO)
|
||||
DOCUMENT := document$(DSO)
|
||||
|
||||
# Linker flags for the DSO
|
||||
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)
|
||||
# External object files from sks/ (mac/*.o now in the shared library)
|
||||
SKS_OBJECTS := $(KS)/kutil/kutil.o $(KS)/kutil/klammer_base.o \
|
||||
$(KS)/target/html_util.o $(KS)/target/latex_util.o
|
||||
|
||||
@@ -33,7 +36,7 @@ DEPFLAGS = -MMD -MP -MF $(@:.o=.d)
|
||||
.PHONY: all clean deps
|
||||
|
||||
# Default target
|
||||
all : document.so
|
||||
all : $(DOCUMENT)
|
||||
|
||||
# Build external dependencies first
|
||||
deps :
|
||||
@@ -45,13 +48,13 @@ deps :
|
||||
@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
|
||||
# Shared object - link against the library
|
||||
$(DOCUMENT) : $(LOCAL_OBJECTS) $(SKS_OBJECTS) $(LIBRARY) document.cpp | deps
|
||||
$(CXX) $(CPPFLAGS) $(LOCAL_CPPFLAGS) $(CXXFLAGS) $(DOC_LDFLAGS) $(LDFLAGS) \
|
||||
document.cpp -o $@ $(ALL_OBJECTS) $(KLAMMERTEXT_LIB) $(LDLIBS)
|
||||
|
||||
clean :
|
||||
rm -f $(LOCAL_OBJECTS) $(LOCAL_DEPFILES) *.so *~
|
||||
rm -f $(LOCAL_OBJECTS) $(LOCAL_DEPFILES) *.so *.dll *~
|
||||
# document_txt.py is imported at render time (2026-09-18), so this
|
||||
# directory now exists here; rm -f refused it and failed every clean.
|
||||
rm -rf __pycache__
|
||||
|
||||
Reference in new issue
Block a user