-
Notifications
You must be signed in to change notification settings - Fork 0
/
boot.gib
36 lines (29 loc) · 1.08 KB
/
boot.gib
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
# load the static manifest, setting $(gibsrc) to the list of source files and
# $(gibdir) to the list of source directories; in a bigger project (and one
# that isn't trying to bootstrap its own build tools), the manifest would be
# likely generated on the fly
src gibsrc gibdir gib/bundle/manifest.txt
# a macro for building and linking the bundled helper programs; ‹name› is
# essentially a named parameter of the macro (it is set as a local variable
# before the macro ‹use› statement)
def gibutil
out gib.$(name)
let src gib/bundle/$(name).c
dep $(src)
cmd $(cc) $(cflags) -o $(out) $(srcdir)/$(src)
# build the individual helpers using the above macro and a static list of
# dependencies (again, mainly for bootstrap reasons – the standard way to get
# ‹#include› dependencies is to use ‹gib.wrapcc› which we are building here
let name wrapcc
use gibutil
dep gib/bundle/reader.h
dep gib/bundle/writer.h
dep gib/bundle/common.h
dep gib/bundle/error.h
let name nochange
use gibutil
let name findsrc
use gibutil
dep gib/bundle/writer.h
dep gib/bundle/common.h
dep gib/bundle/error.h