From 844b90ec6b79be309d0bd3d08df36b78d48eee90 Mon Sep 17 00:00:00 2001 From: kartofen Date: Mon, 7 Apr 2025 02:39:58 +0300 Subject: refactor install things --- builtfiles.dd.m4 | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 builtfiles.dd.m4 (limited to 'builtfiles.dd.m4') diff --git a/builtfiles.dd.m4 b/builtfiles.dd.m4 new file mode 100644 index 0000000..bbbf713 --- /dev/null +++ b/builtfiles.dd.m4 @@ -0,0 +1,22 @@ + divert(-1) +changequote([,]) + +define(iterate_files, [esyscmd([ + for f in $(command ls $1/*.$2 2> /dev/null); do + echo -n "$f "; + done])]) +define(substitue, [esyscmd([ + for f in $1; do + echo -n "${f/$2/$3} "; + done])]) + +define(LIBS, [iterate_files([build], [so]) iterate_files([build], [a])]) +define(HEADERS, [iterate_files([build], [h])]) + +divert(0) + +ninja_dyndep_version = 1 + +build libs | substitue(LIBS, BIN, LIBDIR): dyndep | LIBS + +build includes | substitue(HEADERS, BIN, INCLUDEDIR): dyndep | HEADERS -- cgit v1.2.3