chiark / gitweb /
generate: Mention suppressions when warning re VAR vs &VAR
[subdirmk.git] / subdirmk.ac
1 dnl -*-autoconf-*-
2 dnl subdirmk - autoconf macros
3 dnl  Copyright 2019 Mark Wooding
4 dnl  Copyright 2019 Ian Jackson
5 dnl SPDX-License-Identifier: LGPL-2.0-or-later
6
7 _SUBDIRMK_MAKEFILES=""
8 AC_SUBST([_SUBDIRMK_MAKEFILES])
9
10 AC_DEFUN([SUBDIRMK_SUBDIRS],
11 [_SUBDIRMK_INIT
12 m4_map_args_w([$1],[_SUBDIRMK_SUBDIR(],[/)])])dnl
13
14 AC_DEFUN_ONCE([_SUBDIRMK_INIT],[
15   AC_CONFIG_FILES([
16         main.mk:main.mk.tmp
17         Dir.mk:Dir.mk.tmp
18         Final.mk:Final.mk.tmp
19         ],[],[
20      '$srcdir'/subdirmk/generate --srcdir='$srcdir' $subdirmk_subdirs
21   ])
22   SUBDIRMK_MAKEFILES([subdirmk/regen.mk subdirmk/usual.mk])
23 ])
24
25 AC_DEFUN([_SUBDIRMK_SUBDIR],[
26   subdirmk_subdirs="$subdirmk_subdirs '$1'"
27   AC_CONFIG_FILES([$1Dir.mk:$1Dir.mk.tmp])
28 ])
29
30 AC_DEFUN([SUBDIRMK_MAKEFILES],
31 [_SUBDIRMK_INIT
32 m4_map_args_w([$1],[_SUBDIRMK_MAKEFILE(],[)])])dnl
33
34 AC_DEFUN([_SUBDIRMK_MAKEFILE],[
35   _SUBDIRMK_MAKEFILES="$_SUBDIRMK_MAKEFILES $1"
36   AC_CONFIG_FILES([$1:$1.in])
37 ])