aboutsummaryrefslogtreecommitdiff
path: root/Makerules
diff options
context:
space:
mode:
Diffstat (limited to 'Makerules')
-rw-r--r--Makerules9
1 files changed, 5 insertions, 4 deletions
diff --git a/Makerules b/Makerules
index 948c01b..a554e2a 100644
--- a/Makerules
+++ b/Makerules
@@ -896,18 +896,19 @@ common-clean: common-mostlyclean
# Produce a file `stub-$(subdir)' which contains `#define __stub_FUNCTION'
# for each function which is a stub. We grovel over all the .d files
-# looking for references to source files in sysdeps/stub. Then we grovel
-# over each referenced source file to see what stub function it defines.
+# looking for references to <stub-tag.h>. Then we grovel over each
+# referenced source file to see what stub function it defines.
.PHONY: stubs # The parent Makefile calls this target.
stubs: $(common-objpfx)stub-$(subdir)
-s = $(sysdep_dir)/stub
+s = $(sysdep_dir)/generic
$(common-objpfx)stub-$(subdir): $(+depfiles)
# Use /dev/null since `...` might expand to empty.
(s=`cd $s; /bin/pwd`; \
$(patsubst %/,cd %;,$(objpfx)) \
sed -n 's/^stub_warning *(\([^)]*\).*$$/#define __stub_\1/p' \
- `sed -n 's@^.*$s/\([a-z0-9_-]*\.c\).*$$@'"$$s"/'\1@p' \
+ `sed -n -e '\@: $s@{; s@^.*: $s/\([a-z0-9_./-]*\.c\).*$$@'"$$s"'/\1@; h; }' \
+ -e '/stub-tag\.h/{; g; p; }' \
$(patsubst $(objpfx)%,%,$^) /dev/null` \
/dev/null) > $@T
mv -f $@T $@