From: Ian Jackson Date: Thu, 14 Nov 2019 00:00:11 +0000 (+0000) Subject: subdirmk: main.mk: clear SUBDIRMK_MAKEFILES MAKEFILE_TEMPLATES X-Git-Tag: v0.5.1~27^2 X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ian/git?a=commitdiff_plain;ds=sidebyside;h=ff11733b6b7d7920033f81c4669ebba9131b984f;p=secnet.git subdirmk: main.mk: clear SUBDIRMK_MAKEFILES MAKEFILE_TEMPLATES Otherwise, if we reenter main.mk (for exmaple, there are some reasons why one might want to $(MAKE) a particular target), and someone foolishly said `export', we inherit SUBDIRMK_MAKEFILES from our previous self and end up reading everything twice. That causes things not to work very well. While we're here, clear MAKEFILE_TEMPLATES too. Signed-off-by: Ian Jackson --- diff --git a/generate b/generate index b1d032b..48db652 100755 --- a/generate +++ b/generate @@ -264,6 +264,8 @@ sub process_tree() { foreach my $v (qw(top_srcdir abs_top_srcdir)) { o "$v=\@$v@\n"; } + o "MAKEFILES :=\n"; + o "MAKEFILE_TEMPLATES :=\n"; o "SUBDIRMK_MAKEFILES += Subdir.mk\n"; foreach my $subdir (@subdirs) { o "SUBDIRMK_MAKEFILES += $subdir/Subdir.mk\n";