From stefan at users.sourceforge.net Sun Sep 7 11:35:06 2003 From: stefan at users.sourceforge.net (Stefan Seefeld) Date: Wed Mar 2 21:06:33 2005 Subject: [Synopsis-cvs] Synopsis/Synopsis configure.in,1.18,1.19 Message-ID: Update of /cvsroot/synopsis/Synopsis In directory sc8-pr-cvs1:/tmp/cvs-serv27126 Modified Files: configure.in Log Message: support python 2.3; require autoconf 2.56 Index: configure.in =================================================================== RCS file: /cvsroot/synopsis/Synopsis/configure.in,v retrieving revision 1.18 retrieving revision 1.19 diff -u -p -d -r1.18 -r1.19 --- configure.in 20 Aug 2003 03:06:24 -0000 1.18 +++ configure.in 7 Sep 2003 18:34:48 -0000 1.19 @@ -23,7 +23,7 @@ dnl Process this file with autoconf to p dnl ------------------------------------------------------------------ dnl Autoconf initialization dnl ------------------------------------------------------------------ -AC_PREREQ(2.12) +AC_PREREQ(2.56) AC_REVISION($Revision$) AC_INIT(synopsis.spec.in) @@ -51,6 +51,9 @@ CPPFLAGS="$python_cppflags $CPPFLAGS" if test ".$python_version" != .; then AC_CHECK_HEADER(python${python_version}/Python.h,[], [AC_MSG_ERROR([Could not find valid python installation for version $python_version])]) +fi +if test ".$python_version" = .; then + AC_CHECK_HEADER(python2.3/Python.h, [python_version="2.3"]) fi if test ".$python_version" = .; then AC_CHECK_HEADER(python2.2/Python.h, [python_version="2.2"]) From stefan at users.sourceforge.net Wed Sep 10 14:55:59 2003 From: stefan at users.sourceforge.net (Stefan Seefeld) Date: Wed Mar 2 21:06:33 2005 Subject: [Synopsis-cvs] Synopsis/Synopsis/Synopsis __init__.py,1.5,1.6 Message-ID: Update of /cvsroot/synopsis/Synopsis/Synopsis In directory sc8-pr-cvs1:/tmp/cvs-serv9892/Synopsis Modified Files: __init__.py Log Message: update version (and trigger a new cvs backup on sf.net) Index: __init__.py =================================================================== RCS file: /cvsroot/synopsis/Synopsis/Synopsis/__init__.py,v retrieving revision 1.5 retrieving revision 1.6 diff -u -p -d -r1.5 -r1.6 --- __init__.py 4 Jul 2001 08:18:16 -0000 1.5 +++ __init__.py 10 Sep 2003 21:42:08 -0000 1.6 @@ -4,4 +4,4 @@ This package contains the Synopsis modul are organised into four subpackages: Core, Parser, Linker and Formatter. There is also the Config module, which contains all the default configuration settings.""" -__version__ = "0.3" +__version__ = "0.5" From stefan at frida.spi-inc.org Wed Sep 17 19:52:03 2003 From: stefan at frida.spi-inc.org (Stefan Seefeld) Date: Wed Mar 2 21:06:33 2005 Subject: [Synopsis-cvs] Synopsis/Synopsis/Synopsis/dist - New directory Message-ID: Update of /cvs/synopsis/Synopsis/Synopsis/dist In directory frida:/tmp/cvs-serv11173/Synopsis/dist Log Message: Directory /cvs/synopsis/Synopsis/Synopsis/dist added to the repository From stefan at frida.spi-inc.org Wed Sep 17 19:52:08 2003 From: stefan at frida.spi-inc.org (Stefan Seefeld) Date: Wed Mar 2 21:06:33 2005 Subject: [Synopsis-cvs] Synopsis/Synopsis/Synopsis/dist/command - New directory Message-ID: Update of /cvs/synopsis/Synopsis/Synopsis/dist/command In directory frida:/tmp/cvs-serv11183/Synopsis/dist/command Log Message: Directory /cvs/synopsis/Synopsis/Synopsis/dist/command added to the repository From stefan at frida.spi-inc.org Wed Sep 17 19:55:02 2003 From: stefan at frida.spi-inc.org (Stefan Seefeld) Date: Wed Mar 2 21:06:33 2005 Subject: [Synopsis-cvs] Synopsis/Synopsis autogen.sh,NONE,1.1 setup.py,1.2,1.3 Message-ID: Update of /cvs/synopsis/Synopsis In directory frida:/tmp/cvs-serv11210 Modified Files: setup.py Added Files: autogen.sh Log Message: work on a distutils based build system. --- NEW FILE: autogen.sh --- #!/bin/sh # conf() { (cd $1 echo "Generating $1/configure..." autoconf ) } conf Synopsis/Parser/C conf Synopsis/Parser/C++ Index: setup.py =================================================================== RCS file: /cvs/synopsis/Synopsis/setup.py,v retrieving revision 1.2 retrieving revision 1.3 diff -u -p -d -r1.2 -r1.3 --- setup.py 27 Aug 2002 04:45:58 -0000 1.2 +++ setup.py 18 Sep 2003 02:54:14 -0000 1.3 @@ -11,48 +11,30 @@ from distutils.core import setup, Extens import os, sys, re +from Synopsis.dist.command.config import config +from Synopsis.dist.command.build_doc import build_doc +from Synopsis.dist.command.build import build +from Synopsis.dist.command.build_ext import build_ext + def prefix(list, pref): return map(lambda x, p=pref: p + x, list) -ext_modules = [] py_packages = ["Synopsis.Core", "Synopsis.Parser.IDL", "Synopsis.Parser.Python", "Synopsis.Linker", "Synopsis.Formatter"] -occ_src = ["buffer.cc", "hash.cc", "token.cc", "ptree.cc", "ptree-core.cc", - "encoding.cc", "env.cc", "pattern.cc", "walker.cc", "typeinfo.cc", - "parse.cc", "mop.cc", "classwalk.cc", "metaclass.cc", "quote-class.cc", - "member.cc", "cbodywalk.cc"] - -syn_src = ["synopsis.cc", "occ.cc", "swalker.cc", "ast.cc", - "builder.cc", "type.cc", "dict.cc", - "dumper.cc", "decoder.cc", "swalker-syntax.cc", - "link_map.cc", "linkstore.cc", "lookup.cc"] - -ucpp_src = ["mem.c", "hashtable.c", "cpp.c", "lexer.c", "assert.c", - "macro.c", "eval.c"] - -src = prefix(occ_src, "Synopsis/Parser/C++/occ/") -src.extend(prefix(syn_src, "Synopsis/Parser/C++/syn/")) -src.extend(prefix(ucpp_src, "Synopsis/Parser/C++/ucpp/")) - -occ_macros = [("DONT_GC", 1)] -includes = ["Synopsis/Parser/C++"] -occ = Extension("occ", src, include_dirs=includes, define_macros=occ_macros) - -ext_modules.append(occ) - data_files = ["synopsis.jpg", "synopsis200.jpg", "syn-down.png", "syn-right.png", "syn-dot.png"] from Synopsis import __version__ -setup( - name="synopsis", - version=__version__, - author="Stefan Seefeld & Stephen Davies", - author_email="synopsis-devel@lists.sf.net", - description="source code inspection tool", - url="http://synopsis.sf.net", - packages=py_packages, - ext_modules=ext_modules, - data_files=[('share/Synopsis', prefix(data_files, "share/"))] - ) +setup(cmdclass={'config':config, + 'build_doc':build_doc, + 'build_ext':build_ext, + 'build':build}, + name="synopsis", + version=__version__, + author="Stefan Seefeld & Stephen Davies", + author_email="synopsis-devel@lists.sf.net", + description="source code inspection tool", + url="http://synopsis.fresco.org", + packages=py_packages, + data_files=[('share/Synopsis', prefix(data_files, "share/"))]) From stefan at frida.spi-inc.org Wed Sep 17 19:55:02 2003 From: stefan at frida.spi-inc.org (Stefan Seefeld) Date: Wed Mar 2 21:06:33 2005 Subject: [Synopsis-cvs] Synopsis/Synopsis/Synopsis/dist __init__.py,NONE,1.1 Message-ID: Update of /cvs/synopsis/Synopsis/Synopsis/dist In directory frida:/tmp/cvs-serv11210/Synopsis/dist Added Files: __init__.py Log Message: work on a distutils based build system. --- NEW FILE: __init__.py --- From stefan at frida.spi-inc.org Wed Sep 17 19:55:03 2003 From: stefan at frida.spi-inc.org (Stefan Seefeld) Date: Wed Mar 2 21:06:34 2005 Subject: [Synopsis-cvs] Synopsis/Synopsis/Synopsis/Parser/C Makefile.in,NONE,1.1 configure.ac,NONE,1.1 Message-ID: Update of /cvs/synopsis/Synopsis/Synopsis/Parser/C In directory frida:/tmp/cvs-serv11210/Synopsis/Parser/C Added Files: Makefile.in configure.ac Log Message: work on a distutils based build system. --- NEW FILE: Makefile.in --- # $Id: Makefile.in,v 1.1 2003/09/18 02:54:14 stefan Exp $ # # This source file is a part of the Synopsis Project. # Copyright (C) 2003 Stefan Seefeld # http://synopsis.fresco.org # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Library General Public # License as published by the Free Software Foundation; either # version 2 of the License, or (at your option) any later version. # # This library is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # Library General Public License for more details. # # You should have received a copy of the GNU Library General Public # License along with this library; if not, write to the # Free Software Foundation, Inc., 675 Mass Ave, Cambridge, # MA 02139, USA. SHELL := /bin/sh srcdir := @srcdir@ PYTHON := @PYTHON PYTHON_CPPFLAGS := -I @PYTHON_INCLUDE@ MAKEDEP := @CXX@ -M CXX := @CXX@ CPPFLAGS:= @CPPFLAGS@ $(PYTHON_CPPFLAGS) LIBS := $(CTOOL_LIBS) $(LIBS) SRC := Translator.cc ctool.cc OBJ := $(patsubst %.cc, %.o, $(SRC)) DEP := $(patsubst %.cc, %.d, $(SRC)) MODULE := ctool.$(LIBRARY_EXT) vpath %.cc $(srcdir) all: $(MODULE) $(MODULE): $(OBJ) $(CXX) -shared $(CXXFLAGS) $(LDFLAGS) -o $@ $^ $(LIBS) %.o : %.cc $(CXX) $(CPPFLAGS) $(CXXFLAGS) -c -o $@ $< %.d : %.cc $(SHELL) -ec '$(MAKEDEP) $(CPPFLAGS) $< \ | sed "s/$*\\.o[ :]*/$*\\.d $*\\.o : /g" > $@' ifeq (,$(filter $(MAKECMDGOALS), depend doc clean distclean maintainer-clean)) -include $(DEP) endif --- NEW FILE: configure.ac --- dnl $Id: configure.ac,v 1.1 2003/09/18 02:54:14 stefan Exp $ dnl dnl This source file is a part of the Synopsis Project. dnl Copyright (C) 2003 Stefan Seefeld dnl http://synopsis.fresco.org dnl dnl This library is free software; you can redistribute it and/or dnl modify it under the terms of the GNU Library General Public dnl License as published by the Free Software Foundation; either dnl version 2 of the License, or (at your option) any later version. dnl dnl This library is distributed in the hope that it will be useful, dnl but WITHOUT ANY WARRANTY; without even the implied warranty of dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU dnl Library General Public License for more details. dnl dnl You should have received a copy of the GNU Library General Public dnl License along with this library; if not, write to the dnl Free Software Foundation, Inc., 675 Mass Ave, Cambridge, dnl MA 02139, USA. dnl dnl Process this file with autoconf to produce a configure script. dnl ------------------------------------------------------------------ dnl Autoconf initialization dnl ------------------------------------------------------------------ AC_PREREQ(2.56) AC_REVISION($Revision: 1.1 $) AC_INIT(occ, 1.0, synopsis-devel@fresco.org) AC_ARG_WITH(python, [ --with-python=PATH specify the Python interpreter], PYTHON="$with_python", PYTHON="" ) AC_PROG_CPP AC_PROG_CC AC_PROG_CXX if test -n "$PYTHON" -a "$PYTHON" != yes; then AC_CHECK_FILE($PYTHON,,AC_MSG_ERROR([Cannot find Python interpreter])) else AC_PATH_PROG(PYTHON, python2 python, python) fi PYTHON_INCLUDE=`$PYTHON -c "from distutils import sysconfig; print sysconfig.get_python_inc()"` AC_SUBST(PYTHON) AC_SUBST(PYTHON_INCLUDE) AC_CONFIG_FILES([Makefile]) AC_OUTPUT From stefan at frida.spi-inc.org Wed Sep 17 19:55:04 2003 From: stefan at frida.spi-inc.org (Stefan Seefeld) Date: Wed Mar 2 21:06:34 2005 Subject: [Synopsis-cvs] Synopsis/Synopsis/Synopsis/Parser/C++ Makefile.in,NONE,1.1 configure.ac,NONE,1.1 Message-ID: Update of /cvs/synopsis/Synopsis/Synopsis/Parser/C++ In directory frida:/tmp/cvs-serv11210/Synopsis/Parser/C++ Added Files: Makefile.in configure.ac Log Message: work on a distutils based build system. --- NEW FILE: Makefile.in --- # $Id: Makefile.in,v 1.1 2003/09/18 02:54:14 stefan Exp $ # # This source file is a part of the Synopsis Project # Copyright (C) 2003 Stefan Seefeld # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Library General Public # License as published by the Free Software Foundation; either # version 2 of the License, or (at your option) any later version. # # This library is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # Library General Public License for more details. # # You should have received a copy of the GNU Library General Public # License along with this library; if not, write to the # Free Software Foundation, Inc., 675 Mass Ave, Cambridge, # MA 02139, USA. SHELL = /bin/sh dummy: --- NEW FILE: configure.ac --- dnl $Id: configure.ac,v 1.1 2003/09/18 02:54:14 stefan Exp $ dnl dnl This source file is a part of the Synopsis Project. dnl Copyright (C) 2003 Stefan Seefeld dnl http://synopsis.fresco.org dnl dnl This library is free software; you can redistribute it and/or dnl modify it under the terms of the GNU Library General Public dnl License as published by the Free Software Foundation; either dnl version 2 of the License, or (at your option) any later version. dnl dnl This library is distributed in the hope that it will be useful, dnl but WITHOUT ANY WARRANTY; without even the implied warranty of dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU dnl Library General Public License for more details. dnl dnl You should have received a copy of the GNU Library General Public dnl License along with this library; if not, write to the dnl Free Software Foundation, Inc., 675 Mass Ave, Cambridge, dnl MA 02139, USA. dnl dnl Process this file with autoconf to produce a configure script. dnl ------------------------------------------------------------------ dnl Autoconf initialization dnl ------------------------------------------------------------------ AC_PREREQ(2.56) AC_REVISION($Revision: 1.1 $) AC_INIT(occ, 1.0, synopsis-devel@fresco.org) AC_ARG_WITH(python, [ --with-python=PATH specify the Python interpreter], PYTHON="$with_python", PYTHON="" ) AC_PROG_CPP AC_PROG_CC AC_PROG_CXX if test -n "$PYTHON" -a "$PYTHON" != yes; then AC_CHECK_FILE($PYTHON,,AC_MSG_ERROR([Cannot find Python interpreter])) else AC_PATH_PROG(PYTHON, python2 python, python) fi PYTHON_INCLUDE=`$PYTHON -c "from distutils import sysconfig; print sysconfig.get_python_inc()"` AC_SUBST(PYTHON) AC_SUBST(PYTHON_INCLUDE) AC_CONFIG_FILES([Makefile]) #temporary hack until the file layout can be reworked a bit... mkdir -p ../occ mkdir -p ../ucpp AC_OUTPUT From stefan at frida.spi-inc.org Wed Sep 17 19:55:04 2003 From: stefan at frida.spi-inc.org (Stefan Seefeld) Date: Wed Mar 2 21:06:34 2005 Subject: [Synopsis-cvs] Synopsis/Synopsis/Synopsis/dist/command __init__.py,NONE,1.1 build.py,NONE,1.1 build_doc.py,NONE,1.1 build_ext.py,NONE,1.1 config.py,NONE,1.1 Message-ID: Update of /cvs/synopsis/Synopsis/Synopsis/dist/command In directory frida:/tmp/cvs-serv11210/Synopsis/dist/command Added Files: __init__.py build.py build_doc.py build_ext.py config.py Log Message: work on a distutils based build system. --- NEW FILE: __init__.py --- --- NEW FILE: build.py --- import os, sys, string from distutils.command import build class build(build.build): sub_commands = build.build.sub_commands[:] + [('build_doc', None)] --- NEW FILE: build_doc.py --- import os, sys, string from distutils.command import build from distutils.dir_util import mkpath from distutils.spawn import spawn, find_executable from shutil import * class build_doc(build.build): description = "build documentation" def run(self): xmlto = find_executable('xmlto') if not xmlto: self.announce("cannot build html docs without 'xmlto'") return self.announce("building html manual") srcdir = os.path.abspath('docs/Manual/') tempdir = os.path.abspath(os.path.join(self.build_temp, 'share/doc/synopsis')) builddir = os.path.abspath(os.path.join(self.build_lib, 'share/doc/synopsis')) cwd = os.getcwd() mkpath(tempdir, 0777, self.verbose, self.dry_run) os.chdir(tempdir) spawn([xmlto, '--skip-validation', '-o', 'html', '-m', os.path.join(srcdir, 'synopsis-html.xsl'), 'html', os.path.join(srcdir, 'synopsis.xml')]) mkpath(builddir, 0777, self.verbose, self.dry_run) if os.path.isdir(os.path.join(builddir, 'html')): rmtree(os.path.join(builddir, 'html'), 1) copytree(os.path.join(tempdir, 'html'), os.path.join(builddir, 'html')) docbook2pdf = find_executable('docbook2pdf') if not docbook2pdf: self.announce("cannot build pdf docs without 'docbook2pdf'") return self.announce("building pdf manual") spawn([docbook2pdf, os.path.join(srcdir, 'synopsis.xml')]) copy2('synopsis.pdf', builddir) os.chdir(cwd) --- NEW FILE: build_ext.py --- import os, sys, string from distutils.command import build_ext from distutils.dir_util import mkpath from distutils.spawn import spawn, find_executable from shutil import * class build_ext(build_ext.build_ext): extensions = ['Synopsis/Parser/C', 'Synopsis/Parser/C++'] def run(self): for ext in build_ext.extensions: self.build_extension(ext) def get_source_files(self): def collect(arg, path, files): files.extend(os.listdir(path)) print path, os.listdir(path) files = [] for ext in build_ext.extensions: print 'walking', ext os.path.walk(ext, #lambda arg, path, files : print path, os.listdir(path), collect, files) print files return files def build_extension(self, ext): self.announce("building '%s'" % ext) path = os.path.join(self.build_temp, ext) if not os.path.exists(path): self.run_command('config') command = "make -C %s"%(path) spawn(['sh', '-c', command], self.verbose, self.dry_run) #if self.build_temp != self.build_lib: --- NEW FILE: config.py --- import os, sys, string from distutils.core import setup from distutils.command import build, build_ext from distutils.util import get_platform from distutils.dir_util import mkpath from distutils.spawn import spawn, find_executable from shutil import * class config(build.build): """derive from build since we use almost all the same options""" description = "configure the package" extensions = ['Synopsis/Parser/C', 'Synopsis/Parser/C++'] def run(self): self.config_extensions() def config_extensions(self): for ext in config.extensions: self.config_extension(ext) def config_extension(self, ext): self.announce("configuring '%s'" % ext) path = os.path.join(self.build_temp, ext) mkpath (path, 0777, self.verbose, self.dry_run) srcdir = os.path.abspath(ext) tempdir = os.path.abspath(os.path.join(self.build_temp, ext)) builddir = os.path.abspath(os.path.join(self.build_lib, ext)) configure = os.path.join(srcdir, 'configure') cwd = os.getcwd() mkpath(tempdir, 0777, self.verbose, self.dry_run) os.chdir(tempdir) command = "%s/configure --with-python=%s"%(srcdir, sys.executable) spawn(['sh', '-c', command], self.verbose, self.dry_run) os.chdir(cwd) From stefan at frida.spi-inc.org Wed Sep 17 21:11:01 2003 From: stefan at frida.spi-inc.org (Stefan Seefeld) Date: Wed Mar 2 21:06:34 2005 Subject: [Synopsis-cvs] Synopsis/Synopsis/Synopsis/dist/command config.py,1.1,1.2 Message-ID: Update of /cvs/synopsis/Synopsis/Synopsis/dist/command In directory frida:/tmp/cvs-serv13145/Synopsis/dist/command Modified Files: config.py Log Message: C++ and C parser modules now compile via 'python setup.py build_ext'. Index: config.py =================================================================== RCS file: /cvs/synopsis/Synopsis/Synopsis/dist/command/config.py,v retrieving revision 1.1 retrieving revision 1.2 diff -u -p -d -r1.1 -r1.2 --- config.py 18 Sep 2003 02:54:14 -0000 1.1 +++ config.py 18 Sep 2003 04:10:05 -0000 1.2 @@ -12,8 +12,21 @@ class config(build.build): description = "configure the package" + user_options = build.build.user_options[:] + [ + ('disable-gc', None, + "whether or not to build the C++ parser with the garbage collector") + ] + boolean_options = build.build.boolean_options[:] + ['disable-gc'] + extensions = ['Synopsis/Parser/C', 'Synopsis/Parser/C++'] + def initialize_options (self): + build.build.initialize_options(self) + self.disable_gc = 0 + + def finalize_options (self): + build.build.finalize_options(self) + def run(self): self.config_extensions() @@ -22,7 +35,9 @@ class config(build.build): for ext in config.extensions: self.config_extension(ext) - + if not self.disable_gc: + self.config_extension('Synopsis/Parser/C++/gc') + def config_extension(self, ext): self.announce("configuring '%s'" % ext) @@ -38,5 +53,8 @@ class config(build.build): os.chdir(tempdir) command = "%s/configure --with-python=%s"%(srcdir, sys.executable) + if ext == 'Synopsis/Parser/C++' and self.disable_gc: + command += ' --disable-gc' + self.announce(command) spawn(['sh', '-c', command], self.verbose, self.dry_run) os.chdir(cwd) From stefan at frida.spi-inc.org Wed Sep 17 21:11:02 2003 From: stefan at frida.spi-inc.org (Stefan Seefeld) Date: Wed Mar 2 21:06:34 2005 Subject: [Synopsis-cvs] Synopsis/Synopsis/Synopsis/Parser/C configure.ac,1.1,1.2 Makefile.in,1.1,1.2 Message-ID: Update of /cvs/synopsis/Synopsis/Synopsis/Parser/C In directory frida:/tmp/cvs-serv13145/Synopsis/Parser/C Modified Files: configure.ac Makefile.in Log Message: C++ and C parser modules now compile via 'python setup.py build_ext'. Index: configure.ac =================================================================== RCS file: /cvs/synopsis/Synopsis/Synopsis/Parser/C/configure.ac,v retrieving revision 1.1 retrieving revision 1.2 diff -u -p -d -r1.1 -r1.2 --- configure.ac 18 Sep 2003 02:54:14 -0000 1.1 +++ configure.ac 18 Sep 2003 04:10:05 -0000 1.2 @@ -48,5 +48,31 @@ PYTHON_INCLUDE=`$PYTHON -c "from distuti AC_SUBST(PYTHON) AC_SUBST(PYTHON_INCLUDE) +dnl +dnl optionally support ctool C parser +dnl +AC_ARG_ENABLE(ctool, + AC_HELP_STRING([--enable-ctool],[Configure with ctool support]), + [config_ctool="$enableval"],[config_ctool="yes"]) +CTOOL= +if test ".$config_ctool" = ".yes"; then + AC_LANG(C++) + AC_ARG_WITH(ctool-prefix, + [ --with-ctool-prefix ctool prefix], + [ctool_prefix="$withval"]) + if test ".$ctool_prefix" != "." ; then + CTOOL_LIBS="-L$ctool_prefix/lib" + CTOOL_CPPFLAGS="-I$ctool_prefix/include" + fi + save_CPPFLAGS="$CPPFLAGS" + CPPFLAGS="$CPPFLAGS $CTOOL_CPPFLAGS" + AC_CHECK_HEADER(ctool/ctool.h, CTOOL=1) + CPPFLAGS="$save_CPPFLAGS" + CTOOL_LIBS="$CTOOL_LIBS -lctool" +fi +AC_SUBST(CTOOL) +AC_SUBST(CTOOL_CPPFLAGS) +AC_SUBST(CTOOL_LIBS) + AC_CONFIG_FILES([Makefile]) AC_OUTPUT Index: Makefile.in =================================================================== RCS file: /cvs/synopsis/Synopsis/Synopsis/Parser/C/Makefile.in,v retrieving revision 1.1 retrieving revision 1.2 diff -u -p -d -r1.1 -r1.2 --- Makefile.in 18 Sep 2003 02:54:14 -0000 1.1 +++ Makefile.in 18 Sep 2003 04:10:05 -0000 1.2 @@ -23,19 +23,22 @@ SHELL := /bin/sh srcdir := @srcdir@ -PYTHON := @PYTHON +PYTHON := @PYTHON@ PYTHON_CPPFLAGS := -I @PYTHON_INCLUDE@ +CTOOL := @CTOOL@ MAKEDEP := @CXX@ -M CXX := @CXX@ -CPPFLAGS:= @CPPFLAGS@ $(PYTHON_CPPFLAGS) -LIBS := $(CTOOL_LIBS) $(LIBS) +CPPFLAGS:= @CPPFLAGS@ @CTOOL_CPPFLAGS@ $(PYTHON_CPPFLAGS) +LIBS := @CTOOL_LIBS@ $(LIBS) SRC := Translator.cc ctool.cc OBJ := $(patsubst %.cc, %.o, $(SRC)) DEP := $(patsubst %.cc, %.d, $(SRC)) +ifeq ($(CTOOL), 1) MODULE := ctool.$(LIBRARY_EXT) +endif vpath %.cc $(srcdir) From stefan at frida.spi-inc.org Wed Sep 17 21:11:02 2003 From: stefan at frida.spi-inc.org (Stefan Seefeld) Date: Wed Mar 2 21:06:34 2005 Subject: [Synopsis-cvs] Synopsis/Synopsis/Synopsis/Parser/C++/syn link.cc,1.25,1.26 Message-ID: Update of /cvs/synopsis/Synopsis/Synopsis/Parser/C++/syn In directory frida:/tmp/cvs-serv13145/Synopsis/Parser/C++/syn Modified Files: link.cc Log Message: C++ and C parser modules now compile via 'python setup.py build_ext'. Index: link.cc =================================================================== RCS file: /cvs/synopsis/Synopsis/Synopsis/Parser/C++/syn/link.cc,v retrieving revision 1.25 retrieving revision 1.26 diff -u -p -d -r1.25 -r1.26 --- link.cc 9 Dec 2002 13:53:50 -0000 1.25 +++ link.cc 18 Sep 2003 04:10:05 -0000 1.26 @@ -24,6 +24,9 @@ // 02111-1307, USA. // $Log$ +// Revision 1.26 2003/09/18 04:10:05 stefan +// C++ and C parser modules now compile via 'python setup.py build_ext'. +// // Revision 1.25 2002/12/09 13:53:50 chalky // Fixed to not use the PyString's internal data for the toc list // @@ -687,7 +690,11 @@ int main(int argc, char** argv) #else -#include PYTHON_INCLUDE +#ifdef PYTHON_INCLUDE +# include PYTHON_INCLUDE +#else +# include +#endif extern "C" { From stefan at frida.spi-inc.org Wed Sep 17 21:11:03 2003 From: stefan at frida.spi-inc.org (Stefan Seefeld) Date: Wed Mar 2 21:06:34 2005 Subject: [Synopsis-cvs] Synopsis/Synopsis autogen.sh,1.1,1.2 Message-ID: Update of /cvs/synopsis/Synopsis In directory frida:/tmp/cvs-serv13145 Modified Files: autogen.sh Log Message: C++ and C parser modules now compile via 'python setup.py build_ext'. Index: autogen.sh =================================================================== RCS file: /cvs/synopsis/Synopsis/autogen.sh,v retrieving revision 1.1 retrieving revision 1.2 diff -u -p -d -r1.1 -r1.2 --- autogen.sh 18 Sep 2003 02:54:14 -0000 1.1 +++ autogen.sh 18 Sep 2003 04:10:05 -0000 1.2 @@ -11,3 +11,4 @@ conf() conf Synopsis/Parser/C conf Synopsis/Parser/C++ +conf Synopsis/Parser/C++/gc From stefan at frida.spi-inc.org Wed Sep 17 21:11:03 2003 From: stefan at frida.spi-inc.org (Stefan Seefeld) Date: Wed Mar 2 21:06:35 2005 Subject: [Synopsis-cvs] Synopsis/Synopsis/Synopsis/Parser/C++ configure.ac,1.1,1.2 Makefile.in,1.1,1.2 Message-ID: Update of /cvs/synopsis/Synopsis/Synopsis/Parser/C++ In directory frida:/tmp/cvs-serv13145/Synopsis/Parser/C++ Modified Files: configure.ac Makefile.in Log Message: C++ and C parser modules now compile via 'python setup.py build_ext'. Index: configure.ac =================================================================== RCS file: /cvs/synopsis/Synopsis/Synopsis/Parser/C++/configure.ac,v retrieving revision 1.1 retrieving revision 1.2 diff -u -p -d -r1.1 -r1.2 --- configure.ac 18 Sep 2003 02:54:14 -0000 1.1 +++ configure.ac 18 Sep 2003 04:10:05 -0000 1.2 @@ -48,10 +48,36 @@ PYTHON_INCLUDE=`$PYTHON -c "from distuti AC_SUBST(PYTHON) AC_SUBST(PYTHON_INCLUDE) +AC_ARG_ENABLE([gc], + [ --disable-gc don't use garbage collector in C++ parser (default is enabled)], + [USE_GC=no],[USE_GC=yes]) + +AC_SUBST(USE_GC) + +dnl check for libdl +AC_CHECK_LIB(dl, dlopen, [LIBS="-ldl $LIBS"]) + +dnl Check host for things like -fPIC and library extension +AC_MSG_CHECKING([for library file extension]) +cpp_profile="" +case `uname -s` in +CYGWIN*) + LIBEXT=dll + ;; +*) + CXXFLAGS="$CXXFLAGS -fPIC" + LIBEXT=so + ;; +esac +AC_MSG_RESULT([$LIBEXT]) + +AC_SUBST(LIBEXT) + AC_CONFIG_FILES([Makefile]) #temporary hack until the file layout can be reworked a bit... -mkdir -p ../occ -mkdir -p ../ucpp +mkdir -p ucpp +mkdir -p occ +mkdir -p syn AC_OUTPUT Index: Makefile.in =================================================================== RCS file: /cvs/synopsis/Synopsis/Synopsis/Parser/C++/Makefile.in,v retrieving revision 1.1 retrieving revision 1.2 diff -u -p -d -r1.1 -r1.2 --- Makefile.in 18 Sep 2003 02:54:14 -0000 1.1 +++ Makefile.in 18 Sep 2003 04:10:05 -0000 1.2 @@ -20,4 +20,137 @@ SHELL = /bin/sh -dummy: \ No newline at end of file +srcdir := @srcdir@ + +PYTHON := @PYTHON@ + +CC := @CC@ +CXX := @CXX@ +MAKEDEP := $(CXX) -M +CPPFLAGS := @CPPFLAGS@ -I $(srcdir) -I @PYTHON_INCLUDE@ +CFLAGS := @CFLAGS@ +CXXFLAGS := @CXXFLAGS@ +LIBS := @LIBS@ -lpthread +LIBRARY_EXT := @LIBEXT@ + +USE_GC := @USE_GC@ + +ifeq ($(USE_GC), yes) +GC_LIB := gc/.libs/libgc.a +else +CPPFLAGS += -DDONT_GC +endif + +UCPP_FLAGS := -DSYNOPSIS -DSTAND_ALONE -DAUDIT -DMEM_CHECK +UCPP_AFLAGS := -DSTAND_ALONE -DAUDIT -DMEM_CHECK + +UCPP_LIB := ucpp/ucpp.a +UCPP_GLIB := ucpp/ucpp.ga +OCC_SO := occ.$(LIBRARY_EXT) +LINK_SO := link.$(LIBRARY_EXT) + +OCC_FILES := buffer hash token ptree ptree-core encoding env \ + pattern walker typeinfo parse mop classwalk \ + metaclass quote-class member cbodywalk + +SYN_FILES := synopsis occ swalker ast builder type dict \ + dumper decoder swalker-syntax link_map linkstore \ + lookup filter + +UCPP_FILES := mem hashtable cpp lexer assert macro eval + +# Generate sources, objs and debug-objs from the FILES +OCC_SOURCES := $(patsubst %, occ/%.cc, $(OCC_FILES)) +OCC_OBJ := $(patsubst %, occ/%.o, $(OCC_FILES)) +OCC_GOBJ := $(patsubst %, occ/%.go,$(OCC_FILES)) +SYN_SOURCES := $(patsubst %, syn/%.cc, $(SYN_FILES)) +SYN_OBJ := $(patsubst %, syn/%.o, $(SYN_FILES)) +SYN_GOBJ := $(patsubst %, syn/%.go,$(SYN_FILES)) +UCPP_SOURCES := $(patsubst %, ucpp/%.c, $(UCPP_FILES)) +UCPP_OBJ := $(patsubst %, ucpp/%.o, $(UCPP_FILES)) +UCPP_GOBJ := $(patsubst %, ucpp/%.go,$(UCPP_FILES)) +UCPP_AOBJ := $(patsubst %, ucpp/%.ao,$(UCPP_FILES)) + +TARGETS = $(OCC_SO) $(LINK_SO) + +vpath %.cc $(srcdir) +vpath %.c $(srcdir) +vpath %.h $(srcdir) + +all: $(TARGETS) + +# This compiles the OCC files in the parent dir +$(OCC_OBJ): %.o : %.cc + $(CXX) $(CPPFLAGS) -I$(srcdir)/gc/include -I$(srcdir)/occ $(CXXFLAGS) $(OPTIMISE) -c -o $@ $< + +# This compiles the parser files with optimisation +$(SYN_OBJ): %.o : %.cc + $(CXX) $(CPPFLAGS) -I$(srcdir)/gc/include $(SYN_FLAGS) $(CXXFLAGS) $(OPTIMISE) -c -o $@ $< + +# This compiles the UCPP files from ../ucpp +$(UCPP_OBJ): %.o : %.c + $(CC) $(CPPFLAGS) $(CFLAGS) $(UCPP_FLAGS) $(OPTIMISE) -c -o $@ $< + +# This compiles DEBUG versions of the OCC files in the parent dir +$(OCC_GOBJ): %.go : %.cc + $(CXX) $(CPPFLAGS) -I$(srcdir)/gc/include -I$(srcdir)/occ $(CXXFLAGS) $(DEBUG) -c -o $@ $< + +# This compiles DEBUG versions of the object files with .go suffix +$(SYN_GOBJ): %.go : %.cc + $(CXX) $(CPPFLAGS) -I$(srcdir)/gc/include $(SYN_FLAGS) $(CXXFLAGS) $(DEBUG) -c -o $@ $< + +# This compiles DEBUG versions of the UCPP files +$(UCPP_GOBJ): %.go : %.c + $(CC) $(CPPFLAGS) $(UCPP_FLAGS) $(CFLAGS) $(DEBUG) -c -o $@ $< + +# This compiles STANDALONE versions of the UCPP files +$(UCPP_AOBJ): %.ao : %.c + $(CC) $(CPPFLAGS) $(UCPP_AFLAGS) $(CFLAGS) $(DEBUG) -c -o $@ $< + +link-synopsis: $(srcdir)/syn/link.cc + $(CXX) $(CPPFLAGS) -DSTANDALONE $(CXXFLAGS) $(DEBUG) $(SYN_FLAGS) -o link-synopsis link.cc + +ucpp: $(UCPP_AOBJ) + $(CC) -o $@ $^ + +# This calls make in the gc dir to create the gc.a file +$(GC_LIB): + @make -C gc + +# This creates the final occ python module +$(OCC_SO): $(UCPP_LIB) opencxx.a $(SYN_OBJ) + $(CXX) -shared $(LDFLAGS) -o $@ $^ $(LIBS) + +# This creates the final link python module +$(LINK_SO): $(srcdir)/syn/link.cc + $(CXX) -shared $(CPPFLAGS) $(SYN_FLAGS) $(LDFLAGS) -o $@ $^ $(LIBS) + +# This creates a binary with debugging and profiling that you can run +occ.gdb: $(UCPP_GLIB) opencxx.ga $(SYN_GOBJ) + $(CXX) -ggdb -pg $(LDFLAGS) -o $@ $^ $(LIBS) $(PYLIB) + +# Compile an archive of the OCC files +opencxx.a : $(GC_LIB) $(OCC_OBJ) +ifeq '$(use_gc)' 'yes' + cp $(GC_LIB) $@ +endif + ar rcs $@ $(OCC_OBJ) + +# Compile a DEBUG archive of the OCC files +opencxx.ga : $(GC_LIB) $(OCC_GOBJ) +ifeq ($(USE_GC), yes) + cp $(GC_LIB) $@ +endif + ar rcs $@ $(OCC_GOBJ) + +# Compile an archive of UCPP files +$(UCPP_LIB): $(UCPP_OBJ) + ar rcs $@ $^ + +# Compile a DEBUG archive of UCPP files +$(UCPP_GLIB): $(UCPP_GOBJ) + ar rcs $@ $^ + +clean : + +distclean: clean From stefan at fresco.org Thu Sep 18 06:04:15 2003 From: stefan at fresco.org (Stefan Seefeld) Date: Wed Mar 2 21:06:35 2005 Subject: [Synopsis-cvs] Synopsis/Synopsis/Synopsis/Parser/C Makefile.in,1.2,1.3 Message-ID: Update of /cvs/synopsis/Synopsis/Synopsis/Parser/C In directory frida:/tmp/cvs-serv25380/Synopsis/Parser/C Modified Files: Makefile.in Log Message: don't do anything, not even dep generation, if ctool isn't found. Index: Makefile.in =================================================================== RCS file: /cvs/synopsis/Synopsis/Synopsis/Parser/C/Makefile.in,v retrieving revision 1.2 retrieving revision 1.3 diff -u -p -d -r1.2 -r1.3 --- Makefile.in 18 Sep 2003 04:10:05 -0000 1.2 +++ Makefile.in 18 Sep 2003 13:02:50 -0000 1.3 @@ -54,6 +54,8 @@ $(MODULE): $(OBJ) $(SHELL) -ec '$(MAKEDEP) $(CPPFLAGS) $< \ | sed "s/$*\\.o[ :]*/$*\\.d $*\\.o : /g" > $@' +ifeq ($(CTOOL), 1) ifeq (,$(filter $(MAKECMDGOALS), depend doc clean distclean maintainer-clean)) -include $(DEP) +endif endif From stefan at synopsis.fresco.org Sun Sep 21 12:39:07 2003 From: stefan at synopsis.fresco.org (Stefan Seefeld) Date: Wed Mar 2 21:06:35 2005 Subject: [Synopsis-cvs] Synopsis/Synopsis/bin synopsis,1.7,1.8 Message-ID: Update of /cvs/synopsis/Synopsis/bin In directory frida:/tmp/cvs-serv24896/bin Modified Files: synopsis Log Message: fix Synopsis.Config.prefix Index: synopsis =================================================================== RCS file: /cvs/synopsis/Synopsis/bin/synopsis,v retrieving revision 1.7 retrieving revision 1.8 diff -u -p -d -r1.7 -r1.8 --- synopsis 20 May 2003 11:44:53 -0000 1.7 +++ synopsis 21 Sep 2003 19:37:49 -0000 1.8 @@ -26,8 +26,14 @@ import cPickle # Hack, I can't be stuffed finding places to change it :) pickle = cPickle -from Synopsis.Core import Type, AST, Util import Synopsis.Config +# This executable is supposed to live in ${prefix}/bin (posix) +# or ${prefix}\Scripts (nt) so we deduce the prefix variable +# by stripping off the last two components of the path. +# +prefix = os.path.dirname(os.path.dirname(os.path.abspath(sys.argv[0]))) +Synopsis.Config.prefix = prefix +from Synopsis.Core import Type, AST, Util def version(): print "synopsis version 0.5" cmdname = os.path.basename(sys.argv[0]) From stefan at synopsis.fresco.org Sun Sep 21 12:39:08 2003 From: stefan at synopsis.fresco.org (Stefan Seefeld) Date: Wed Mar 2 21:06:35 2005 Subject: [Synopsis-cvs] Synopsis/Synopsis/Synopsis Config.py,1.21,1.22 Message-ID: Update of /cvs/synopsis/Synopsis/Synopsis In directory frida:/tmp/cvs-serv24896/Synopsis Modified Files: Config.py Log Message: fix Synopsis.Config.prefix Index: Config.py =================================================================== RCS file: /cvs/synopsis/Synopsis/Synopsis/Config.py,v retrieving revision 1.21 retrieving revision 1.22 diff -u -p -d -r1.21 -r1.22 --- Config.py 6 Mar 2003 10:02:47 -0000 1.21 +++ Config.py 21 Sep 2003 19:37:49 -0000 1.22 @@ -78,7 +78,8 @@ references, unless a filename is needed import sys -prefix = '@prefix@' +# just a default value, which is overwritten by the synopsis executable anyways... +prefix = '/usr/local' class Base: """The base class for configuration objects. From stefan at synopsis.fresco.org Sun Sep 21 12:39:09 2003 From: stefan at synopsis.fresco.org (Stefan Seefeld) Date: Wed Mar 2 21:06:35 2005 Subject: [Synopsis-cvs] Synopsis/Synopsis setup.py,1.4,1.5 Message-ID: Update of /cvs/synopsis/Synopsis In directory frida:/tmp/cvs-serv24896 Modified Files: setup.py Log Message: fix Synopsis.Config.prefix Index: setup.py =================================================================== RCS file: /cvs/synopsis/Synopsis/setup.py,v retrieving revision 1.4 retrieving revision 1.5 diff -u -p -d -r1.4 -r1.5 --- setup.py 18 Sep 2003 20:30:21 -0000 1.4 +++ setup.py 21 Sep 2003 19:37:49 -0000 1.5 @@ -21,7 +21,8 @@ module_ext = sysconfig.get_config_var('S def prefix(list, pref): return map(lambda x, p=pref: p + x, list) -py_packages = ["Synopsis.Core", +py_packages = ["Synopsis", + "Synopsis.Core", "Synopsis.Parser.IDL", "Synopsis.Parser.Python", "Synopsis.Linker", "Synopsis.Formatter"] @@ -31,6 +32,8 @@ ext_modules = [('Synopsis/Parser/C', 'ct ('Synopsis/Parser/C++', 'link' + module_ext), ] +scripts = ['synopsis', 'synopsis-qt', 'compile-xref', 'search-xref'] + data_files = ["synopsis.jpg", "synopsis200.jpg", "syn-down.png", "syn-right.png", "syn-dot.png"] from Synopsis import __version__ @@ -46,4 +49,5 @@ setup(cmdclass={'config':config, url="http://synopsis.fresco.org", packages=py_packages, ext_modules=ext_modules, + scripts=prefix(scripts, "bin/"), data_files=[('share/Synopsis', prefix(data_files, "share/"))]) From stefan at synopsis.fresco.org Sun Sep 21 12:57:02 2003 From: stefan at synopsis.fresco.org (Stefan Seefeld) Date: Wed Mar 2 21:06:35 2005 Subject: [Synopsis-cvs] Synopsis/Synopsis/Synopsis/dist/command build_ext.py,1.3,1.4 config.py,1.3,1.4 Message-ID: Update of /cvs/synopsis/Synopsis/Synopsis/dist/command In directory frida:/tmp/cvs-serv25413/Synopsis/dist/command Modified Files: build_ext.py config.py Log Message: better integration of 'config' command into build system Index: build_ext.py =================================================================== RCS file: /cvs/synopsis/Synopsis/Synopsis/dist/command/build_ext.py,v retrieving revision 1.3 retrieving revision 1.4 diff -u -p -d -r1.3 -r1.4 --- build_ext.py 18 Sep 2003 20:30:21 -0000 1.3 +++ build_ext.py 21 Sep 2003 19:56:46 -0000 1.4 @@ -10,6 +10,8 @@ class build_ext(build_ext.build_ext): def run(self): + if not os.path.exists(self.build_temp): + self.run_command('config') for ext in self.extensions: self.build_extension(ext) @@ -31,7 +33,7 @@ class build_ext(build_ext.build_ext): output = [] for ext in self.extensions: - #only append the files that actually could be build + #only append the files that actually could be built path = os.path.join(self.build_temp, ext[0], ext[1]) if os.path.isfile(path): output.append(os.path.join(self.build_lib, ext[0], ext[1])) @@ -45,8 +47,9 @@ class build_ext(build_ext.build_ext): path = os.path.join(self.build_temp, ext[0]) if not os.path.exists(path): - self.run_command('config') - + self.announce("...not configured, skipping") + return + command = "make -C %s %s"%(path, ext[1]) spawn(['sh', '-c', command], self.verbose, self.dry_run) #The extension may not be compiled. For now just skip it. Index: config.py =================================================================== RCS file: /cvs/synopsis/Synopsis/Synopsis/dist/command/config.py,v retrieving revision 1.3 retrieving revision 1.4 diff -u -p -d -r1.3 -r1.4 --- config.py 18 Sep 2003 20:30:21 -0000 1.3 +++ config.py 21 Sep 2003 19:56:46 -0000 1.4 @@ -14,21 +14,26 @@ class config(build.build): user_options = build.build.user_options[:] + [ ('disable-gc', None, - "whether or not to build the C++ parser with the garbage collector") + "whether or not to build the C++ parser with the garbage collector"), + ('enable-c', None, + "whether or not to build the C parser") ] - boolean_options = build.build.boolean_options[:] + ['disable-gc'] + boolean_options = build.build.boolean_options[:] + ['disable-gc', 'enable-c'] def initialize_options (self): build.build.initialize_options(self) self.disable_gc = 0 + self.enable_c = 0 def finalize_options (self): build.build.finalize_options(self) # only append the path once self.extensions = [] for e in self.distribution.ext_modules: - if not self.extensions.count(e[0]): + if e[0] not in self.extensions: self.extensions.append(e[0]) + if not self.enable_c and 'Synopsis/Parser/C' in self.extensions: + self.extensions.remove('Synopsis/Parser/C') def run(self): From stefan at synopsis.fresco.org Sun Sep 21 15:52:03 2003 From: stefan at synopsis.fresco.org (Stefan Seefeld) Date: Wed Mar 2 21:06:35 2005 Subject: [Synopsis-cvs] Synopsis/Synopsis/Synopsis/Parser/C++ Makefile.in,1.3,1.4 Message-ID: Update of /cvs/synopsis/Synopsis/Synopsis/Parser/C++ In directory frida:/tmp/cvs-serv29637/Synopsis/Parser/C++ Modified Files: Makefile.in Log Message: typo... Index: Makefile.in =================================================================== RCS file: /cvs/synopsis/Synopsis/Synopsis/Parser/C++/Makefile.in,v retrieving revision 1.3 retrieving revision 1.4 diff -u -p -d -r1.3 -r1.4 --- Makefile.in 18 Sep 2003 14:50:55 -0000 1.3 +++ Makefile.in 21 Sep 2003 22:51:40 -0000 1.4 @@ -118,7 +118,7 @@ $(GC_LIB): @make -C gc # This creates the final occ python module -$(OCC_SO): $(UCPP_LIB) opencxx.a $(SYN_OBJ) +$(OCC_SO): $(SYN_OBJ) $(UCPP_LIB) opencxx.a $(CXX) -shared $(LDFLAGS) -o $@ $^ $(LIBS) # This creates the final link python module @@ -131,7 +131,7 @@ occ.gdb: $(UCPP_GLIB) opencxx.ga $(SYN_G # Compile an archive of the OCC files opencxx.a : $(GC_LIB) $(OCC_OBJ) -ifeq '$(use_gc)' 'yes' +ifeq ($(USE_GC), yes) cp $(GC_LIB) $@ endif ar rcs $@ $(OCC_OBJ) @@ -152,5 +152,7 @@ $(UCPP_GLIB): $(UCPP_GOBJ) ar rcs $@ $^ clean : - -distclean: clean + rm -f *~ syn/*.o syn/*.go occ/*.o occ/*.go ucpp/*.o ucpp/*.go ucpp/*.a ucpp/*.ga \ + *.dll *.so *core opencxx.a opencxx.ga \ + occ.gdb occ.so link.so occ.dll link.dll \ + ucpp/*.ao occ/*.o occ/*.go *.pyc *.pyo .deps.* base_lib From stefan at synopsis.fresco.org Mon Sep 22 08:49:04 2003 From: stefan at synopsis.fresco.org (Stefan Seefeld) Date: Wed Mar 2 21:06:35 2005 Subject: [Synopsis-cvs] Synopsis/Synopsis/Synopsis/Parser/C++ configure.ac,1.2,1.3 Message-ID: Update of /cvs/synopsis/Synopsis/Synopsis/Parser/C++ In directory frida:/tmp/cvs-serv21017 Modified Files: configure.ac Log Message: add the python library to LIBS when compiling on cygwin for the cygwin python Index: configure.ac =================================================================== RCS file: /cvs/synopsis/Synopsis/Synopsis/Parser/C++/configure.ac,v retrieving revision 1.2 retrieving revision 1.3 diff -u -p -d -r1.2 -r1.3 --- configure.ac 18 Sep 2003 04:10:05 -0000 1.2 +++ configure.ac 22 Sep 2003 15:47:56 -0000 1.3 @@ -63,6 +63,13 @@ cpp_profile="" case `uname -s` in CYGWIN*) LIBEXT=dll + PYTHON_VERSION=`$PYTHON -c "from distutils import sysconfig; print sysconfig.get_config_var('VERSION')"` + PYTHON_PREFIX=`$PYTHON -c "import sys; print sys.prefix"` +dnl The following lines assume we are using python from cygwin, not win32. +dnl Make that more flexible... + PYTHON_LIBS="-L $PYTHON_PREFIX/lib/python$PYTHON_VERSION/config -lpython$PYTHON_VERSION" + PYTHON_DEP_LIBS=`$PYTHON -c "from distutils import sysconfig; print sysconfig.get_config_var('LIBS') or ''"` + LIBS="$LIBS $PYTHON_LIBS $PYTHON_DEP_LIBS" ;; *) CXXFLAGS="$CXXFLAGS -fPIC" From stefan at synopsis.fresco.org Mon Sep 29 15:12:43 2003 From: stefan at synopsis.fresco.org (Stefan Seefeld) Date: Wed Mar 2 21:06:36 2005 Subject: [Synopsis-changes] Synopsis/Synopsis/Synopsis/Parser/C++ configure.ac,1.3,1.4 Message-ID: Update of /cvs/synopsis/Synopsis/Synopsis/Parser/C++ In directory frida:/tmp/cvs-serv25767/Synopsis/Parser/C++ Modified Files: configure.ac Log Message: little workaround from David Abrahams to make synopsis build on cygwin Index: configure.ac =================================================================== RCS file: /cvs/synopsis/Synopsis/Synopsis/Parser/C++/configure.ac,v retrieving revision 1.3 retrieving revision 1.4 diff -u -p -d -r1.3 -r1.4 --- configure.ac 22 Sep 2003 15:47:56 -0000 1.3 +++ configure.ac 29 Sep 2003 15:12:40 -0000 1.4 @@ -68,7 +68,11 @@ CYGWIN*) dnl The following lines assume we are using python from cygwin, not win32. dnl Make that more flexible... PYTHON_LIBS="-L $PYTHON_PREFIX/lib/python$PYTHON_VERSION/config -lpython$PYTHON_VERSION" - PYTHON_DEP_LIBS=`$PYTHON -c "from distutils import sysconfig; print sysconfig.get_config_var('LIBS') or ''"` +dnl Cygwin doesn't have an -lutil, but some versions of distutils tell us to use it anyway. +dnl It would be better to check for each library it tells us to use with AC_CHECK_LIB, but +dnl to do that, we need the name of a function in each one, so we'll just hack -lutil out +dnl of the list. + PYTHON_DEP_LIBS=`$PYTHON -c "from distutils import sysconfig; import re; print re.sub(r'\\s*-lutil', '', sysconfig.get_config_var('LIBS') or '')"` LIBS="$LIBS $PYTHON_LIBS $PYTHON_DEP_LIBS" ;; *) From stefan at synopsis.fresco.org Mon Sep 29 20:03:17 2003 From: stefan at synopsis.fresco.org (Stefan Seefeld) Date: Wed Mar 2 21:06:36 2005 Subject: [Synopsis-changes] Synopsis/Synopsis setup.py,1.5,1.6 Message-ID: Update of /cvs/synopsis/Synopsis In directory frida:/tmp/cvs-serv1373 Modified Files: setup.py Log Message: completed the list of python modules to be installed Index: setup.py =================================================================== RCS file: /cvs/synopsis/Synopsis/setup.py,v retrieving revision 1.5 retrieving revision 1.6 diff -u -p -d -r1.5 -r1.6 --- setup.py 21 Sep 2003 19:37:49 -0000 1.5 +++ setup.py 29 Sep 2003 20:03:14 -0000 1.6 @@ -23,9 +23,14 @@ def prefix(list, pref): return map(lambd py_packages = ["Synopsis", "Synopsis.Core", + "Synopsis.Parser", "Synopsis.Parser.IDL", "Synopsis.Parser.Python", + "Synopsis.Parser.C", "Synopsis.Parser.C++", "Synopsis.Linker", - "Synopsis.Formatter"] + "Synopsis.Formatter", + "Synopsis.Formatter.HTML", + "Synopsis.UI", + "Synopsis.UI.Qt"] ext_modules = [('Synopsis/Parser/C', 'ctool' + module_ext), ('Synopsis/Parser/C++', 'occ' + module_ext),