[gimp] app: Add a "check-for-deprecated-procedures-in-script-fu" make target
- From: Martin Nordholts <martinn src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gimp] app: Add a "check-for-deprecated-procedures-in-script-fu" make target
- Date: Wed, 4 May 2011 23:02:21 +0000 (UTC)
commit 28983a5158196eb634050f8e22439cc7fc640b6a
Author: Martin Nordholts <martinn src gnome org>
Date: Thu May 5 00:58:08 2011 +0200
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
NEWS | 1 +
plug-ins/script-fu/Makefile.am | 15 +++++++++++++++
2 files changed, 16 insertions(+), 0 deletions(-)
---
diff --git a/NEWS b/NEWS
index ace9dc0..76290f0 100644
--- a/NEWS
+++ b/NEWS
@@ -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:
diff --git a/plug-ins/script-fu/Makefile.am b/plug-ins/script-fu/Makefile.am
index fc77b77..68c3ce7 100644
--- a/plug-ins/script-fu/Makefile.am
+++ b/plug-ins/script-fu/Makefile.am
@@ -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
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]