aboutsummaryrefslogtreecommitdiff
path: root/scanbuild.m4
blob: ba7b8ce4c32853fc4aa64d4314b30db2fa3798f7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
divert(-1)

changequote([,])

define(iterate_files, [esyscmd([for f in $(/bin/ls $1/*.$2); do echo -n "$f "; done])])
define(substitue, [esyscmd([for f in "$1"; do echo -n "${f/$2/$3} "; done])])

define(LIBS_STATIC, [iterate_files([build], [a])])
define(LIBS_SHARED, [iterate_files([build], [so])])
define(HEADERS,     [iterate_files([build], [h])])

divert(0)
ninja_dyndep_version = 1

build libs | dnl
substitue(LIBS_STATIC, BIN, LIBDIR)dnl
substitue(LIBS_SHARED, BIN, LIBDIR)dnl
: dyndep | LIBS_STATIC LIBS_SHARED

build includes | dnl
substitue(HEADERS, BIN, INCLUDEDIR)dnl
: dyndep | HEADERS