Commit f7513e5a authored by Sven Neumann's avatar Sven Neumann Committed by Sven Neumann

added defcheck.py.

2006-11-08  Sven Neumann  <sven@gimp.org>

	* tools/Makefile.am (EXTRA_DIST): added defcheck.py.

	* tools/defcheck.py: keep a list of .def files, glob didn't work
	for me. Also bail out with a reasonable message if not being
	called from the toplevel source directory.

	* Makefile.am (dist-hook): check .def files for consistency.
parent fda5a845
2006-11-08 Sven Neumann <sven@gimp.org>
* tools/Makefile.am (EXTRA_DIST): added defcheck.py.
* tools/defcheck.py: keep a list of .def files, glob didn't work
for me. Also bail out with a reasonable message if not being
called from the toplevel source directory.
* Makefile.am (dist-hook): check .def files for consistency.
2006-11-08 Jakub Steiner <jimmac@ximian.com>
* stock-tool-foreground-select: update SIOX icon based on feedback
on the mailing list
on the mailing list.
2006-11-08 Kevin Cozens <kcozens@cvs.gnome.org>
......
......@@ -90,6 +90,9 @@ DISTCLEANFILES = \
gimpinstall-@GIMP_TOOL_VERSION@:
$(LN_S) $(srcdir)/install-sh $(srcdir)/gimpinstall-@GIMP_TOOL_VERSION@
check-defs:
@$(PYTHON) tools/defcheck.py || \
( echo "* .def files inconsistent *"; exit 1; )
validate-authors:
if HAVE_XMLLINT
......@@ -99,4 +102,4 @@ endif
all-local: AUTHORS
dist-hook: validate-authors
dist-hook: check-defs validate-authors
......@@ -39,6 +39,7 @@ INCLUDES = \
-I$(includedir)
EXTRA_DIST = \
defcheck.py \
gimp-mkenums \
gimppath2svg.py \
rmshm
......
......@@ -27,14 +27,31 @@ Needs the tool "nm" to work.
"""
import sys, commands, glob
for df in glob.glob ("lib*/*.def"):
import sys, commands
def_files = (
"libgimpbase/gimpbase.def",
"libgimpcolor/gimpcolor.def",
"libgimpconfig/gimpconfig.def",
"libgimp/gimp.def",
"libgimp/gimpui.def",
"libgimpmath/gimpmath.def",
"libgimpmodule/gimpmodule.def",
"libgimpthumb/gimpthumb.def",
"libgimpwidgets/gimpwidgets.def"
)
for df in def_files:
directory, rest = df.split ("/")
basename, extension = rest.split (".")
libname = directory + "/.libs/lib" + basename + "-*.so"
defsymbols = file (df).read ().split ()[1:]
try:
defsymbols = file (df).read ().split ()[1:]
except IOError, message:
print message
print "You need to run this script from the toplevel source directory."
sys.exit (-1)
doublesymbols = []
for i in range (len (defsymbols)-1, 0, -1):
......@@ -90,5 +107,3 @@ for df in glob.glob ("lib*/*.def"):
sys.exit (1)
sys.exit (0)
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment