You can subscribe to this list here.
2003 |
Jan
|
Feb
|
Mar
|
Apr
|
May
(4) |
Jun
|
Jul
(68) |
Aug
(4) |
Sep
|
Oct
(23) |
Nov
(95) |
Dec
(9) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2004 |
Jan
(3) |
Feb
|
Mar
|
Apr
(51) |
May
(81) |
Jun
(2) |
Jul
(86) |
Aug
(143) |
Sep
(3) |
Oct
(31) |
Nov
(63) |
Dec
(90) |
2005 |
Jan
(277) |
Feb
(157) |
Mar
(99) |
Apr
(195) |
May
(151) |
Jun
(148) |
Jul
(98) |
Aug
(123) |
Sep
(20) |
Oct
(174) |
Nov
(155) |
Dec
(26) |
2006 |
Jan
(51) |
Feb
(19) |
Mar
(16) |
Apr
(12) |
May
(5) |
Jun
|
Jul
(11) |
Aug
(7) |
Sep
(10) |
Oct
(31) |
Nov
(174) |
Dec
(56) |
2007 |
Jan
(45) |
Feb
(52) |
Mar
(10) |
Apr
(5) |
May
(47) |
Jun
(16) |
Jul
(80) |
Aug
(29) |
Sep
(14) |
Oct
(59) |
Nov
(46) |
Dec
(16) |
2008 |
Jan
(10) |
Feb
(1) |
Mar
|
Apr
|
May
(49) |
Jun
(26) |
Jul
(8) |
Aug
(4) |
Sep
(25) |
Oct
(53) |
Nov
(9) |
Dec
(1) |
2009 |
Jan
(66) |
Feb
(11) |
Mar
(1) |
Apr
(14) |
May
(8) |
Jun
(1) |
Jul
(2) |
Aug
(2) |
Sep
(9) |
Oct
(23) |
Nov
(35) |
Dec
|
2010 |
Jan
(7) |
Feb
(2) |
Mar
(39) |
Apr
(19) |
May
(161) |
Jun
(19) |
Jul
(32) |
Aug
(65) |
Sep
(113) |
Oct
(120) |
Nov
(2) |
Dec
|
2012 |
Jan
|
Feb
(5) |
Mar
(4) |
Apr
(7) |
May
(9) |
Jun
(14) |
Jul
(1) |
Aug
|
Sep
(1) |
Oct
(1) |
Nov
(12) |
Dec
(2) |
2013 |
Jan
(1) |
Feb
(17) |
Mar
(4) |
Apr
(4) |
May
(9) |
Jun
|
Jul
(8) |
Aug
|
Sep
(2) |
Oct
|
Nov
|
Dec
|
From: Duncan C. <dun...@us...> - 2005-01-25 18:20:01
|
Update of /cvsroot/gtk2hs/gtk2hs/tools/apiGen In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv24138/tools/apiGen Modified Files: format-docs.xsl ApiGen.hs Log Message: Extract properties and events from the xml api file (but don't use them yet). Improve the formatting of definition lists. Escape things inside literals properly. Eliminate an infinite loop bug in the line wrapping algorithm. Index: format-docs.xsl =================================================================== RCS file: /cvsroot/gtk2hs/gtk2hs/tools/apiGen/format-docs.xsl,v retrieving revision 1.6 retrieving revision 1.7 diff -u -d -r1.6 -r1.7 --- format-docs.xsl 24 Jan 2005 01:39:28 -0000 1.6 +++ format-docs.xsl 25 Jan 2005 18:19:37 -0000 1.7 @@ -44,7 +44,7 @@ <xsl:template match="varlistentry"> <definition> - <term><xsl:value-of select="term"/></term> + <term><xsl:apply-templates select="term"/></term> <xsl:apply-templates select="listitem/para/child::node()"/> </definition> </xsl:template> @@ -53,6 +53,10 @@ <listitem><xsl:apply-templates/></listitem> </xsl:template> +<xsl:template match="simplelist/member"> +<listitem><xsl:apply-templates/></listitem> +</xsl:template> + <xsl:template match="section | refsect2"> <section> <title><xsl:value-of select="title"/></title> Index: ApiGen.hs =================================================================== RCS file: /cvsroot/gtk2hs/gtk2hs/tools/apiGen/ApiGen.hs,v retrieving revision 1.6 retrieving revision 1.7 diff -u -d -r1.6 -r1.7 --- ApiGen.hs 24 Jan 2005 01:39:28 -0000 1.6 +++ ApiGen.hs 25 Jan 2005 18:19:38 -0000 1.7 @@ -53,7 +53,9 @@ object_cname :: String, object_parent :: String, object_constructors :: [Constructor], - object_methods :: [Method] + object_methods :: [Method], + object_properties :: [Property], + object_signals :: [Signal] } deriving Show data Constructor = Constructor { @@ -76,6 +78,23 @@ method_parameters :: [Parameter] } deriving Show +data Property = Property { + property_name :: String, + property_cname :: String, + property_type :: String, + property_readable :: Bool, + property_writable :: Bool, + property_constructonly :: Bool + } deriving Show + +data Signal = Signal { + signal_name :: String, + signal_cname :: String, + signal_when :: String, + signal_return_type :: String, + signal_parameters :: [Parameter] + } deriving Show + ------------------------------------------------------------------------------- -- extract functions to convert the api xml file to the internal representation ------------------------------------------------------------------------------- @@ -105,17 +124,20 @@ object_cname = Xml.verbatim cname, object_parent = Xml.verbatim parent, object_constructors = catMaybes (map extractConstructor content), - object_methods = catMaybes (map extractMethod content) + object_methods = catMaybes (map extractMethod content), + object_properties = catMaybes (map extractProperty content), + object_signals = catMaybes (map extractSignal content) } extractObject _ = Nothing extractMethod :: Xml.Content -> Maybe Method -extractMethod (Xml.CElem (Xml.Elem "method" +extractMethod (Xml.CElem (Xml.Elem method [("name", Xml.AttValue name), ("cname", Xml.AttValue cname)] (Xml.CElem (Xml.Elem "return-type" [("type", Xml.AttValue return_type)] []) - :content))) = + :content))) | method == "method" + || method == "virtual_method" = Just $ Method { method_name = Xml.verbatim name, method_cname = Xml.verbatim cname, @@ -156,7 +178,6 @@ parameter_isArray = False } - extractConstructor :: Xml.Content -> Maybe Constructor extractConstructor (Xml.CElem (Xml.Elem "constructor" [("cname", Xml.AttValue cname)] content)) = @@ -170,6 +191,42 @@ } extractConstructor _ = Nothing +extractProperty :: Xml.Content -> Maybe Property +extractProperty (Xml.CElem (Xml.Elem "property" + (("name", Xml.AttValue name): + ("cname", Xml.AttValue cname): + ("type", Xml.AttValue type_):others) [])) = + Just $ Property { + property_name = Xml.verbatim name, + property_cname = Xml.verbatim cname, + property_type = Xml.verbatim type_, + property_readable = (not.null) [ () | ("readable", _) <- others], + property_writable = (not.null) [ () | ("writable", _) <- others], + property_constructonly = (not.null) [ () | ("construct-only", _) <- others] + } +extractProperty _ = Nothing + +extractSignal :: Xml.Content -> Maybe Signal +extractSignal (Xml.CElem (Xml.Elem "signal" + (("name", Xml.AttValue name): + ("cname", Xml.AttValue cname):when) + (Xml.CElem (Xml.Elem "return-type" + [("type", Xml.AttValue return_type)] []) + :content))) = + Just $ Signal { + signal_name = Xml.verbatim name, + signal_cname = Xml.verbatim cname, + signal_when = case when of + [] -> "" + [("when", Xml.AttValue when)] -> Xml.verbatim when, + signal_return_type = Xml.verbatim return_type, + signal_parameters = + case content of + [] -> [] + [Xml.CElem (Xml.Elem "parameters" [] parameters)] + -> map extractParameter parameters + } +extractSignal _ = Nothing ------------------------------------------------------------------------------- -- Types representing the content of the documentation XML file @@ -217,7 +274,7 @@ DocParaText [DocParaSpan] -- an ordinary word-wrapped paragraph | DocParaProgram String -- a verbatum section | DocParaExample String String -- a verbatum section with a title - | DocParaDefItem String [DocParaSpan] -- a definition list item + | DocParaDefItem [DocParaSpan] [DocParaSpan] -- a definition list item | DocParaListItem [DocParaSpan] -- a itemisted list item data DocParaSpan = DocText String -- just simple text @@ -332,9 +389,9 @@ extractDocParaOrSpan (Xml.CElem (Xml.Elem "listitem" [] content)) = Right $ DocParaListItem (map extractDocParaSpan content) extractDocParaOrSpan (Xml.CElem (Xml.Elem "definition" [] - (Xml.CElem (Xml.Elem "term" [] [Xml.CString _ term]) + (Xml.CElem (Xml.Elem "term" [] term) :content))) = - Right $ DocParaDefItem term (map extractDocParaSpan content) + Right $ DocParaDefItem (map extractDocParaSpan term) (map extractDocParaSpan content) extractDocParaOrSpan (Xml.CElem (Xml.Elem "programlisting" _ content)) = let listing = concat [ str | (Xml.CString _ str) <- content ] in Right $ DocParaProgram listing @@ -438,7 +495,7 @@ . map haddocFormatPara haddocFormatPara :: DocPara -> ShowS -haddocFormatPara (DocParaText spans) = haddocFormatSpans spans +haddocFormatPara (DocParaText spans) = haddocFormatSpans 3 spans haddocFormatPara (DocParaProgram prog) = ((ss "* FIXME: port the follwing code example from C to Haskell or remove it".nl. comment).) @@ -452,17 +509,21 @@ . List.lines $ prog haddocFormatPara (DocParaDefItem term spans) = - sc '['. ss term. ss "] ". - haddocFormatSpans spans + let def = (unwords . words . escape . concatMap haddocFormatSpan) term in + sc '['. ss def. ss "] ". + haddocFormatSpans (length def + 6) spans + where escape [] = [] + escape (']':cs) = '\\': ']' : escape cs --we must escape ] in def terms + escape (c:cs) = c : escape cs haddocFormatPara (DocParaListItem spans) = ss "* ". - haddocFormatSpans spans + haddocFormatSpans 5 spans -haddocFormatSpans :: [DocParaSpan] -> ShowS -haddocFormatSpans = +haddocFormatSpans :: Int -> [DocParaSpan] -> ShowS +haddocFormatSpans initialCol = sepBy' "\n-- " . map (sepBy " ") - . wrapText 77 + . wrapText initialCol 77 . words . concatMap haddocFormatSpan @@ -477,7 +538,7 @@ --likely that something should be changed to a Maybe type if this is emitted: haddocFormatSpan (DocLiteral "NULL") = "{@NULL@, FIXME: this should probably be converted" ++ " to a Maybe data type}" -haddocFormatSpan (DocLiteral text) = "@" ++ text ++ "@" +haddocFormatSpan (DocLiteral text) = "@" ++ escapeHaddockSpecialChars text ++ "@" haddocFormatSpan (DocArg text) = "@" ++ cParamNameToHsName text ++ "@" cFuncNameToHsName :: String -> String @@ -516,10 +577,11 @@ escape (c:cs) = c : escape cs -- wraps a list of words to lines of words -wrapText :: Int -> [String] -> [[String]] -wrapText width = wrap 3 [] +wrapText :: Int -> Int -> [String] -> [[String]] +wrapText initialCol width = wrap initialCol [] where wrap :: Int -> [String] -> [String] -> [[String]] + wrap 0 [] (word:words) | length word + 1 > width = wrap (length word) [word] words wrap col line (word:words) | col + length word + 1 > width = reverse line : wrap 0 [] (word:words) wrap col line (word:words) = wrap (col + length word + 1) (word:line) words wrap _ [] [] = [] @@ -595,7 +657,7 @@ formatDoc typeName = sepBy' ("\n" ++ replicate (columnIndent+5) ' ' ++ "-- ") . map (sepBy " ") - . wrapText (80 - columnIndent - 8) + . wrapText 3 (80 - columnIndent - 8) . words . concatMap haddocFormatSpan columnIndent = maximum [ length parmType | (parmType, _) <- paramTypes ] @@ -667,8 +729,7 @@ | (constructor, doc) <- constructors object docs] of [] -> id cs -> comment.ss "* Constructors".nl. - doVersionIfDefs lines cs.nl). - nl. + doVersionIfDefs lines cs.nl.nl). (case [ (ss " ". ss (cFuncNameToHsName (method_cname method)). sc ',', doc) | (method, doc) <- methods object docs] of [] -> id |
From: Duncan C. <dun...@us...> - 2005-01-25 18:19:59
|
Update of /cvsroot/gtk2hs/gtk2hs In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv24138 Modified Files: ChangeLog Log Message: Extract properties and events from the xml api file (but don't use them yet). Improve the formatting of definition lists. Escape things inside literals properly. Eliminate an infinite loop bug in the line wrapping algorithm. Index: ChangeLog =================================================================== RCS file: /cvsroot/gtk2hs/gtk2hs/ChangeLog,v retrieving revision 1.327 retrieving revision 1.328 diff -u -d -r1.327 -r1.328 --- ChangeLog 24 Jan 2005 16:06:17 -0000 1.327 +++ ChangeLog 25 Jan 2005 18:19:35 -0000 1.328 @@ -1,3 +1,13 @@ +2005-01-25 Duncan Coutts <du...@co...> + + * tools/apiGen/format-docs.xsl: deal with another kind of list and + preserve formatting in definition list terms. + + * tools/apiGen/ApiGen.hs: extract properties and events from the xml + api file (but don't use them yet). Improve the formatting of + definition lists. Escape things inside literals properly. Eliminate + an infinite loop bug in the line wrapping algorithm. + 2005-01-24 Duncan Coutts <du...@co...> * INSTALL: update the install instructions |
From: Duncan C. <dun...@us...> - 2005-01-24 16:06:34
|
Update of /cvsroot/gtk2hs/gtk2hs In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv595 Modified Files: ChangeLog configure.ac Log Message: bump version to 0.9.7 Index: configure.ac =================================================================== RCS file: /cvsroot/gtk2hs/gtk2hs/configure.ac,v retrieving revision 1.25 retrieving revision 1.26 diff -u -d -r1.25 -r1.26 --- configure.ac 20 Jan 2005 15:01:35 -0000 1.25 +++ configure.ac 24 Jan 2005 16:06:18 -0000 1.26 @@ -21,7 +21,7 @@ dnl Process this file with autoconf to produce a configure script. dnl ###################################################################### -AC_INIT(gtk2hs, 0.9.7_rc4) +AC_INIT(gtk2hs, 0.9.7) AM_INIT_AUTOMAKE dnl * We require autoconf version 2.50 Index: ChangeLog =================================================================== RCS file: /cvsroot/gtk2hs/gtk2hs/ChangeLog,v retrieving revision 1.326 retrieving revision 1.327 diff -u -d -r1.326 -r1.327 --- ChangeLog 24 Jan 2005 14:59:37 -0000 1.326 +++ ChangeLog 24 Jan 2005 16:06:17 -0000 1.327 @@ -4,6 +4,8 @@ * Makefile.am: add missing dependency. + * configure.ac: bump version to 0.9.7 + 2005-01-23 Duncan Coutts <du...@co...> * tools/apiGen/formatXml.c, tools/apiGen/gapi_parser.pl: add extra |
From: Duncan C. <dun...@us...> - 2005-01-24 14:59:49
|
Update of /cvsroot/gtk2hs/gtk2hs In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv16696 Modified Files: ChangeLog Makefile.am Log Message: Add a missing dependency. Index: Makefile.am =================================================================== RCS file: /cvsroot/gtk2hs/gtk2hs/Makefile.am,v retrieving revision 1.44 retrieving revision 1.45 diff -u -d -r1.44 -r1.45 --- Makefile.am 23 Jan 2005 15:44:30 -0000 1.44 +++ Makefile.am 24 Jan 2005 14:59:39 -0000 1.45 @@ -557,6 +557,7 @@ libHSglade_a_CPPFLAGS = $(filter -I% -D%,$(GLIB_CFLAGS) $(GTK_CFLAGS) $(LIBGLADE_CFLAGS)) libHSglade_a_SOURCESDIRS = $(libHSgtk_a_SOURCESDIRS) glade +glade/libHSglade_a.deps : gtk/libHSgtk_a.deps nodist_libHSglade_a_SOURCES = \ glade/Graphics/UI/Gtk/Glade/Types.chs Index: ChangeLog =================================================================== RCS file: /cvsroot/gtk2hs/gtk2hs/ChangeLog,v retrieving revision 1.325 retrieving revision 1.326 diff -u -d -r1.325 -r1.326 --- ChangeLog 24 Jan 2005 13:57:07 -0000 1.325 +++ ChangeLog 24 Jan 2005 14:59:37 -0000 1.326 @@ -2,6 +2,8 @@ * INSTALL: update the install instructions + * Makefile.am: add missing dependency. + 2005-01-23 Duncan Coutts <du...@co...> * tools/apiGen/formatXml.c, tools/apiGen/gapi_parser.pl: add extra |
From: Duncan C. <dun...@us...> - 2005-01-24 13:57:18
|
Update of /cvsroot/gtk2hs/gtk2hs In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv536 Modified Files: ChangeLog INSTALL Log Message: Update the installation instructions. Index: INSTALL =================================================================== RCS file: /cvsroot/gtk2hs/gtk2hs/INSTALL,v retrieving revision 1.8 retrieving revision 1.9 diff -u -d -r1.8 -r1.9 --- INSTALL 25 Nov 2004 12:33:46 -0000 1.8 +++ INSTALL 24 Jan 2005 13:57:07 -0000 1.9 @@ -1,10 +1,13 @@ -gtk2hs: A binding of Gtk Version 2 for the programming language Haskell +Gtk2Hs: A binding of Gtk+ Version 2.x for the programming language Haskell + +http://gtk2hs.sourceforge.net/ The library currently wraps most functions for GUI programming from -the gtk 2.0 libraries. Furthermore there is support for the Pixbuf -functions and the SourceView widget. +the gtk 2.4 libraries. Furthermore there is support for the Pixbuf +functions, the libglade UI loader, the SourceView widget, the GConf +configuration system, and the Mozilla rendering engine embeded in a widget. -The GHC Haskell compiler, version 5.02 or greater, is required. Some +The GHC Haskell compiler, version 5.04 or greater, is required. Some callback (those with more than 4 words of arguments...) cannot be used on Solaris due to a limitation in GHC. Gtk2hs has been compiled successfully on FreeBSD, Linux, Solaris, Darwin and Windows (MinGW). @@ -12,15 +15,19 @@ Building -------- -If you build on Windows, read "Building on Windows" first. +Check the gtk2hs web page to see if there is a pre-prepared package for your +system. They make everying much easier. If there is not you will need to build +from sources yourself. + +If you are building on Windows, read "Building on Windows" first. The following assumes that the sources are in ~/gtk2hs. 1. Produce a configure file. -~/gtk2hs:$ autoconf +~/gtk2hs:$ autoreconf You may omit this step if you've downloaded the source tarball. If, however, -step 2 fails for no obvious reason you should run autoconf. (I've seen +step 2 fails for no obvious reason you should run autoreconf. (I've seen ghc-pkg not being found when copying ./configure from FreeBSD, autoconf 2.53 to Solaris, autoconf 2.52.) @@ -31,14 +38,21 @@ --with-hc=<path to your ghc> Uses the specified GHC for compilation and for installation of the package. +--with-hcflags=<path to your ghc> + If you find that you need to pass any special flags to the Haskell compiler + then use this option to specify them. This overrides the default flags which + is just "-O" to compile using optimisations. + --with-c2hs=no Uses the c2hs binding tool that comes with gtk2hs. This special version - works much faster than the normal c2hs form Manuel's website. See + works much faster than the normal c2hs from Manuel's website. See configure.in for more details. This setting is the default. --with-c2hs=yes Search for a c2hs installation in the current PATH. +NOTE: using an external version of c2hs is not currently working! + --with-c2hs=<path to your c2hs-config> Use this specific installation of c2hs. Make sure you specify the c2hs-config program, not c2hs itself. @@ -46,6 +60,36 @@ --with-pkgconf=<your pkg.conf file> Use a local package.conf file to install the gtk2hs package in. See below. +--without-pkgreg + This option disables registering the packages in any package.conf file. This + is useful to people building on one machine but wanting to install on + another, eg people packaging gtk2hs for use with a package management system. + +--disable-libglade + By default, bindings for the libglade library will be built. If you do not + have this library installed you will need to use this option. + +--disable-gnome + By default, bindings for some Gnome modules will be built. At the moment + these are GConf and GtksourceView. If you do not have all these libraries + installed you will need to use this option. + +--disable-mozilla + By default, bindings for GtkMozEmbed, the Mozilla regnering engine in a + widget, will be built. You need Mozilla 1.4 or later installed for this, + othersie you will need to use this option to not build these bindings. + +--disable-deprecated + There are many Gtk+ APIs that have been deprecated as new versions of Gtk+ + have come out. This option makes sure that no deprecated APIs are used. You + might want to use this option to make sure that you are not using deprecated + APIs in your new programs. + +--enable-docs + This builds reference documentation in html format. These are also available + from the website but you may prefer to keep a local copy. You will need + haddock version 0.6 or later tob build the documentation. + With --help you can ask ./configure what options it supports. Add any of these options to the following command: @@ -63,11 +107,13 @@ This will build the package "in place" which means all library files stay in the source tree. If you have used --with-pkgconf=mypkg.conf in -step two, the gtk2hs and mogul package will be available through this +step two, the gtk and other packages will be available through this file. The default name for this file is localpackage.conf in the root of the source tree. To use an "in place" installation you say: -ghc --make MyProg.hs -package-conf ~/gtk2hs/localpackage.conf -package mogul +ghc --make MyProg.hs -package-conf ~/gtk2hs/localpackage.conf + +(If you are using ghc 6.0 or earlier you also need to use -package gtk) If you are happy with this solution or if you don't have the privileges to write to the location where GHC lives, you stop here. @@ -82,61 +128,41 @@ Now you can compile your programs simply by saying: -ghc --make MyProg.hs -package mogul +ghc --make MyProg.hs + +(If you are using ghc 6.0 or earlier you also need to use -package gtk) 5. Documentation -The documentation is only preliminary, as such it cannot yet be -installed, only built. You need to have xsltproc installed, -furthermore Docbook XML and XSLT in the version 4.1.2. There is no -propper way to find the DTD and the stylesheet, so you need to tell -configure where to find them. You say +The documentation is avaliable on the website. You can also build the +documentation locally. You say -~/gtk2hs:$ ./configure --with-catalog=/usr/local/share/xml/catalog +~/gtk2hs:$ ./configure --enable-docs -for a system which has a XML catalog file (with a pointer to the -Docbook DTD) installed in the mentioned place. The configure script -now tries to be clever and searches for translators to html in -/usr/local/share/xsl/. If that is not successful, you need to -explicitly state --with-html=/usr/local/share/xsl/xhtml/chunk.xsl or -similar. If all is ok you find some html files in ~/gtk2hs/doc/MOGUL -and ~/gtk2hs/doc/GTK . +By default the documentation is installed into $(datadir)/doc/gtk2hs/html Note: -1. Do not delete the source tree if you intend to deinstall the package at - some point. You do this by saying +* So long as you do not delete the source tree if you can easily uninstall + everything that gtk2hs installed by saying ~/gtk2hs:$ make uninstall in the root of the source tree. This will properly remove the package from GHC and remove any installed file. -2. After installing the sources, the packages are not available anymore from - the local package file. At the time of writing GHC has a problem with the - same package being available in the global and the local package.conf file. - If this should be fixed in the future, you can say - - ~/gtk2hs:$ make inplace - - to install the package locally again. - -3. If your compilation falls over saying - - Foo.hs: file name does not match module name `Foo' - - you should check if running hsc2hs resulted in a message like - - ld.so.1: general/StockItems_hsc_make: fatal: libgtk-x11-2.0.so.0: open failed: - No such file or directory - Killed + Alteratively, if you do not keep the source tree around then you can + uninstall by unregistering the packages with ghc-pkg and deleting all the + isntalled files. Assuming that you installed in the default location + (ie did not specify --prefix= during ./configure) then that would mean + doing the following: - which is an indicator that you have not set LD_LIBRARY_PATH to the - path where the GTK dynamic libraries live. It is a bug in the 5.02 - distribution of GHC that hsc2hs does not stop here. Delete Foo.hs - before you do a second attempt. + # for pkg in glib gtk mogul glade gconf sourceview mozembed; \ + > do ghc-pkg -r $pkg; done + # rm -rf /usr/local/lib/gtk2hs/ + # rm -rf /usr/local/share/doc/gtk2hs/ #if you installed the docs -Building on Window +Building on Windows -------------------- Install MSYS and MinGW. Download the following files from Index: ChangeLog =================================================================== RCS file: /cvsroot/gtk2hs/gtk2hs/ChangeLog,v retrieving revision 1.324 retrieving revision 1.325 diff -u -d -r1.324 -r1.325 --- ChangeLog 24 Jan 2005 01:54:03 -0000 1.324 +++ ChangeLog 24 Jan 2005 13:57:07 -0000 1.325 @@ -1,3 +1,7 @@ +2005-01-24 Duncan Coutts <du...@co...> + + * INSTALL: update the install instructions + 2005-01-23 Duncan Coutts <du...@co...> * tools/apiGen/formatXml.c, tools/apiGen/gapi_parser.pl: add extra |
From: Duncan C. <dun...@us...> - 2005-01-24 01:54:13
|
Update of /cvsroot/gtk2hs/gtk2hs/tools/apiGen In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv16715/tools/apiGen Modified Files: README Log Message: Update the description and intructions. Index: README =================================================================== RCS file: /cvsroot/gtk2hs/gtk2hs/tools/apiGen/README,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- README 7 Jan 2005 17:45:40 -0000 1.2 +++ README 24 Jan 2005 01:54:03 -0000 1.3 @@ -2,7 +2,7 @@ complete with haddock format documentation for all gtk modules. With a little modification it should work for any other GObject-based api. -It works by extracting an api description from the C headder files and +It works by extracting an api description from the C source files and extracting documentation from the docbook documentation produced by gtk-doc. It is semi-automatic in the sense that the resulting binding module will need @@ -24,39 +24,25 @@ in Haskell. Code samples should be converted for example. == For users: == -At the moment you will need to edit the gen-all.sh script and adjust the -DOCBOOKDIR and HEADDERS variables to your system. - -The HEADDERS variable should be a list of .h headder files to scan and generate -bindings for. It is probably better to use the installed headder files since -there are many private headder files in the gtk source directory. - -The DOCBOOKDIR should be a directory containing docbook xml files coresponding -to the HEADDERS. The gen-all.sh script will look for an $FOO.xml file for every -$FOO.h file in HEADDERS. To generate the docbook format documentation you will -need to build (but not install) a version of gtk (preferably the same version -as the .h files came from). The gtk+-$VER/docs/reference/gtk/xml directory is -where the docbook files end up for gtk (there is also gdk and gtk-pixbuf). +There is a Makefile to automate much of the process. Type just "make" to get a +list of make targets and a brief description. -The documentation is optional. If no docbook xml file is found the binding file -will still be generated but without any haddock documentation. +There are a few stages that the Makefile helps to automate: +* downloading and unpacking the source code for the right versions of packages +* configuring and building each package and their DocBook documentation +* running the tools that scan the various files and generate .chs modules -When this is done just run -./gen-all.sh -The final .chs binding files are put in the modules/ directory. -Intermediate api description files and documentation files are left under api/ -and doc/. +You will libxslt installed (since that provides the program "xsltproc") == For hackers: == There are a few components to the system: -There are a couple perl scripts written by the mono/gtk-sharp authors. These -extract information from GObject-based .h files and generate xml descriptions. -To read these files you may want to build the gapi_format_xml tool also from -the gtk-sharp source tree. The xml files assume an object oreinted target -language (C#) but it does preserve all the information ok. These scripts are -GPL so should probably not be distributed in tarballs, just left in cvs. -Besides they're just gtk2hs hacker tools. +There are a few perl scripts written by the mono/gtk-sharp authors. These +extract information from GObject-based .h & .c files and generate xml +descriptions. The xml files assume an object oreinted target language (C#) but +it does preserve all the information ok. These scripts are GPL so should +probably not be distributed in tarballs, just left in cvs. Besides they're +just gtk2hs hacker tools. There is an XSLT program to extract per function documentation from docbook xml files into a more convenient format. It is pretty specific to the format of @@ -70,6 +56,4 @@ Some improvements that would be good: * Complete marshaling code for more types - * Emit top level module documentation, including: - - object heirarchy * Emit signal and property bindings with documentation |
From: Duncan C. <dun...@us...> - 2005-01-24 01:54:13
|
Update of /cvsroot/gtk2hs/gtk2hs In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv16715 Modified Files: ChangeLog Log Message: Update the description and intructions. Index: ChangeLog =================================================================== RCS file: /cvsroot/gtk2hs/gtk2hs/ChangeLog,v retrieving revision 1.323 retrieving revision 1.324 diff -u -d -r1.323 -r1.324 --- ChangeLog 24 Jan 2005 01:40:42 -0000 1.323 +++ ChangeLog 24 Jan 2005 01:54:03 -0000 1.324 @@ -17,6 +17,8 @@ tools/apiGen/pango-sources.xml, tools/apiGen/glade-sources.xml: add gapi-parser input files for an initial set of modules. + * tools/apiGen/README: update the description and intructions. + 2005-01-23 Axel Simon <A....@ke...> * Makefile.am, mk/common.mk: Resurrect dependency generation under |
From: Duncan C. <dun...@us...> - 2005-01-24 01:40:55
|
Update of /cvsroot/gtk2hs/gtk2hs In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv13520 Modified Files: ChangeLog Log Message: Add gapi-parser input files for an initial set of modules. Index: ChangeLog =================================================================== RCS file: /cvsroot/gtk2hs/gtk2hs/ChangeLog,v retrieving revision 1.322 retrieving revision 1.323 diff -u -d -r1.322 -r1.323 --- ChangeLog 24 Jan 2005 01:39:28 -0000 1.322 +++ ChangeLog 24 Jan 2005 01:40:42 -0000 1.323 @@ -11,7 +11,11 @@ * tools/apiGen/Template.chs, tools/apiGen/format-docs.xsl, tools/apiGen/ApiGen.hs: updates to the code generation tool. Change the style from single module per file to having every module in a - single file since this is the way the gapi tools work. + single file since this is the way the gapi tool works. + + * tools/apiGen/gtk-sources.xml, tools/apiGen/gdk-sources.xml, + tools/apiGen/pango-sources.xml, tools/apiGen/glade-sources.xml: add + gapi-parser input files for an initial set of modules. 2005-01-23 Axel Simon <A....@ke...> |
From: Duncan C. <dun...@us...> - 2005-01-24 01:40:18
|
Update of /cvsroot/gtk2hs/gtk2hs/tools/apiGen In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv13348/tools/apiGen Added Files: gtk-sources.xml gdk-sources.xml pango-sources.xml glade-sources.xml Log Message: Add gapi-parser input files for an initial set of modules. --- NEW FILE: glade-sources.xml --- <gapi-parser-input> <api filename="glade-api.xml"> <library name="libglade"> <namespace name="Glade"> <dir>libglade-2.0.0/glade</dir> </namespace> </library> </api> </gapi-parser-input> --- NEW FILE: gdk-sources.xml --- <gapi-parser-input> <api filename="gdk-api.xml"> <library name="libgdk"> <namespace name="Gdk"> <dir>gtk+-2.2.2/gdk</dir> </namespace> </library> <library name="libgdk-pixbuf"> <namespace name="Gdk"> <dir>gtk+-2.2.2/gdk-pixbuf</dir> </namespace> </library> </api> </gapi-parser-input> --- NEW FILE: pango-sources.xml --- <gapi-parser-input> <api filename="pango-api.xml"> <library name="libpango"> <namespace name="Pango"> <dir>pango-1.2.3/pango</dir> <exclude>pango-1.2.3/pango/pangox-fontcache.c</exclude> <exclude>pango-1.2.3/pango/pangox-fontmap.c</exclude> <exclude>pango-1.2.3/pango/pangox-private.h</exclude> <exclude>pango-1.2.3/pango/pangox.h</exclude> <exclude>pango-1.2.3/pango/pangox.c</exclude> <exclude>pango-1.2.3/pango/pangoxft.h</exclude> <exclude>pango-1.2.3/pango/pangoxft-font.h</exclude> <exclude>pango-1.2.3/pango/pangoxft-fontmap.h</exclude> <exclude>pango-1.2.3/pango/pangoxft-private.h</exclude> </namespace> </library> </api> </gapi-parser-input> --- NEW FILE: gtk-sources.xml --- <gapi-parser-input> <api filename="gtk-api.xml"> <library name="libgtk"> <namespace name="Gtk"> <dir>gtk+-2.2.2/gtk</dir> </namespace> </library> </api> </gapi-parser-input> |
From: Duncan C. <dun...@us...> - 2005-01-24 01:39:38
|
Update of /cvsroot/gtk2hs/gtk2hs/tools/apiGen In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv12983/tools/apiGen Modified Files: Template.chs format-docs.xsl ApiGen.hs Log Message: Update the code generation tool. Change the style from single module per file to having every module in a single file since this is the way the gapi tool works. Index: Template.chs =================================================================== RCS file: /cvsroot/gtk2hs/gtk2hs/tools/apiGen/Template.chs,v retrieving revision 1.4 retrieving revision 1.5 diff -u -d -r1.4 -r1.5 --- Template.chs 12 Jan 2005 02:44:28 -0000 1.4 +++ Template.chs 24 Jan 2005 01:39:28 -0000 1.5 @@ -20,7 +20,7 @@ -- | -- Maintainer : gtk2hs-users\@lists.sourceforge.net -- Stability : provisional --- Portability : non-portable (uses gtk+ C library) +-- Portability : non-portable (uses Gtk+ C library) -- -- @DESCRIPTION@@TODO@ -- Index: format-docs.xsl =================================================================== RCS file: /cvsroot/gtk2hs/gtk2hs/tools/apiGen/format-docs.xsl,v retrieving revision 1.5 retrieving revision 1.6 diff -u -d -r1.5 -r1.6 --- format-docs.xsl 12 Jan 2005 02:44:28 -0000 1.5 +++ format-docs.xsl 24 Jan 2005 01:39:28 -0000 1.6 @@ -73,23 +73,34 @@ <xsl:template match="footnote"></xsl:template> -<xsl:template match="/"> +<xsl:template match="/apidoc"> <apidoc> + <xsl:for-each select="book"> <module> - <name><xsl:value-of select="/book/refentry/refnamediv/refname"/></name> - <summary><xsl:value-of select="/book/refentry/refnamediv/refpurpose"/></summary> + <module-info> + <name><xsl:value-of select="refentry/refnamediv/refname"/></name> + <altname><xsl:value-of select="refentry/refsynopsisdiv/anchor/@id"/></altname> + <summary><xsl:value-of select="refentry/refnamediv/refpurpose"/></summary> <description> - <xsl:for-each select="/book/refentry/refsect1[title='Description']"> + <xsl:for-each select="refentry/refsect1[title='Description']"> <xsl:apply-templates select="para | section | refsect2"/> </xsl:for-each> </description> <object-hierarchy> - <xsl:for-each select="/book/refentry/refsect1[title='Object Hierarchy']/synopsis"> - <xsl:copy-of select="text() | link"/> + <xsl:for-each select="refentry/refsect1[title='Object Hierarchy']/synopsis/node()"> + <xsl:choose> + <xsl:when test="name(.)='link'"> + <xref-type><xsl:value-of select="."/></xref-type> + </xsl:when> + <xsl:otherwise> + <xsl:value-of select="."/> + <xsl:value-of select="name(.)"/> + </xsl:otherwise> + </xsl:choose> </xsl:for-each> </object-hierarchy> - </module> - <xsl:for-each select="/book/refentry/refsect1[title='Details']/refsect2[contains(title,' ()')]"> + </module-info> + <xsl:for-each select="refentry/refsect1[title='Details']/refsect2[contains(title,' ()')]"> <function> <name><xsl:value-of select="indexterm/primary"/></name> <since> @@ -108,6 +119,8 @@ </params> </function> </xsl:for-each> + </module> + </xsl:for-each> </apidoc> </xsl:template> </xsl:transform> Index: ApiGen.hs =================================================================== RCS file: /cvsroot/gtk2hs/gtk2hs/tools/apiGen/ApiGen.hs,v retrieving revision 1.5 retrieving revision 1.6 diff -u -d -r1.5 -r1.6 --- ApiGen.hs 12 Jan 2005 02:44:28 -0000 1.5 +++ ApiGen.hs 24 Jan 2005 01:39:28 -0000 1.6 @@ -9,6 +9,7 @@ module Main (main) where import Prelude hiding (Enum, lines) +import qualified Prelude (lines) import Monad (when) import Maybe (catMaybes, fromJust) import Char (toLower, toUpper, isSpace, isAlpha, isAlphaNum, isUpper) @@ -147,7 +148,14 @@ parameter_name = Xml.verbatim name, parameter_isArray = True } - +extractParameter (Xml.CElem (Xml.Elem "callback" + [("cname", Xml.AttValue cname)] _)) = + Parameter { + parameter_type = "callback", + parameter_name = Xml.verbatim cname, + parameter_isArray = False + } + extractConstructor :: Xml.Content -> Maybe Constructor extractConstructor (Xml.CElem (Xml.Elem "constructor" @@ -166,20 +174,26 @@ ------------------------------------------------------------------------------- -- Types representing the content of the documentation XML file ------------------------------------------------------------------------------- -data ApiDoc = ApiDoc { - apidoc_name :: String, -- these docs apply to this object - apidoc_summary :: String, -- a one line summary - apidoc_description :: [DocPara], -- the main description - apidoc_sections :: [DocSection], -- any additional titled subsections - apidoc_functions :: [FuncDoc] -- documentation for each function +type ApiDoc = [ModuleDoc] + +data ModuleDoc = ModuleDoc { + moduledoc_name :: String, -- these docs apply to this object + moduledoc_altname :: String, -- sometimes a better index entry + moduledoc_summary :: String, -- a one line summary + moduledoc_description :: [DocPara], -- the main description + moduledoc_sections :: [DocSection], -- any additional titled subsections + moduledoc_hierarchy :: [DocParaSpan], -- a tree of parent objects (as text) + moduledoc_functions :: [FuncDoc] -- documentation for each function } -noApiDoc = ApiDoc { - apidoc_name = "", - apidoc_summary = "", - apidoc_description = [], - apidoc_sections = [], - apidoc_functions = [] +noModuleDoc = ModuleDoc { + moduledoc_name = "", + moduledoc_altname = "", + moduledoc_summary = "", + moduledoc_description = [], + moduledoc_sections = [], + moduledoc_hierarchy = [], + moduledoc_functions = [] } data DocSection = DocSection { @@ -219,29 +233,36 @@ -- extract functions to convert the doc xml file to the internal representation ------------------------------------------------------------------------------- extractDocumentation :: Xml.Document -> ApiDoc -extractDocumentation (Xml.Document _ _ (Xml.Elem "apidoc" [] (moduleinfo:functions))) = +extractDocumentation (Xml.Document _ _ (Xml.Elem "apidoc" [] modules)) = + map extractDocModule modules + +extractDocModule :: Xml.Content -> ModuleDoc +extractDocModule (Xml.CElem (Xml.Elem "module" [] (moduleinfo:functions))) = (extractDocModuleinfo moduleinfo) { - apidoc_functions = map extractDocFunc functions + moduledoc_functions = map extractDocFunc functions } -extractDocModuleinfo :: Xml.Content -> ApiDoc +extractDocModuleinfo :: Xml.Content -> ModuleDoc extractDocModuleinfo - (Xml.CElem (Xml.Elem "module" [] + (Xml.CElem (Xml.Elem "module-info" [] [Xml.CElem (Xml.Elem "name" [] name) + ,Xml.CElem (Xml.Elem "altname" [] altname) ,Xml.CElem (Xml.Elem "summary" [] summary) ,Xml.CElem (Xml.Elem "description" [] parasAndSections) - ,Xml.CElem (Xml.Elem "object-hierarchy" [] _)] + ,Xml.CElem (Xml.Elem "object-hierarchy" [] objHierSpans)] )) = let (paras, sections) = span (\elem -> case elem of Xml.CElem (Xml.Elem "section" _ _) -> False _ -> True) parasAndSections - in ApiDoc { - apidoc_name = Xml.verbatim name, - apidoc_summary = Xml.verbatim summary, - apidoc_description = concatMap extractDocPara paras, - apidoc_sections = map extractDocSection sections, - apidoc_functions = undefined + in ModuleDoc { + moduledoc_name = Xml.verbatim name, + moduledoc_altname = Xml.verbatim altname, + moduledoc_summary = Xml.verbatim summary, + moduledoc_description = concatMap extractDocPara paras, + moduledoc_sections = map extractDocSection sections, + moduledoc_hierarchy = map extractDocParaSpan objHierSpans, + moduledoc_functions = undefined } extractDocSection :: Xml.Content -> DocSection @@ -333,28 +354,47 @@ "literal" -> DocLiteral text "arg" -> DocArg text other -> error $ "extractDocParaSpan: other tag " ++ tag + +extractDocParaSpan other@(Xml.CRef (Xml.RefEntity entity)) = DocText (Xml.verbatim other) extractDocParaSpan other = error $ "extractDocParaSpan: " ++ Xml.verbatim other ------------------------------------------------------------------------------- -- Functions for formatting haddock documentation ------------------------------------------------------------------------------- -genModuleDocumentation :: ApiDoc -> ShowS -genModuleDocumentation apidoc = - (if null (apidoc_description apidoc) +genModuleDocumentation :: ModuleDoc -> ShowS +genModuleDocumentation moduledoc = + (if null (moduledoc_description moduledoc) then id else comment.ss "* Description".nl. comment.nl. - comment.ss "| ".haddocFormatParas (apidoc_description apidoc).nl). - (if null (apidoc_sections apidoc) + comment.ss "| ".haddocFormatParas (moduledoc_description moduledoc).nl). + (if null (moduledoc_sections moduledoc) then id - else nl.comment.haddocFormatSections (apidoc_sections apidoc).nl.comment) + else nl.comment.haddocFormatSections (moduledoc_sections moduledoc).nl.comment) + -- Getting decent formatting for the class hierarchy does not seem to be + -- possible with the available haddock markup. So disabling for now. + -- + .nl. + (if null (moduledoc_hierarchy moduledoc) + then id + else nl.comment.ss "* Class Hierarchy".nl. + comment.ss "|".nl. + comment.ss "@".nl. + comment.ss "| ".haddocFormatHierarchy (moduledoc_hierarchy moduledoc).nl. + comment.ss "@".nl) -addVersionParagraphs :: NameSpace -> ApiDoc -> ApiDoc +haddocFormatHierarchy :: [DocParaSpan] -> ShowS +haddocFormatHierarchy = + sepBy "\n-- |" + . Prelude.lines + . concatMap haddocFormatSpan + +addVersionParagraphs :: NameSpace -> ModuleDoc -> ModuleDoc addVersionParagraphs namespace apiDoc = apiDoc { - apidoc_description = apidoc_description apiDoc ++ moduleVersionParagraph, - apidoc_functions = functionVersionParagraphs moduleVersion (apidoc_functions apiDoc) + moduledoc_description = moduledoc_description apiDoc ++ moduleVersionParagraph, + moduledoc_functions = functionVersionParagraphs moduleVersion (moduledoc_functions apiDoc) } where functionVersionParagraphs :: Maybe String -> [FuncDoc] -> [FuncDoc] functionVersionParagraphs baseVersion funcdocs = @@ -380,7 +420,7 @@ -- than the original version moduleVersion :: Maybe String moduleVersion = case [ funcdoc_since funcdoc - | funcdoc <- apidoc_functions apiDoc ] of + | funcdoc <- moduledoc_functions apiDoc ] of [] -> Nothing versions -> minimum versions @@ -560,11 +600,11 @@ . concatMap haddocFormatSpan columnIndent = maximum [ length parmType | (parmType, _) <- paramTypes ] -genModuleBody :: Object -> ApiDoc -> ShowS +genModuleBody :: Object -> ModuleDoc -> ShowS genModuleBody object apiDoc = doVersionIfDefs (sepBy' "\n\n") $ - genConstructors object (apidoc_functions apiDoc) - ++ genMethods object (apidoc_functions apiDoc) + genConstructors object (moduledoc_functions apiDoc) + ++ genMethods object (moduledoc_functions apiDoc) genMethods :: Object -> [FuncDoc] -> [(ShowS, Maybe FuncDoc)] genMethods object apiDoc = @@ -618,17 +658,22 @@ genExports :: Object -> [FuncDoc] -> ShowS genExports object docs = + comment.ss "* Types". + indent 1.ss (object_name object).sc ','. + indent 1.ss (object_name object).ss "Class,". + indent 1.ss "castTo".ss (object_name object).sc ','.nl. nl. - comment.ss "* Constructors".nl. - doVersionIfDefs lines - [ (ss " ". ss (cFuncNameToHsName (method_cname constructor)). sc ',', doc) - | (constructor, doc) <- constructors object docs]. - nl. + (case [ (ss " ". ss (cFuncNameToHsName (method_cname constructor)). sc ',', doc) + | (constructor, doc) <- constructors object docs] of + [] -> id + cs -> comment.ss "* Constructors".nl. + doVersionIfDefs lines cs.nl). nl. - comment.ss "* Methods".nl. - doVersionIfDefs lines - [ (ss " ". ss (cFuncNameToHsName (method_cname method)). sc ',', doc) - | (method, doc) <- methods object docs] + (case [ (ss " ". ss (cFuncNameToHsName (method_cname method)). sc ',', doc) + | (method, doc) <- methods object docs] of + [] -> id + cs -> comment.ss "* Methods".nl. + doVersionIfDefs lines cs) genTodoItems :: Object -> ShowS genTodoItems object = @@ -795,9 +840,11 @@ -- Read in the documentation xml file if supplied -- apiDoc <- if null docFile - then return noApiDoc + then return [] else do content <- readFile docFile return $ extractDocumentation (Xml.xmlParse docFile content) + let apiDocMap = [ (moduledoc_name moduleDoc, moduleDoc) | moduleDoc <- apiDoc ] + ++ [ (moduledoc_altname moduleDoc, moduleDoc) | moduleDoc <- apiDoc ] ----------------------------------------------------------------------------- -- A few values that are used in the template @@ -813,27 +860,33 @@ -- Write the result file(s) by substituting values into the template file -- mapM - (\(namespace, object) -> - let apiDoc' = addVersionParagraphs namespace apiDoc in - writeFile (outdir ++ object_name object ++ ".chs") $ - templateSubstitute template (\var -> - case var of - "YEAR" -> ss year - "DATE" -> ss date - "OBJECT_NAME" -> ss (object_name object) - "DESCRIPTION" -> ss (apidoc_summary apiDoc') - "DOCUMENTATION" -> genModuleDocumentation apiDoc' - "TODO" -> genTodoItems object - "MODULE_NAME" -> ss (modPrefix ++ object_name object) - "EXPORTS" -> genExports object (apidoc_functions apiDoc') - "IMPORTS" -> ss "-- CHECKME: extra imports may be required\n" - "CONTEXT_LIB" -> ss (if null lib then namespace_library namespace else lib) - "CONTEXT_PREFIX" -> ss (if null prefix then namespace_library namespace else prefix) - "MODULE_BODY" -> genModuleBody object apiDoc' - _ -> ss "" - ) "") [ (namespace, object) - | namespace <- api - , object <- namespace_objects namespace ] + (\(namespace, object, maybeModuleDoc) -> do + moduleDoc <- case maybeModuleDoc of + Nothing -> do when (not (null apiDoc)) $ + putStrLn ("Warning: no documentation found for module " + ++ show (object_name object)) + return noModuleDoc + Just moduleDoc -> return $ addVersionParagraphs namespace moduleDoc + writeFile (outdir ++ object_name object ++ ".chs") $ + templateSubstitute template (\var -> + case var of + "YEAR" -> ss year + "DATE" -> ss date + "OBJECT_NAME" -> ss (object_name object) + "DESCRIPTION" -> ss (moduledoc_summary moduleDoc) + "DOCUMENTATION" -> genModuleDocumentation moduleDoc + "TODO" -> genTodoItems object + "MODULE_NAME" -> ss (modPrefix ++ object_name object) + "EXPORTS" -> genExports object (moduledoc_functions moduleDoc) + "IMPORTS" -> ss $ "{#import Graphics.UI.Gtk.Types#}\n" + ++ "-- CHECKME: extra imports may be required\n" + "CONTEXT_LIB" -> ss (if null lib then namespace_library namespace else lib) + "CONTEXT_PREFIX" -> ss (if null prefix then namespace_library namespace else prefix) + "MODULE_BODY" -> genModuleBody object moduleDoc + _ -> ss "" ) "" + ) [ (namespace, object, lookup (object_cname object) apiDocMap) + | namespace <- api + , object <- namespace_objects namespace ] usage = do |
From: Duncan C. <dun...@us...> - 2005-01-24 01:39:37
|
Update of /cvsroot/gtk2hs/gtk2hs In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv12983 Modified Files: ChangeLog Log Message: Update the code generation tool. Change the style from single module per file to having every module in a single file since this is the way the gapi tool works. Index: ChangeLog =================================================================== RCS file: /cvsroot/gtk2hs/gtk2hs/ChangeLog,v retrieving revision 1.321 retrieving revision 1.322 diff -u -d -r1.321 -r1.322 --- ChangeLog 24 Jan 2005 01:35:07 -0000 1.321 +++ ChangeLog 24 Jan 2005 01:39:28 -0000 1.322 @@ -8,6 +8,11 @@ * tools/apiGen/gen-all.sh: retire previous automation script + * tools/apiGen/Template.chs, tools/apiGen/format-docs.xsl, + tools/apiGen/ApiGen.hs: updates to the code generation tool. Change + the style from single module per file to having every module in a + single file since this is the way the gapi tools work. + 2005-01-23 Axel Simon <A....@ke...> * Makefile.am, mk/common.mk: Resurrect dependency generation under |
From: Duncan C. <dun...@us...> - 2005-01-24 01:36:02
|
Update of /cvsroot/gtk2hs/gtk2hs/tools/apiGen In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv12132/tools/apiGen Added Files: Makefile mkdocxml.sh Removed Files: gen-all.sh Log Message: Add a Makefile to automate everything better and retire the previous script. --- NEW FILE: mkdocxml.sh --- #!/bin/bash # This script sticks a bunch of DocBook fragments together into one xml file. # The result is *not* valid DocBook xml! But it is the right input format for # the format-docs.xsl program which munges the DocBook into the format # accepted by the ApiGen program. echo '<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN" "http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd">' echo "<apidoc>" for DOC in $(find $@ -name '*.xml') do echo "<book filename=\"$(basename $DOC)\">" cat $DOC echo "</book>" done echo "</apidoc>" --- NEW FILE: Makefile --- default : @echo "== gtk2hs apiGen system ==" @echo "available targets:" @echo @echo "make get-source-code" @echo " This downloads all the necessary source code from the Gnome" @echo " ftp server. You must do this before you can use any of the" @echo " other options. However, you may wish to first edit this" @echo " Makefile to change which versions of the source code you get." @echo @echo "make prep-gtk-docs" @echo " This configures and compiles gtk+ and builds the DocBook xml" @echo " files necessary for the next stage. You should only have to" @echo " do this once." @echo @echo "make gtk-modules" @echo " This generates all the Gtk modules by processing the source" @echo " code and the DocBook documentation. The .chs modules are all" @echo " put into the subdirectory gtk-modules. You need to have" @echo " downloaded the source and built the docs before doing this." @echo @echo "make gdk-modules" @echo " as above but for Gdk" @echo @echo "make prep-pango-docs pango-modules" @echo " as above but for Pango" @echo @echo "make prep-glade-docs glade-modules" @echo " as above but for libglade" ######################## # # source code # PANGO_VERSION = 1.2.3 GTK_VERSION = 2.2.2 GLADE_VERSION = 2.0.0 DOWNLOADS = \ http://ftp.gnome.org/pub/GNOME/desktop/2.2/2.2.2/sources/pango-$(PANGO_VERSION).tar.gz \ http://ftp.gnome.org/pub/GNOME/desktop/2.2/2.2.2/sources/gtk+-$(GTK_VERSION).tar.gz \ http://ftp.gnome.org/pub/GNOME/desktop/2.0/2.0.0/sources/libglade-$(GLADE_VERSION).tar.gz get-source-code: for i in $(DOWNLOADS); do \ wget $$i --output-document=- | tar -xz ; \ done; ############################# # # generateing api files # %-api.xml : %-sources.xml gapi_format_xml PATH=.:$$PATH ./gapi_parser.pl $< #%-modules : %-api.xml %-docs.xml Template.chs ApiGen # @mkdir -p $@ # ./ApiGen $< Template.chs --doc=gtk-docs.xml --outdir=$@ ################### # # Gtk modules # prep-gtk-docs : gtk+-$(GTK_VERSION) cd $< && ./configure --enable-gtk-doc && make gtk-docs.xml : gtk+-$(GTK_VERSION)/docs/reference/gtk/xml ./mkdocxml.sh $< | xsltproc format-docs.xsl - > $@ gtk-modules : gtk-api.xml gtk-docs.xml Template.chs ApiGen @mkdir -p $@ ./ApiGen $< Template.chs --doc=gtk-docs.xml --outdir=$@ ################### # # Gdk modules # gdk-docs.xml : gtk+-$(GTK_VERSION)/docs/reference/gdk/xml \ gtk+-$(GTK_VERSION)/docs/reference/gdk-pixbuf/xml ./mkdocxml.sh $< | xsltproc format-docs.xsl - > $@ gdk-modules : gdk-api.xml gdk-docs.xml Template.chs ApiGen @mkdir -p $@ ./ApiGen $< Template.chs --doc=gdk-docs.xml --outdir=$@ ################### # # Pango modules # prep-pango-docs : pango-$(PANGO_VERSION) cd $< && ./configure --enable-gtk-doc && make pango-docs.xml : pango-$(PANGO_VERSION)/docs/xml ./mkdocxml.sh $< | xsltproc format-docs.xsl - > $@ pango-modules : pango-api.xml pango-docs.xml Template.chs ApiGen @mkdir -p $@ ./ApiGen $< Template.chs --doc=pango-docs.xml --outdir=$@ ######################## # # libglade modules # prep-glade-docs : libglade-$(GLADE_VERSION) cd $< && ./configure --enable-gtk-doc && make glade-modules : glade-api.xml Template.chs ApiGen @mkdir -p $@ ./ApiGen $< Template.chs --outdir=$@ ######################## # # tools # ApiGen : ApiGen.hs ghc --make $< -o $@ gapi_format_xml : formatXml.c gcc `pkg-config --cflags --libs libxml-2.0 glib-2.0` $< -o $@ --- gen-all.sh DELETED --- |
From: Duncan C. <dun...@us...> - 2005-01-24 01:35:18
|
Update of /cvsroot/gtk2hs/gtk2hs In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv11966 Modified Files: ChangeLog Log Message: Add extra bits of the Gtk# gapi system. Index: ChangeLog =================================================================== RCS file: /cvsroot/gtk2hs/gtk2hs/ChangeLog,v retrieving revision 1.320 retrieving revision 1.321 diff -u -d -r1.320 -r1.321 --- ChangeLog 23 Jan 2005 15:44:29 -0000 1.320 +++ ChangeLog 24 Jan 2005 01:35:07 -0000 1.321 @@ -1,3 +1,13 @@ +2005-01-23 Duncan Coutts <du...@co...> + + * tools/apiGen/formatXml.c, tools/apiGen/gapi_parser.pl: add extra + bits of the Gtk# gapi system. + + * tools/apiGen/Makefile, tools/apiGen/mkdocxml.sh: add Makefile to + automate everything better. + + * tools/apiGen/gen-all.sh: retire previous automation script + 2005-01-23 Axel Simon <A....@ke...> * Makefile.am, mk/common.mk: Resurrect dependency generation under |
From: Duncan C. <dun...@us...> - 2005-01-24 01:34:31
|
Update of /cvsroot/gtk2hs/gtk2hs/tools/apiGen In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv11550/tools/apiGen Added Files: formatXml.c gapi_parser.pl Log Message: Add extra bits of the Gtk# gapi system. --- NEW FILE: formatXml.c --- #include <glib.h> #include <stdlib.h> #include <libxml/xmlmemory.h> #include <libxml/parser.h> static int formatFile (const gchar *input, const gchar *output) { xmlDocPtr doc; /* * build an XML tree from a the file; */ doc = xmlParseFile (input); if (doc == NULL){ g_warning ("File %s empty or not well-formed.", input); return -1; } if (xmlSaveFormatFile (output, doc, TRUE) == -1){ g_warning ("Error saving config data to %s", input); } xmlFreeDoc (doc); return 0; } int main(int argc, char **argv) { if (argc != 3){ g_print ("Usage: formatXml inputfile outputfile\n\n"); return -1; } xmlKeepBlanksDefault(0); formatFile (argv [1], argv [2]); return 0; } --- NEW FILE: gapi_parser.pl --- #!/usr/bin/perl -w # gapi-parser - parser frontend for XML-based sources file format. # # Author: Mike Kestner <mke...@sp...> # # Copyright (c) 2003 Mike Kestner # Copyright (c) 2003 Novell, Inc. # # This program is free software; you can redistribute it and/or # modify it under the terms of version 2 of the GNU General Public # License as published by the Free Software Foundation. # # This program 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 # General Public License for more details. # # You should have received a copy of the GNU General Public # License along with this program; if not, write to the # Free Software Foundation, Inc., 59 Temple Place - Suite 330, # Boston, MA 02111-1307, USA. use XML::LibXML; die "Usage: gapi-parser <xml_sources_file>\n" if (!$ARGV[0]); my $parser = new XML::LibXML; my $doc = $parser->parse_file($ARGV[0]); die "Unable to parse input file $ARGV[0].\n" if (!$doc); my $root = $doc->documentElement; die "Improperly formatted input file $ARGV[0].\n" if (!$root || $root->nodeName ne "gapi-parser-input"); for ($apinode = $root->firstChild; $apinode; $apinode = $apinode->nextSibling ()) { next if ($apinode->nodeName ne "api"); @attrs = $apinode->attributes; my $outfile = ""; foreach $attr (@attrs) { if ($attr->name eq "filename") { $outfile = $attr->value; } else { die "Unexpected attribute $attr->name\n"; } } unlink "$outfile.pre"; for ($libnode = $apinode->firstChild; $libnode; $libnode = $libnode->nextSibling ()) { next if ($libnode->nodeName ne "library"); @attrs = $libnode->attributes; my ($lib); foreach $attr (@attrs) { if ($attr->name eq "name") { $lib = $attr->value; } else { die "Unexpected attribute $attr->name\n"; } } for ($nsnode = $libnode->firstChild; $nsnode; $nsnode = $nsnode->nextSibling ()) { next if ($nsnode->nodeName ne "namespace"); @attrs = $nsnode->attributes; my ($ns); foreach $attr (@attrs) { if ($attr->name eq "name") { $ns = $attr->value; } else { die "Unexpected attribute $attr->name\n"; } } my @files = (); my @realfiles = (); my %excludes = (); for ($srcnode = $nsnode->firstChild; $srcnode; $srcnode = $srcnode->nextSibling ()) { next if ($srcnode->nodeName ne "dir" && $srcnode->nodeName ne "file" && $srcnode->nodeName ne "exclude"); if ($srcnode->nodeName eq "dir") { my ($dir); $dir = $srcnode->firstChild->nodeValue; print "<dir $dir> "; @files = (@files, `ls $dir/*.c`); @files = (@files, `ls $dir/*.h`); } elsif ($srcnode->nodeName eq "file") { $incfile = $srcnode->firstChild->nodeValue; print "<file $incfile> "; @files = (@files, $srcnode->firstChild->nodeValue); } elsif ($srcnode->nodeName eq "exclude") { $excfile = $srcnode->firstChild->nodeValue; print "<exclude $excfile> "; $excludes{$srcnode->firstChild->nodeValue} = 1; } else { die "Unexpected source $srcnode->nodeName \n"; } } print "\n"; if ($#files >= 0) { foreach $file (@files) { chomp ($file); @realfiles = (@realfiles, $file) if (!exists($excludes{$file})); } $pp_args = join (" ", @realfiles); system ("gapi_pp.pl $pp_args | gapi2xml.pl $ns $outfile.pre $lib"); } } } system ("gapi_format_xml $outfile.pre $outfile"); unlink "$outfile.pre"; } |
From: Axel S. <as...@us...> - 2005-01-23 15:45:11
|
Update of /cvsroot/gtk2hs/gtk2hs In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv16378 Modified Files: ChangeLog Makefile.am Log Message: Repaired dependency generation. It is still not fully automatic (see comment in mk/common.mk). Make it compile on Mac OS that has a funny C pre-processor. Decrease the initial heap size to 400MB. Index: Makefile.am =================================================================== RCS file: /cvsroot/gtk2hs/gtk2hs/Makefile.am,v retrieving revision 1.43 retrieving revision 1.44 diff -u -d -r1.43 -r1.44 --- Makefile.am 20 Jan 2005 13:56:55 -0000 1.43 +++ Makefile.am 23 Jan 2005 15:44:30 -0000 1.44 @@ -197,10 +197,9 @@ MOSTLYCLEANFILES+= $(am_tools_c2hs_c2hsLocal_OBJECTS) MOSTLYCLEANFILES+= $(tools_c2hs_c2hsLocal_HSFILES:.hs=.hi) CLEANFILES+= $(tools_c2hs_c2hsLocal_BUILDSOURCES) -DISTCLEANFILES+= tools_c2hs_c2hsLocal.deps -ifeq (,$(findstring clean,$(MAKECMDGOALS))) --include tools_c2hs_c2hsLocal.deps - endif +DISTCLEANFILES+= tools/c2hs/c2hsLocal.deps +-include tools/c2hs/c2hsLocal.deps + # # glib package @@ -269,12 +268,10 @@ $(libHSglib_a_CHSFILES:.chs=_stub.c) CLEANFILES += $(libHSglib_a_BUILDSOURCES) -DISTCLEANFILES+= libHSglib_a.deps $(libHSglib_a_CHSFILES_HS:.hs=.dep) +DISTCLEANFILES+= glib/libHSglib_a.deps $(libHSglib_a_CHSFILES_HS:.hs=.dep) $(libHSglib_a_CHSFILES:.chs=.dep) : $(libHSglib_a_CHSFILES) -ifeq (,$(findstring clean,$(MAKECMDGOALS))) --include libHSglib_a.deps $(libHSglib_a_CHSFILES:.chs=.dep) - endif +-include $(libHSglib_a_CHSFILES:.chs=.dep) glib/libHSglib_a.deps # # gtk package @@ -293,6 +290,7 @@ libHSgtk_a_CPPFLAGS = $(filter -I% -D%,$(GLIB_CFLAGS) $(GTK_CFLAGS)) libHSgtk_a_SOURCESDIRS = $(libHSglib_a_SOURCESDIRS) gtk +gtk/libHSgtk_a.deps : glib/libHSglib_a.deps nodist_libHSgtk_a_SOURCES = \ gtk/Graphics/UI/Gtk/Types.chs \ @@ -491,12 +489,10 @@ $(libHSgtk_a_CHSFILES:.chs=_stub.c) CLEANFILES+= $(libHSgtk_a_BUILDSOURCES) -DISTCLEANFILES+= libHSgtk_a.deps $(libHSgtk_a_CHSFILES_HS:.hs=.dep) +DISTCLEANFILES+= gtk/libHSgtk_a.deps $(libHSgtk_a_CHSFILES_HS:.hs=.dep) $(libHSgtk_a_CHSFILES:.chs=.dep) : $(libHSglib_a_CHSFILES) $(libHSgtk_a_CHSFILES) -ifeq (,$(findstring clean, $(MAKECMDGOALS))) --include libHSgtk_a.deps $(libHSgtk_a_CHSFILES_HS:.hs=.dep) - endif +-include $(libHSgtk_a_CHSFILES_HS:.hs=.dep) gtk/libHSgtk_a.deps # # mogul package @@ -513,6 +509,7 @@ libHSmogul_a_CPPFLAGS = libHSmogul_a_SOURCESDIRS = $(libHSgtk_a_SOURCESDIRS) mogul +mogul/libHSmogul_a.deps : gtk/libHSgtk_a.deps libHSmogul_a_SOURCES = \ mogul/Graphics/UI/Gtk/Mogul.hs \ @@ -538,10 +535,8 @@ MOSTLYCLEANFILES += $(am_libHSmogul_a_OBJECTS) MOSTLYCLEANFILES += $(libHSmogul_a_HSFILES:.hs=.hi) -DISTCLEANFILES+= libHSmogul_a.deps -ifeq (,$(findstring clean, $(MAKECMDGOALS))) --include libHSmogul_a.deps - endif +DISTCLEANFILES+= mogul/libHSmogul_a.deps +-include mogul/libHSmogul_a.deps # # glade package @@ -608,12 +603,10 @@ MOSTLYCLEANFILES += $(libHSglade_a_CHSFILES:.chs=.chi) CLEANFILES += $(libHSglade_a_BUILDSOURCES) -DISTCLEANFILES+= libHSglade_a.deps $(libHSglade_a_CHSFILES_HS:.hs=.dep) +DISTCLEANFILES+= glade/libHSglade_a.deps $(libHSglade_a_CHSFILES_HS:.hs=.dep) $(libHSglade_a_CHSFILES:.chs=.dep) : $(libHSglib_a_CHSFILES) $(libHSgtk_a_CHSFILES) $(libHSglade_a_CHSFILES) -ifeq (,$(findstring clean, $(MAKECMDGOALS))) --include libHSglade_a.deps $(libHSglade_a_CHSFILES:.chs=.dep) - endif +-include $(libHSglade_a_CHSFILES:.chs=.dep) glade/libHSglade_a.deps endif #ENABLE_LIBGLADE @@ -636,6 +629,7 @@ libHSgconf_a_CPPFLAGS = $(filter -I% -D%,$(GLIB_CFLAGS) $(GTK_CFLAGS) $(GCONF_CFLAGS)) libHSgconf_a_SOURCESDIRS = $(libHSgtk_a_SOURCESDIRS) gconf +gconf/libHSgconf_a.deps : gtk/libHSgtk_a.deps nodist_libHSgconf_a_SOURCES = \ gconf/System/Gnome/GConf/Types.chs @@ -689,12 +683,10 @@ $(libHSgconf_a_CHSFILES:.chs=_stub.c) CLEANFILES += $(libHSgconf_a_BUILDSOURCES) -DISTCLEANFILES+= libHSgconf_a.deps $(libHSgconf_a_CHSFILES_HS:.hs=.dep) +DISTCLEANFILES+= gconf/libHSgconf_a.deps $(libHSgconf_a_CHSFILES_HS:.hs=.dep) $(libHSgconf_a_CHSFILES:.chs=.dep) : $(libHSglib_a_CHSFILES) $(libHSgtk_a_CHSFILES) $(libHSgconf_a_CHSFILES) -ifeq (,$(findstring clean, $(MAKECMDGOALS))) --include libHSgconf_a.deps $(libHSgconf_a_CHSFILES:.chs=.dep) - endif +-include $(libHSgconf_a_CHSFILES:.chs=.dep) gconf/libHSgconf_a.deps endif #ENABLE_GNOME @@ -717,6 +709,7 @@ libHSsourceview_a_CPPFLAGS = $(filter -I% -D%,$(GLIB_CFLAGS) $(GTK_CFLAGS) $(SOURCEVIEW_CFLAGS)) -Isourceview libHSsourceview_a_SOURCESDIRS = $(libHSgtk_a_SOURCESDIRS) sourceview +sourceview/libHSsourceview_a.deps : gtk/libHSgtk_a.deps nodist_libHSsourceview_a_SOURCES = \ sourceview/Graphics/UI/Gtk/SourceView/Types.chs @@ -774,12 +767,10 @@ MOSTLYCLEANFILES += $(libHSsourceview_a_CHSFILES:.chs=.chi) CLEANFILES += $(libHSsourceview_a_BUILDSOURCES) -DISTCLEANFILES+= libHSsourceview_a.deps $(libHSsourceview_a_CHSFILES_HS:.hs=.dep) +DISTCLEANFILES+= sourceview/libHSsourceview_a.deps $(libHSsourceview_a_CHSFILES_HS:.hs=.dep) $(libHSsourceview_a_CHSFILES:.chs=.dep) : $(libHSglib_a_CHSFILES) $(libHSgtk_a_CHSFILES) $(libHSsourceview_a_CHSFILES) -ifeq (,$(findstring clean, $(MAKECMDGOALS))) --include libHSsourceview_a.deps $(libHSsourceview_a_CHSFILES:.chs=.dep) - endif +-include $(libHSsourceview_a_CHSFILES:.chs=.dep) sourceview/libHSsourceview_a.deps endif #ENABLE_GNOME @@ -802,6 +793,7 @@ libHSmozembed_a_CPPFLAGS = $(filter -I% -D%,$(GLIB_CFLAGS) $(GTK_CFLAGS) $(MOZEMBED_CFLAGS)) libHSmozembed_a_SOURCESDIRS = $(libHSgtk_a_SOURCESDIRS) mozembed +mozembed/libHSmozembed_a.deps : gtk/libHSgtk_a.deps nodist_libHSmozembed_a_SOURCES = \ mozembed/Graphics/UI/Gtk/MozEmbed/Types.chs @@ -847,12 +839,10 @@ MOSTLYCLEANFILES += $(libHSmozembed_a_CHSFILES:.chs=.chi) CLEANFILES += $(libHSmozembed_a_BUILDSOURCES) -DISTCLEANFILES+= libHSmozembed_a.deps $(libHSmozembed_a_CHSFILES_HS:.hs=.dep) +DISTCLEANFILES+= mozembed/libHSmozembed_a.deps $(libHSmozembed_a_CHSFILES_HS:.hs=.dep) $(libHSmozembed_a_CHSFILES:.chs=.dep) : $(libHSglib_a_CHSFILES) $(libHSgtk_a_CHSFILES) $(libHSmozembed_a_CHSFILES) -ifeq (,$(findstring clean, $(MAKECMDGOALS))) --include libHSmozembed_a.deps $(libHSmozembed_a_CHSFILES:.chs=.dep) - endif +-include $(libHSmozembed_a_CHSFILES:.chs=.dep) mozembed/libHSmozembed_a.deps endif #ENABLE_MOZEMBED Index: ChangeLog =================================================================== RCS file: /cvsroot/gtk2hs/gtk2hs/ChangeLog,v retrieving revision 1.319 retrieving revision 1.320 diff -u -d -r1.319 -r1.320 --- ChangeLog 20 Jan 2005 15:01:34 -0000 1.319 +++ ChangeLog 23 Jan 2005 15:44:29 -0000 1.320 @@ -1,3 +1,17 @@ +2005-01-23 Axel Simon <A....@ke...> + + * Makefile.am, mk/common.mk: Resurrect dependency generation under + the new scheme of inferring the current package. Dependency files + are now always loaded but only recreated if we are not cleaning or + already building dependencies. + + * mk/common.mk: Set the initial heap size for tools to 400m to + accommodate for less fortunate people. + + * tools/c2hs/chs/CHS.hs: Emit a newline after a LINE directive if + the next verbatim text does not start with one. This fixes a + problem with gcc on Mac OS. + 2005-01-20 Duncan Coutts <du...@co...> * Makefile.am: make each package's LIBS include the LIBS of its |
From: Axel S. <as...@us...> - 2005-01-23 15:44:45
|
Update of /cvsroot/gtk2hs/gtk2hs/tools/c2hs/chs In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv16378/tools/c2hs/chs Modified Files: CHS.hs Log Message: Repaired dependency generation. It is still not fully automatic (see comment in mk/common.mk). Make it compile on Mac OS that has a funny C pre-processor. Decrease the initial heap size to 400MB. Index: CHS.hs =================================================================== RCS file: /cvsroot/gtk2hs/gtk2hs/tools/c2hs/chs/CHS.hs,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- CHS.hs 8 Dec 2004 00:08:20 -0000 1.2 +++ CHS.hs 23 Jan 2005 15:44:36 -0000 1.3 @@ -404,12 +404,14 @@ (Position fname line _) = pos generated = isBuiltinPos pos emitNow = state == Emit || - (state == Wait && not (null s) && head s == '\n') + (state == Wait && not (null s) && nlStart) + nlStart = head s == '\n' nextState = if generated then Wait else NoLine in (if emitNow then showString ("\n{-# LINE " ++ show (line `max` 0) ++ " " ++ - show fname ++ " #-}") + show fname ++ " #-}" ++ + (if nlStart then "" else "\n")) else id) . showString s . showFrags pureHs nextState frags |
From: Axel S. <as...@us...> - 2005-01-23 15:44:44
|
Update of /cvsroot/gtk2hs/gtk2hs/mk In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv16378/mk Modified Files: common.mk Log Message: Repaired dependency generation. It is still not fully automatic (see comment in mk/common.mk). Make it compile on Mac OS that has a funny C pre-processor. Decrease the initial heap size to 400MB. Index: common.mk =================================================================== RCS file: /cvsroot/gtk2hs/gtk2hs/mk/common.mk,v retrieving revision 1.53 retrieving revision 1.54 diff -u -d -r1.53 -r1.54 --- common.mk 17 Jan 2005 18:33:57 -0000 1.53 +++ common.mk 23 Jan 2005 15:44:31 -0000 1.54 @@ -42,19 +42,33 @@ .DELETE_ON_ERROR : %.deps -%.deps : - $(strip if test -f $@; then touch $@; else \ - touch $@; $(MAKE) $(AM_MAKEFLAGS) NAME="$*" depend; fi;) +# A string that is non-empty if dependencies should not be calculated. +# All but the "clean" target are run during dependencies calculation +# and hence are listed here to avoid nasty recursion. +noDeps := $(strip $(findstring clean,$(MAKECMDGOALS)) \ + $(findstring c2hsLocal,$(MAKECMDGOALS)) \ + $(findstring .hs,$(MAKECMDGOALS)) \ + $(findstring .precomp,$(MAKECMDGOALS))) -.PHONY: depend +# Dependencies are only calculated if the .deps files does not exist. +# Thereafter it is never updated. A fix that likely works is to +# recalculate the dependencies of a .hs file each time it is +# recompiled. This does not work if some module reexports entities of +# another module. A sound fix would be to calculate dependencies each +# time which is too time consuming. -depend: $($(NAME)_BUILDSOURCES) - $(if $(word 2,$($(NAME)_HSFILES)),\ - $(HC) -M $(addprefix -optdep,-f $(NAME).deps) \ - $($(NAME)_HCFLAGS) -i$(subst $(SPACE),:,$($(NAME)_SOURCESDIRS)) \ - $(addprefix -package ,$($(NAME)_PACKAGEDEPS)) \ - $(AM_CPPFLAGS) $(EXTRA_CPPFLAGS) $(CPPFLAGS) \ - $($(NAME)_HSFILES)) +%.deps : + $(if $(strip \ + $(if $(findstring c2hs,$@),\ + $(findstring clean,$(MAKECMDGOALS)),$(noDeps))),,\ + $(strip if test -f $@; then touch $@; else \ + touch $@; \ + $(if $(word 2,$($(PKG)_HSFILES)),\ + $(MAKE) $(AM_MAKEFLAGS) $($(PKG)_HSFILES); \ + $(HC) -M $(addprefix -optdep,-f $@) \ + $(HCFLAGS) $($(PKG)_HCFLAGS) -i$(pkgVPATH) \ + $(AM_CPPFLAGS) $($(PKG)_CPPFLAGS) $($(PKG)_HSFILES);) \ + fi;)) .chs.dep : $(CHSDEPEND) -i$(pkgVPATH) $< @@ -73,7 +87,7 @@ # Same for .chi .PRECIOUS: %.chi -HSTOOLFLAGS = -H500m -M650m +HSTOOLFLAGS = -H400m -M650m .PHONY: debug debug : |
From: Duncan C. <dun...@us...> - 2005-01-20 15:01:46
|
Update of /cvsroot/gtk2hs/gtk2hs In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv30931 Modified Files: ChangeLog configure.ac Log Message: bump version to 0.9.7_rc4 Index: configure.ac =================================================================== RCS file: /cvsroot/gtk2hs/gtk2hs/configure.ac,v retrieving revision 1.24 retrieving revision 1.25 diff -u -d -r1.24 -r1.25 --- configure.ac 19 Jan 2005 04:27:28 -0000 1.24 +++ configure.ac 20 Jan 2005 15:01:35 -0000 1.25 @@ -21,7 +21,7 @@ dnl Process this file with autoconf to produce a configure script. dnl ###################################################################### -AC_INIT(gtk2hs, 0.9.7_rc3) +AC_INIT(gtk2hs, 0.9.7_rc4) AM_INIT_AUTOMAKE dnl * We require autoconf version 2.50 Index: ChangeLog =================================================================== RCS file: /cvsroot/gtk2hs/gtk2hs/ChangeLog,v retrieving revision 1.318 retrieving revision 1.319 diff -u -d -r1.318 -r1.319 --- ChangeLog 20 Jan 2005 13:56:55 -0000 1.318 +++ ChangeLog 20 Jan 2005 15:01:34 -0000 1.319 @@ -3,6 +3,8 @@ * Makefile.am: make each package's LIBS include the LIBS of its dependent packages, which is the same as we do for the CFLAGS. + * configure.ac: bump version to 0.9.7_rc4 + 2005-01-19 Duncan Coutts <du...@co...> * tools/c2hs/c/CLexer.hs: make c2hs understand the __signed, |
From: Duncan C. <dun...@us...> - 2005-01-20 13:57:19
|
Update of /cvsroot/gtk2hs/gtk2hs In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv12666 Modified Files: ChangeLog Makefile.am Log Message: Make each package's LIBS include the LIBS of its dependent packages, which is the same as we do for the CFLAGS. Index: Makefile.am =================================================================== RCS file: /cvsroot/gtk2hs/gtk2hs/Makefile.am,v retrieving revision 1.42 retrieving revision 1.43 diff -u -d -r1.42 -r1.43 --- Makefile.am 19 Jan 2005 03:45:26 -0000 1.42 +++ Makefile.am 20 Jan 2005 13:56:55 -0000 1.43 @@ -287,7 +287,7 @@ libHSgtk_a_PACKAGEDEPS = libHSgtk_a_HEADER = gtk/gtk.h libHSgtk_a_PRECOMP = gtk/gtk.precomp -libHSgtk_a_LIBS = $(GTK_LIBS) +libHSgtk_a_LIBS = $(GLIB_LIBS) $(GTK_LIBS) libHSgtk_a_HCFLAGS = -fffi libHSgtk_a_CFLAGS = $(filter-out -I% -D%,$(GLIB_CFLAGS) $(GTK_CFLAGS)) libHSgtk_a_CPPFLAGS = $(filter -I% -D%,$(GLIB_CFLAGS) $(GTK_CFLAGS)) @@ -556,7 +556,7 @@ libHSglade_a_PACKAGEDEPS = libHSglade_a_HEADER = glade/glade.h libHSglade_a_PRECOMP = glade/glade.precomp -libHSglade_a_LIBS = $(LIBGLADE_LIBS) +libHSglade_a_LIBS = $(GLIB_LIBS) $(GTK_LIBS) $(LIBGLADE_LIBS) libHSglade_a_HCFLAGS = -fffi libHSglade_a_CFLAGS = $(filter-out -I% -D%,$(GLIB_CFLAGS) $(GTK_CFLAGS) $(LIBGLADE_CFLAGS)) libHSglade_a_CPPFLAGS = $(filter -I% -D%,$(GLIB_CFLAGS) $(GTK_CFLAGS) $(LIBGLADE_CFLAGS)) @@ -630,7 +630,7 @@ libHSgconf_a_PACKAGEDEPS = libHSgconf_a_HEADER = gconf/gconf-client.h libHSgconf_a_PRECOMP = gconf/gconf.precomp -libHSgconf_a_LIBS = $(GCONF_LIBS) +libHSgconf_a_LIBS = $(GLIB_LIBS) $(GTK_LIBS) $(GCONF_LIBS) libHSgconf_a_HCFLAGS = -fglasgow-exts -fallow-overlapping-instances libHSgconf_a_CFLAGS = $(filter-out -I% -D%,$(GLIB_CFLAGS) $(GTK_CFLAGS) $(GCONF_CFLAGS)) libHSgconf_a_CPPFLAGS = $(filter -I% -D%,$(GLIB_CFLAGS) $(GTK_CFLAGS) $(GCONF_CFLAGS)) @@ -711,7 +711,7 @@ libHSsourceview_a_PACKAGEDEPS = libHSsourceview_a_HEADER = sourceview.h libHSsourceview_a_PRECOMP = sourceview/sourceview.precomp -libHSsourceview_a_LIBS = $(SOURCEVIEW_LIBS) +libHSsourceview_a_LIBS = $(GLIB_LIBS) $(GTK_LIBS) $(SOURCEVIEW_LIBS) libHSsourceview_a_HCFLAGS = -fffi libHSsourceview_a_CFLAGS = $(filter-out -I% -D%,$(GLIB_CFLAGS) $(GTK_CFLAGS) $(SOURCEVIEW_CFLAGS)) libHSsourceview_a_CPPFLAGS = $(filter -I% -D%,$(GLIB_CFLAGS) $(GTK_CFLAGS) $(SOURCEVIEW_CFLAGS)) -Isourceview @@ -796,7 +796,7 @@ libHSmozembed_a_PACKAGEDEPS = libHSmozembed_a_HEADER = gtkmozembed.h libHSmozembed_a_PRECOMP = mozembed/mozembed.precomp -libHSmozembed_a_LIBS = $(MOZEMBED_LIBS) +libHSmozembed_a_LIBS = $(GLIB_LIBS) $(GTK_LIBS) $(MOZEMBED_LIBS) libHSmozembed_a_HCFLAGS = -fffi libHSmozembed_a_CFLAGS = $(filter-out -I% -D%,$(GLIB_CFLAGS) $(GTK_CFLAGS) $(MOZEMBED_CFLAGS)) libHSmozembed_a_CPPFLAGS = $(filter -I% -D%,$(GLIB_CFLAGS) $(GTK_CFLAGS) $(MOZEMBED_CFLAGS)) Index: ChangeLog =================================================================== RCS file: /cvsroot/gtk2hs/gtk2hs/ChangeLog,v retrieving revision 1.317 retrieving revision 1.318 diff -u -d -r1.317 -r1.318 --- ChangeLog 19 Jan 2005 18:34:34 -0000 1.317 +++ ChangeLog 20 Jan 2005 13:56:55 -0000 1.318 @@ -1,3 +1,8 @@ +2005-01-20 Duncan Coutts <du...@co...> + + * Makefile.am: make each package's LIBS include the LIBS of its + dependent packages, which is the same as we do for the CFLAGS. + 2005-01-19 Duncan Coutts <du...@co...> * tools/c2hs/c/CLexer.hs: make c2hs understand the __signed, |
From: Duncan C. <dun...@us...> - 2005-01-19 18:36:00
|
Update of /cvsroot/gtk2hs/gtk2hs/tools/c2hs/c In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv9604/tools/c2hs/c Modified Files: CLexer.hs Log Message: Make c2hs understand the __signed, __signed__, __volatile and __volatile__ portability keyword synonyms. Index: CLexer.hs =================================================================== RCS file: /cvsroot/gtk2hs/gtk2hs/tools/c2hs/c/CLexer.hs,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- CLexer.hs 18 Jan 2005 22:06:34 -0000 1.2 +++ CLexer.hs 19 Jan 2005 18:34:46 -0000 1.3 @@ -164,6 +164,8 @@ | CTokReturn Position -- `return' | CTokShort Position -- `short' | CTokSigned Position -- `signed' + -- (or `__signed', + -- `__signed__') | CTokSizeof Position -- `sizeof' | CTokStatic Position -- `static' | CTokStruct Position -- `struct' @@ -173,6 +175,8 @@ | CTokUnsigned Position -- `unsigned' | CTokVoid Position -- `void' | CTokVolatile Position -- `volatile' + -- (or `__volatile', + -- `__volatile__') | CTokWhile Position -- `while' | CTokCLit Position Char -- character constant | CTokILit Position Integer -- integer constant @@ -594,6 +598,8 @@ idkwtok pos "return" _ = CTokReturn pos idkwtok pos "short" _ = CTokShort pos idkwtok pos "signed" _ = CTokSigned pos + idkwtok pos "__signed" _ = CTokSigned pos + idkwtok pos "__signed__" _ = CTokSigned pos idkwtok pos "sizeof" _ = CTokSizeof pos idkwtok pos "static" _ = CTokStatic pos idkwtok pos "struct" _ = CTokStruct pos @@ -603,6 +609,8 @@ idkwtok pos "unsigned" _ = CTokUnsigned pos idkwtok pos "void" _ = CTokVoid pos idkwtok pos "volatile" _ = CTokVolatile pos + idkwtok pos "__volatile" _ = CTokVolatile pos + idkwtok pos "__volatile__" _ = CTokVolatile pos idkwtok pos "while" _ = CTokWhile pos idkwtok pos "__attribute__" _ = CTokGnuC GnuCAttrTok pos idkwtok pos "__extension__" _ = CTokGnuC GnuCExtTok pos |
From: Duncan C. <dun...@us...> - 2005-01-19 18:35:06
|
Update of /cvsroot/gtk2hs/gtk2hs In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv9604 Modified Files: ChangeLog Log Message: Make c2hs understand the __signed, __signed__, __volatile and __volatile__ portability keyword synonyms. Index: ChangeLog =================================================================== RCS file: /cvsroot/gtk2hs/gtk2hs/ChangeLog,v retrieving revision 1.316 retrieving revision 1.317 diff -u -d -r1.316 -r1.317 --- ChangeLog 19 Jan 2005 04:27:27 -0000 1.316 +++ ChangeLog 19 Jan 2005 18:34:34 -0000 1.317 @@ -1,3 +1,8 @@ +2005-01-19 Duncan Coutts <du...@co...> + + * tools/c2hs/c/CLexer.hs: make c2hs understand the __signed, + __signed__, __volatile and __volatile__ portability keyword synonyms. + 2005-01-18 Duncan Coutts <du...@co...> * tools/c2hs/c/CLexer.hs: trivial fix to allows c2hs to process the |
From: Duncan C. <dun...@us...> - 2005-01-19 04:27:42
|
Update of /cvsroot/gtk2hs/gtk2hs In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv2708 Modified Files: ChangeLog configure.ac Log Message: bump version to 0.9.7_rc3 Index: configure.ac =================================================================== RCS file: /cvsroot/gtk2hs/gtk2hs/configure.ac,v retrieving revision 1.23 retrieving revision 1.24 diff -u -d -r1.23 -r1.24 --- configure.ac 19 Jan 2005 03:42:53 -0000 1.23 +++ configure.ac 19 Jan 2005 04:27:28 -0000 1.24 @@ -21,7 +21,7 @@ dnl Process this file with autoconf to produce a configure script. dnl ###################################################################### -AC_INIT(gtk2hs, 0.9.7_rc3pre) +AC_INIT(gtk2hs, 0.9.7_rc3) AM_INIT_AUTOMAKE dnl * We require autoconf version 2.50 Index: ChangeLog =================================================================== RCS file: /cvsroot/gtk2hs/gtk2hs/ChangeLog,v retrieving revision 1.315 retrieving revision 1.316 diff -u -d -r1.315 -r1.316 --- ChangeLog 19 Jan 2005 04:03:53 -0000 1.315 +++ ChangeLog 19 Jan 2005 04:27:27 -0000 1.316 @@ -50,6 +50,8 @@ support building with older ghc versions that do not support "auto" packages and so you have to specifiy -package gtk or whatever. + * configure.ac: bump version to 0.9.7_rc3 + 2005-01-17 Duncan Coutts <du...@co...> * configure.ac: add an extra option --without-pkgreg to allow |
From: Duncan C. <dun...@us...> - 2005-01-19 04:04:41
|
Update of /cvsroot/gtk2hs/gtk2hs/demo/gconf In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv30483/demo/gconf Modified Files: Makefile Log Message: Make all the demos support building with older ghc versions that do not support "auto" packages and so you have to specifiy -package gtk or whatever. Index: Makefile =================================================================== RCS file: /cvsroot/gtk2hs/gtk2hs/demo/gconf/Makefile,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- Makefile 16 Jan 2005 14:15:32 -0000 1.2 +++ Makefile 19 Jan 2005 04:03:54 -0000 1.3 @@ -1,9 +1,12 @@ PROG = gconfdemo SOURCES = GConfDemo.hs +PACKAGES = gconf $(PROG) : $(SOURCES) - ghc --make $< -o $@ -fglasgow-exts -fallow-overlapping-instances $(HCFLAGS) + ghc --make $< -o $@ -fglasgow-exts -fallow-overlapping-instances $(HCFLAGS) $(HCEXTRAFLAGS) + +HCEXTRAFLAGS = $(if $(HCNEEDSPACKAGE), $(addprefix -package ,$(PACKAGES))) clean: rm -f $(SOURCES:.hs=.hi) $(SOURCES:.hs=.o) $(PROG) |
From: Duncan C. <dun...@us...> - 2005-01-19 04:04:41
|
Update of /cvsroot/gtk2hs/gtk2hs/demo/glade In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv30483/demo/glade Modified Files: Makefile Log Message: Make all the demos support building with older ghc versions that do not support "auto" packages and so you have to specifiy -package gtk or whatever. Index: Makefile =================================================================== RCS file: /cvsroot/gtk2hs/gtk2hs/demo/glade/Makefile,v retrieving revision 1.6 retrieving revision 1.7 diff -u -d -r1.6 -r1.7 --- Makefile 16 Jan 2005 14:15:33 -0000 1.6 +++ Makefile 19 Jan 2005 04:03:55 -0000 1.7 @@ -1,9 +1,12 @@ PROG = gladetest SOURCES = GladeTest.hs +PACKAGES = glade $(PROG) : $(SOURCES) - ghc --make $< -o $@ $(HCFLAGS) + ghc --make $< -o $@ $(HCFLAGS) $(HCEXTRAFLAGS) + +HCEXTRAFLAGS = $(if $(HCNEEDSPACKAGE), $(addprefix -package ,$(PACKAGES))) clean: rm -f $(SOURCES:.hs=.hi) $(SOURCES:.hs=.o) $(PROG) |
From: Duncan C. <dun...@us...> - 2005-01-19 04:04:41
|
Update of /cvsroot/gtk2hs/gtk2hs In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv30483 Modified Files: ChangeLog Log Message: Make all the demos support building with older ghc versions that do not support "auto" packages and so you have to specifiy -package gtk or whatever. Index: ChangeLog =================================================================== RCS file: /cvsroot/gtk2hs/gtk2hs/ChangeLog,v retrieving revision 1.314 retrieving revision 1.315 diff -u -d -r1.314 -r1.315 --- ChangeLog 19 Jan 2005 03:46:18 -0000 1.314 +++ ChangeLog 19 Jan 2005 04:03:53 -0000 1.315 @@ -42,6 +42,14 @@ * gtk2hs.spec.in: revert to building the GHCi .o files in a post-install action and removing them in a uninstall action. + * demo/buttonbox/Makefile, demo/concurrent/Makefile, + demo/filechooser/Makefile, demo/gconf/Makefile, demo/glade/Makefile + demo/graphic/Makefile, demo/hello/Makefile, demo/mozembed/Makefile + demo/profileviewer/Makefile, demo/sourceview/Makefile, + demo/treeList/Makefile, demo/unicode/Makefile: make all the demos + support building with older ghc versions that do not support "auto" + packages and so you have to specifiy -package gtk or whatever. + 2005-01-17 Duncan Coutts <du...@co...> * configure.ac: add an extra option --without-pkgreg to allow |