app: Add a "check-for-deprecated-procedures-in-script-fu" make target

Add a "check-for-deprecated-procedures-in-script-fu" make target that
looks for usage of deprecated procedures in *.scm files. We currently
use quite a bit of deprecated procedures. When we don't do that
anymore, we should connect this to make check somehow so our nightly
build fails if someone deprecated a procedures without also porting
all clients.

Run it like this from the source root:

  make -C plug-ins/script-fu check-for-deprecated-procedures-in-script-fu
This commit is contained in:
Martin Nordholts
2011-05-05 00:58:08 +02:00
parent ed01101429
commit 28983a5158
2 changed files with 16 additions and 0 deletions

1
NEWS
View File

@ -49,6 +49,7 @@ Plug-ins:
- Use poppler's cairo API to load PDFs, the pixbuf API is removed
- Port screenshot from GdkPixbuf to cairo
- Fix the annoying parser build warnings in imagemap
- Add a check-for-deprecated-procedures-in-script-fu make target
- PNG?
Data:

View File

@ -81,3 +81,18 @@ LDADD = \
$(RT_LIBS) \
$(INTLLIBS) \
$(script_fu_RC)
# Perform static analysis on all *.scm files and look for usage of
# deprecated pdb procedures
check-for-deprecated-procedures-in-script-fu:
@echo "Looking for deprecated procedures in *.scm files"
@scm_files=`find $(top_srcdir)/plug-ins/script-fu -name "*.scm"`; \
deprecated_procs=`$(top_builddir)/app/gimp-$(GIMP_APP_VERSION)$(EXEEXT) --dump-pdb-procedures-deprecated`; \
for scm_file in $$scm_files; do \
for proc in $$deprecated_procs; do \
if grep -qw $$proc $$scm_file; then \
echo "$${scm_file} uses deprecated procedure '$${proc}'"; \
fi \
done \
done