Skip to content

Commit ee30ca3

Browse files
rickrick
rick
authored and
rick
committed
POC for meson dependency source of truth
0 parents  commit ee30ca3

File tree

163 files changed

+248053
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

163 files changed

+248053
-0
lines changed

.envrc

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
paleta < ~/.palettes/frontend-galaxy-dark
2+
export PATH="$(pwd)/scripts:$PATH"

.gitignore

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
submodules subprojects
2+
submodules/
3+
subprojects/*/
4+
.attic

.gitmodules

+300
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,300 @@
1+
[submodule "submodules/ansi2xt"]
2+
path = submodules/ansi2xt
3+
url = https://github.com/jamaisx/ansi2txt
4+
[submodule "submodules/ansicodes"]
5+
path = submodules/ansicodes
6+
url = https://github.com/mlabbe/ansicodes
7+
[submodule "submodules/asprintf"]
8+
path = submodules/asprintf
9+
url = https://github.com/jwerle/asprintf.c
10+
[submodule "submodules/asprintf.c"]
11+
path = submodules/asprintf.c
12+
url = https://github.com/jwerle/asprintf.c
13+
[submodule "submodules/assertf"]
14+
path = submodules/assertf
15+
url = https://github.com/leiless/assertf.h
16+
[submodule "submodules/assertf.h"]
17+
path = submodules/assertf.h
18+
url = https://github.com/leiless/assertf.h
19+
[submodule "submodules/b64.c"]
20+
path = submodules/b64.c
21+
url = https://github.com/littlstar/b64.c
22+
[submodule "submodules/bestline"]
23+
path = submodules/bestline
24+
url = https://github.com/jart/bestline
25+
[submodule "submodules/boydemdb"]
26+
path = submodules/boydemdb
27+
url = https://github.com/dimkr/boydemdb
28+
[submodule "submodules/bytes"]
29+
path = submodules/bytes
30+
url = https://github.com/clibs/bytes
31+
[submodule "submodules/c_ansi"]
32+
path = submodules/c_ansi
33+
url = https://github.com/binRick/c_ansi
34+
[submodule "submodules/c_embed"]
35+
path = submodules/c_embed
36+
url = https://github.com/binRick/c_embed
37+
[submodule "submodules/c_eventemitter"]
38+
path = submodules/c_eventemitter
39+
url = https://github.com/sagiegurari/c_eventemitter
40+
[submodule "submodules/c_forever"]
41+
path = submodules/c_forever
42+
url = https://github.com/sagiegurari/c_forever
43+
[submodule "submodules/c_fsio"]
44+
path = submodules/c_fsio
45+
url = https://github.com/sagiegurari/c_fsio
46+
[submodule "submodules/c_hs"]
47+
path = submodules/c_hs
48+
url = https://github.com/sagiegurari/c_hs
49+
[submodule "submodules/c_kat"]
50+
path = submodules/c_kat
51+
url = https://github.com/binRick/c_kat
52+
[submodule "submodules/c_palettes"]
53+
path = submodules/c_palettes
54+
url = https://github.com/binRick/c_palettes
55+
[submodule "submodules/c_printf"]
56+
path = submodules/c_printf
57+
url = [email protected]:binRick/c_printf.git
58+
[submodule "submodules/c_string_buffer"]
59+
path = submodules/c_string_buffer
60+
url = https://github.com/sagiegurari/c_string_buffer
61+
[submodule "submodules/c_stringfn"]
62+
path = submodules/c_stringfn
63+
url = https://github.com/sagiegurari/c_stringfn
64+
[submodule "submodules/c_timer"]
65+
path = submodules/c_timer
66+
url = https://github.com/binRick/c_timer
67+
[submodule "submodules/cargs"]
68+
path = submodules/cargs
69+
url = https://github.com/likle/cargs
70+
[submodule "submodules/cembed"]
71+
path = submodules/cembed
72+
url = https://github.com/rxi/cembed
73+
[submodule "submodules/cflag"]
74+
path = submodules/cflag
75+
url = https://github.com/aperezdc/cflag
76+
[submodule "submodules/chan"]
77+
path = submodules/chan
78+
url = https://github.com/tylertreat/chan
79+
[submodule "submodules/clfag"]
80+
path = submodules/clfag
81+
url = https://github.com/aperezdc/cflag
82+
[submodule "submodules/colorin"]
83+
path = submodules/colorin
84+
url = https://github.com/Lunlumo-ex-machina/colorin
85+
[submodule "submodules/csplit"]
86+
path = submodules/csplit
87+
url = https://github.com/jwlodek/csplit
88+
[submodule "submodules/csv_parser"]
89+
path = submodules/csv_parser
90+
url = https://github.com/semitrivial/csv_parser
91+
[submodule "submodules/ctable"]
92+
path = submodules/ctable
93+
url = https://github.com/PHochmann/ctable
94+
[submodule "submodules/dbg"]
95+
path = submodules/dbg
96+
url = https://github.com/leiless/dbg.h
97+
[submodule "submodules/dbg.h"]
98+
path = submodules/dbg.h
99+
url = https://github.com/leiless/dbg.h
100+
[submodule "submodules/debug-memory"]
101+
path = submodules/debug-memory
102+
url = https://github.com/funasoul/debug-memory
103+
[submodule "submodules/debug_print_h"]
104+
path = submodules/debug_print_h
105+
url = [email protected]:binRick/debug_print_h.git
106+
[submodule "submodules/dirname"]
107+
path = submodules/dirname
108+
url = https://github.com/prodisDown/dirname
109+
[submodule "submodules/djbhash"]
110+
path = submodules/djbhash
111+
url = https://github.com/gdi/djbhash
112+
[submodule "submodules/env.h"]
113+
path = submodules/env.h
114+
url = https://github.com/4thel00z/env.h
115+
[submodule "submodules/expand-braces"]
116+
path = submodules/expand-braces
117+
url = https://github.com/stephenmathieson/expand-braces.c
118+
[submodule "submodules/flingfd"]
119+
path = submodules/flingfd
120+
url = https://github.com/sharvil/flingfd
121+
[submodule "submodules/fs.c"]
122+
path = submodules/fs.c
123+
url = https://github.com/jwerle/fs.c
124+
[submodule "submodules/fsio"]
125+
path = submodules/fsio
126+
url = https://github.com/sagiegurari/c_fsio
127+
[submodule "submodules/generic-print"]
128+
path = submodules/generic-print
129+
url = https://github.com/exebook/generic-print
130+
[submodule "submodules/greatest"]
131+
path = submodules/greatest
132+
url = https://github.com/silentbicycle/greatest
133+
[submodule "submodules/http-get.c"]
134+
path = submodules/http-get.c
135+
url = https://github.com/clibs/http-get.c
136+
[submodule "submodules/https_client"]
137+
path = submodules/https_client
138+
url = https://github.com/HISONA/https_client
139+
[submodule "submodules/iTerm2-Color-Schemes"]
140+
path = submodules/iTerm2-Color-Schemes
141+
url = https://github.com/mbadolato/iTerm2-Color-Schemes
142+
[submodule "submodules/incbin"]
143+
path = submodules/incbin
144+
url = https://github.com/graphitemaster/incbin
145+
[submodule "submodules/kat"]
146+
path = submodules/kat
147+
url = https://github.com/Theldus/kat
148+
[submodule "submodules/kitty-themes"]
149+
path = submodules/kitty-themes
150+
url = https://github.com/dexpota/kitty-themes
151+
[submodule "submodules/libansilove"]
152+
path = submodules/libansilove
153+
url = https://github.com/ansilove/libansilove
154+
[submodule "submodules/libconfuse"]
155+
path = submodules/libconfuse
156+
url = https://github.com/libconfuse/libconfuse
157+
[submodule "submodules/liblogger"]
158+
path = submodules/liblogger
159+
url = https://github.com/briandowns/liblogger
160+
[submodule "submodules/libterminput"]
161+
path = submodules/libterminput
162+
url = https://github.com/maandree/libterminput
163+
[submodule "submodules/libtermkey"]
164+
path = submodules/libtermkey
165+
url = https://github.com/astoeckel/libtermkey
166+
[submodule "submodules/libyaml"]
167+
path = submodules/libyaml
168+
url = https://github.com/yaml/libyaml
169+
[submodule "submodules/log.c"]
170+
path = submodules/log.c
171+
url = https://github.com/rxi/log.c
172+
[submodule "submodules/memtrace"]
173+
path = submodules/memtrace
174+
url = https://github.com/mfederczuk/memtrace
175+
[submodule "submodules/module"]
176+
path = submodules/module
177+
url = https://github.com/clibs/module
178+
[submodule "submodules/ms"]
179+
path = submodules/ms
180+
url = https://github.com/clibs/ms
181+
[submodule "submodules/occurrences.c"]
182+
path = submodules/occurrences.c
183+
url = https://github.com/stephenmathieson/occurrences.c
184+
[submodule "submodules/parson"]
185+
path = submodules/parson
186+
url = https://github.com/kgabis/parson
187+
[submodule "submodules/path-basename.c"]
188+
path = submodules/path-basename.c
189+
url = https://github.com/michaelrhodes/path-basename.c
190+
[submodule "submodules/path-join.c"]
191+
path = submodules/path-join.c
192+
url = https://github.com/stephenmathieson/path-join.c
193+
[submodule "submodules/path_module"]
194+
path = submodules/path_module
195+
url = https://github.com/PrajwalCH/path_module
196+
[submodule "submodules/progress.c"]
197+
path = submodules/progress.c
198+
url = https://github.com/jwerle/progress.c
199+
[submodule "submodules/progressbar"]
200+
path = submodules/progressbar
201+
url = https://github.com/doches/progressbar
202+
[submodule "submodules/rgba"]
203+
path = submodules/rgba
204+
url = https://github.com/clibs/rgba
205+
[submodule "submodules/scriptexec"]
206+
path = submodules/scriptexec
207+
url = https://github.com/sagiegurari/c_scriptexec
208+
[submodule "submodules/simpleconf"]
209+
path = submodules/simpleconf
210+
url = https://github.com/jedisct1/simpleconf
211+
[submodule "submodules/slug.c"]
212+
path = submodules/slug.c
213+
url = https://github.com/hkjels/slug.c
214+
[submodule "submodules/smaz"]
215+
path = submodules/smaz
216+
url = https://github.com/antirez/smaz
217+
[submodule "submodules/socket99"]
218+
path = submodules/socket99
219+
url = https://github.com/silentbicycle/socket99
220+
[submodule "submodules/spin"]
221+
path = submodules/spin
222+
url = https://github.com/charles-l/spin
223+
[submodule "submodules/spmemvfs"]
224+
path = submodules/spmemvfs
225+
url = https://github.com/spsoft/spmemvfs.git
226+
[submodule "submodules/sqlite"]
227+
path = submodules/sqlite
228+
url = https://github.com/sqlite/sqlite
229+
[submodule "submodules/stb"]
230+
path = submodules/stb
231+
url = https://github.com/nothings/stb
232+
[submodule "submodules/str-ends-with"]
233+
path = submodules/str-ends-with
234+
url = https://github.com/stephenmathieson/str-ends-with.c
235+
[submodule "submodules/str-replace.c"]
236+
path = submodules/str-replace.c
237+
url = https://github.com/stephenmathieson/str-replace.c
238+
[submodule "submodules/strdup"]
239+
path = submodules/strdup
240+
url = https://github.com/clibs/strdup
241+
[submodule "submodules/subhook"]
242+
path = submodules/subhook
243+
url = https://github.com/Zeex/subhook
244+
[submodule "submodules/subprocess.h"]
245+
path = submodules/subprocess.h
246+
url = https://github.com/sheredom/subprocess.h
247+
[submodule "submodules/svpng"]
248+
path = submodules/svpng
249+
url = https://github.com/miloyip/svpng
250+
[submodule "submodules/tempdir"]
251+
path = submodules/tempdir
252+
url = https://github.com/stephenmathieson/tempdir.c
253+
[submodule "submodules/tempdir.c"]
254+
path = submodules/tempdir.c
255+
url = https://github.com/stephenmathieson/tempdir.c
256+
[submodule "submodules/termpaint"]
257+
path = submodules/termpaint
258+
url = https://github.com/termpaint/termpaint
259+
[submodule "submodules/themes/dexpota/kitty-themes"]
260+
path = submodules/themes/dexpota/kitty-themes
261+
url = https://github.com/dexpota/kitty-themes
262+
[submodule "submodules/themes/kovidgoyal/kitty-themes"]
263+
path = submodules/themes/kovidgoyal/kitty-themes
264+
url = https://github.com/kovidgoyal/kitty-themes
265+
[submodule "submodules/themes/mbadolato/iTerm2-Color-Schemes"]
266+
path = submodules/themes/mbadolato/iTerm2-Color-Schemes
267+
url = https://github.com/mbadolato/iTerm2-Color-Schemes
268+
[submodule "submodules/themes/rajasegar/alacritty-themes"]
269+
path = submodules/themes/rajasegar/alacritty-themes
270+
url = https://github.com/rajasegar/alacritty-themes
271+
[submodule "submodules/throw.h"]
272+
path = submodules/throw.h
273+
url = https://github.com/jwerle/throw.h
274+
[submodule "submodules/timequick"]
275+
path = submodules/timequick
276+
url = https://github.com/mbarbar/timequick
277+
[submodule "submodules/timestamp"]
278+
path = submodules/timestamp
279+
url = https://github.com/clibs/timestamp
280+
[submodule "submodules/tiny-AES-c"]
281+
path = submodules/tiny-AES-c
282+
url = https://github.com/kokke/tiny-AES-c
283+
[submodule "submodules/tiny-regex-c"]
284+
path = submodules/tiny-regex-c
285+
url = https://github.com/kokke/tiny-regex-c
286+
[submodule "submodules/tinydir"]
287+
path = submodules/tinydir
288+
url = https://github.com/cxong/tinydir
289+
[submodule "submodules/uptime"]
290+
path = submodules/uptime
291+
url = https://github.com/qwercik/uptime
292+
[submodule "submodules/uuid4"]
293+
path = submodules/uuid4
294+
url = https://github.com/rxi/uuid4
295+
[submodule "submodules/va_args_count"]
296+
path = submodules/va_args_count
297+
url = https://github.com/donmccaughey/va_args_count
298+
[submodule "submodules/wildcardcmp"]
299+
path = submodules/wildcardcmp
300+
url = https://github.com/clibs/wildcardcmp

Makefile

+67
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,67 @@
1+
default: all
2+
##############################################################
3+
PASSH=$(shell command -v passh)
4+
GIT=$(shell command -v git)
5+
SED=$(shell command -v gsed||command -v sed)
6+
NODEMON=$(shell command -v nodemon)
7+
FZF=$(shell command -v fzf)
8+
BLINE=$(shell command -v bline)
9+
UNCRUSTIFY=$(shell command -v uncrustify)
10+
PWD=$(shell command -v pwd)
11+
FIND=$(shell command -v find)
12+
EMBED_BINARY=$(shell command -v embed)
13+
JQ_BIN=$(shell command -v jq)
14+
DIR=$(shell $(PWD))
15+
##############################################################
16+
TIDIED_FILES = deps*/*.c deps*/*.h
17+
##############################################################
18+
do-setup:
19+
@[[ -d submodules ]] || mkdir submodules
20+
21+
22+
all: tidy
23+
@echo ALL
24+
25+
git-add:
26+
@git add meson/deps/*/meson.build
27+
@git add subprojects/*.wrap
28+
@git add deps*/*.c deps*/*.h
29+
@git status
30+
31+
fmt-scripts:
32+
@shfmt -w scripts/*.sh
33+
34+
do-uncrustify: uncrustify uncrustify-clean fix-dbg
35+
uncrustify:
36+
@$(UNCRUSTIFY) -c etc/uncrustify.cfg --replace $(TIDIED_FILES)
37+
38+
uncrustify-clean:
39+
@find . -type f -name "*unc-back*"|xargs -I % unlink %
40+
41+
fix-dbg:
42+
@$(SED) 's|, % s);|, %s);|g' -i $(TIDIED_FILES)
43+
@$(SED) 's|, % lu);|, %lu);|g' -i $(TIDIED_FILES)
44+
@$(SED) 's|, % d);|, %d);|g' -i $(TIDIED_FILES)
45+
@$(SED) 's|, % zu);|, %zu);|g' -i $(TIDIED_FILES)
46+
47+
do-build: do-meson do-ninja
48+
49+
do-meson:
50+
@eval cd . && { meson build || { meson build --reconfigure || { meson build --wipe; } && meson build; }; }
51+
52+
do-ninja:
53+
@eval cd . && { ninja -C build; }
54+
55+
do-ninja-test:
56+
@eval cd . && { ninja test -C build -v; }
57+
58+
do-test: do-ninja-test
59+
60+
build: do-meson do-build
61+
62+
tidy: \
63+
do-setup \
64+
fmt-scripts do-uncrustify \
65+
do-build \
66+
do-test \
67+
git-add

deps-test/deps-test.c

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
#include "deps-test.h"
2+
3+
4+
int main(int argc, char **argv) {
5+
(void)argc; (void)argv;
6+
printf("OK\n");
7+
}

deps-test/deps-test.h

+10
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
#pragma once
2+
#include "../deps/deps.h"
3+
#include <ctype.h>
4+
#include <stdarg.h>
5+
#include <stdint.h>
6+
#include <stdio.h>
7+
#include <stdlib.h>
8+
#include <string.h>
9+
#include <sys/time.h>
10+

0 commit comments

Comments
 (0)