crystaldoc-cvs Mailing List for Translated docs for Crystal Space 3D SDK
Status: Alpha
Brought to you by:
vknecht
You can subscribe to this list here.
2005 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
(14) |
Aug
(1) |
Sep
|
Oct
|
Nov
|
Dec
|
---|
From: Jan G. <ad...@us...> - 2005-08-24 19:05:36
|
Update of /cvsroot/crystaldoc/crystaldoc/de/texinfo/tutorial In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv16761/de/texinfo/tutorial Modified Files: intro.txi Log Message: spellchecking Index: intro.txi =================================================================== RCS file: /cvsroot/crystaldoc/crystaldoc/de/texinfo/tutorial/intro.txi,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** intro.txi 9 Jul 2005 12:00:06 -0000 1.2 --- intro.txi 24 Aug 2005 19:05:28 -0000 1.3 *************** *** 9,13 **** @cindex @code{csInitializer} ! Crystalspace iste eine Sammlung von Komponenten und Bibliotheken, die n@"utzlich bei der Erstellung von Computerspielen sind. Obgleich einige Pakete mehr f@"ur 3D-Spiele gedacht sind ist die Sammlung nicht auf diese Richtung beschr@"ankt. --- 9,13 ---- @cindex @code{csInitializer} ! Crystalspace ist eine Sammlung von Komponenten und Bibliotheken, die n@"utzlich bei der Erstellung von Computerspielen sind. Obgleich einige Pakete mehr f@"ur 3D-Spiele gedacht sind ist die Sammlung nicht auf diese Richtung beschr@"ankt. |
From: Vincent K. <vk...@us...> - 2005-07-24 12:04:12
|
Update of /cvsroot/crystaldoc/crystaldoc/base/mk/jam In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv6908/base/mk/jam Added Files: win32.jam Log Message: Added win32.jam to allow doc build on win32 --- NEW FILE: win32.jam --- #============================================================================ # Jam configuration and actions for Win32 # Copyright (C)2003 by Matze Braun <mat...@us...> # Copyright (C)2004 by Eric Sunshine <sun...@su...> # # 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" ; CMD.WINDRES ?= windres ; # DLL-tools not used by this script, but clients might have a need for them. CMD.DLLTOOL ?= dlltool ; CMD.DLLWRAP ?= dllwrap ; USE_DLLWRAP ?= no ; NASM.FLAGS += -f win32 -DEXTERNC_UNDERSCORE ; CCFLAGS += -pipe ; C++FLAGS += -pipe ; LINKLIBS += -L/usr/lib/w32api -lgdi32 -lshell32 ; PLUGIN.LFLAGS += -mwindows ; WINDRES.FLAGS = --use-temp-file ; if "$(USE_DLLWRAP)" = "yes" { PLUGIN.LFLAGS = [ Filter $(PLUGIN.LFLAGS) : -shared ] ; } # Natively-built Jam 2.5 (and probably earlier) on Cygwin fails to perform # library scanning properly and think that all object files need to be rebuilt # (along with everything which depends upon them) when "jam install" follows # "jam all", so disable this feature. if $(OS) = "CYGWIN" { NOARSCAN = true ; } #---------------------------------------------------------------------------- # resource handling # Unfortunately we can't simply specify resources on the source list, because # Mingw/Cygwin have the limitation that they can only link 1 resource file # in. So we have to concatenate all resourcefiles here before compiling them. actions GenerateWin32VersionRc { cat > $(<) << __EOF__ // This file is generated automatically. 1 VERSIONINFO FILEVERSION $(PACKAGE_VERSION_LIST[1]), $(PACKAGE_VERSION_LIST[2]), $(PACKAGE_VERSION_LIST[3]), $(PACKAGE_VERSION_LIST[4]) PRODUCTVERSION $(PACKAGE_VERSION_LIST[1]), $(PACKAGE_VERSION_LIST[2]), $(PACKAGE_VERSION_LIST[3]), $(PACKAGE_VERSION_LIST[4]) #ifdef CS_DEBUG FILEFLAGS 0x1 #else FILEFLAGS 0x0 #endif { BLOCK "StringFileInfo" { BLOCK "040904E4" { VALUE "ProductName", "$(PRODUCT_NAME)" VALUE "ProductVersion", "$(PACKAGE_VERSION)" VALUE "FileVersion", "$(PACKAGE_VERSION)" VALUE "LegalCopyright", "$(PACKAGE_COPYRIGHT)" VALUE "FileDescription", "$(PRODUCT_DESCRIPTION)" #ifdef CS_DEBUG VALUE "Comments", "Debug build" #else VALUE "Comments", "Release build" #endif VALUE "WWW", "$(PACKAGE_HOMEPAGE)" } } } __EOF__ } actions GenerateWin32ManifestRc { cat > $(<) << __EOF__ // This file is generated automatically. 1 24 { "<?xml version=""1.0"" encoding=""UTF-8"" standalone=""yes""?>\r\n", "<assembly xmlns=""urn:schemas-microsoft-com:asm.v1"" manifestVersion=""1.0"">\r\n", "<assemblyIdentity\r\n", " version=""", __EOF__ # Filter out non-numerical characters from the version number. Windows does # not like them. echo '$(PACKAGE_VERSION_LIST[1]).$(PACKAGE_VERSION_LIST[2]).$(PACKAGE_VERSION_LIST[3]).$(PACKAGE_VERSION_LIST[4])' | $(SED) 's/[^0123456789.]//g' | $(SED) 's/\(.*\)/ "\1",/' >> $(<) cat >> $(<) << __EOF__ """\r\n", " processorArchitecture=""X86""\r\n", " name=""$(PRODUCT_NAME)""\r\n", " type=""win32""\r\n", "/>\r\n", "<description>$(PRODUCT_DESCRIPTION)</description>\r\n", "<dependency>\r\n", " <dependentAssembly>\r\n", " <assemblyIdentity\r\n", " type=""win32""\r\n", " name=""Microsoft.Windows.Common-Controls""\r\n", " version=""6.0.0.0""\r\n", " processorArchitecture=""X86""\r\n", " publicKeyToken=""6595b64144ccf1df""\r\n", " language=""*""\r\n", " />\r\n", " </dependentAssembly>\r\n", "</dependency>\r\n", "</assembly>\r\n" } __EOF__ } actions GenerateWin32MetadataRc { cat > $(<) << __EOF__ // This file is automatically generated. 17485 RCDATA { __EOF__ cat $(>) | $(SED) "s:\":\"\":g" | $(SED) "s:\(.*\): \"\1\",:g" >> $(<) cat >> $(<) << __EOF__ "\0" } __EOF__ } actions GenerateIconRc { echo '1 ICON "$(>)"' > $(<) } actions together CompileResources { cat $(>) | $(CMD.WINDRES) $(WINDRES.FLAGS) $(RCFLAGS) --include-dir=$(>:D) -o $(<) } rule CompileResources { Depends $(<) : $(>) ; } ## Win32Resource basename : rcfiles ## Specify .rc files for the target known as basename. The .rc files should ## already have SEARCH set appropriately. rule Win32Resource { local target = $($(<)_TARGET) ; local rcobject = [ DoObjectGrist $(<)_resource.o ] ; LOCATE on $(rcobject) = $(LOCATE_TARGET) ; SEARCH on $(rcobject) = $(LOCATE_TARGET) ; # only add 1 resource object per target if ! $($(<)_HASWIN32RESOURCE) { $(<)_HASWIN32RESOURCE = yes ; ExtraObjects $(<) : $(rcobject) ; } CompileResources $(rcobject) : $(>) ; } ## Win32RcFlags basename : rcfiles ## Specify flags passed to the resource compiler when compiling resources ## for the target known as basename. rule Win32RcFlags { local rcobject = [ DoObjectGrist $(<)_resource.o ] ; RCFLAGS on $(rcobject) += $(>) ; } if $(USE_DLLWRAP) = "yes" { rule GenerateExportDefs { SEARCH on $(<) = $(LOCATE_TARGET) ; MakeLocate $(<) : $(LOCATE_TARGET) ; Depends $(<) : $(>) ; } actions GenerateExportDefs { echo "EXPORTS" > $(<) echo " plugin_compiler" >> $(<) $(SED) '/<implementation>/!d;s:[ ]*<implementation>\(..*\)</implementation>: \1_scfInitialize:;p;s:_scfInitialize:_scfFinalize:;p;s:_scfFinalize:_Create:' < $(>) >> $(<) } } #---------------------------------------------------------------------------- # linking part ## ConstructApplicationTarget target : options ## Constructs the application target name (ie. foo.exe for foo) rule ConstructApplicationTarget { return $(<).exe ; } rule ConstructStaticLibraryTarget { return lib$(<)$(SUFLIB) ; } rule ConstructSharedLibraryTarget { return $(<)-$(COMPILER.TYPE).dll ; } rule ConstructSharedLibraryLinkLib { return lib$(<)$(SUFLIB) ; } rule ConstructPluginTarget { return $(<).dll ; } # Also invoked by msvcgen.jam. rule MakeVersionRc { # normalize version list local v1, v2, v3, v4 ; v1 = $(PACKAGE_VERSION_LIST[1]) ; if ! $(v1) { v1 = 0 ; } v2 = $(PACKAGE_VERSION_LIST[2]) ; if ! $(v2) { v2 = 0 ; } v3 = $(PACKAGE_VERSION_LIST[3]) ; if ! $(v3) { v3 = 0 ; } v4 = $(PACKAGE_VERSION_LIST[4]) ; if ! $(v4) { v4 = 0 ; } PACKAGE_VERSION_LIST on $(<) = $(v1) $(v2) $(v3) $(v4) ; local desc = [ Description $(>) ] ; if ! $(desc) { desc = "$(>)" ; } PRODUCT_DESCRIPTION on $(<) = $(desc) ; local name ; if $(PACKAGE_LONGNAME) { name = $(PACKAGE_LONGNAME) ; } else if $(PACKAGE_NAME) { name = $(PACKAGE_NAME) ; } else { name = $(>) ; } PRODUCT_NAME on $(<) = $(name) ; GenerateWin32VersionRc $(<) ; } rule MakeManifestRc { # normalize version list local v1, v2, v3, v4 ; v1 = $(PACKAGE_VERSION_LIST[1]) ; if ! $(v1) { v1 = 0 ; } v2 = $(PACKAGE_VERSION_LIST[2]) ; if ! $(v2) { v2 = 0 ; } v3 = $(PACKAGE_VERSION_LIST[3]) ; if ! $(v3) { v3 = 0 ; } v4 = $(PACKAGE_VERSION_LIST[4]) ; if ! $(v4) { v4 = 0 ; } PACKAGE_VERSION_LIST on $(<) = $(v1) $(v2) $(v3) $(v4) ; local desc = [ Description $(>) ] ; if ! $(desc) { desc = "$(>)" ; } PRODUCT_DESCRIPTION on $(<) = $(desc) ; local name ; if $(PACKAGE_LONGNAME) { name = $(PACKAGE_LONGNAME) ; } else if $(PACKAGE_NAME) { name = $(PACKAGE_NAME) ; } else { name = $(>) ; } PRODUCT_NAME on $(<) = $(name) ; GenerateWin32ManifestRc $(<) ; } rule MakeMetadataRc { local metafile = $($(>)_METAFILE) ; local metarc = $(<) ; Depends $(metarc) : $(metafile) ; GenerateWin32MetadataRc $(metarc) : $(metafile) ; Clean $(>)clean : $(metarc) ; Clean clean : $(metarc) ; } rule AppResourceWin32 { local versionrc = [ DoObjectGrist _versionrc.rc ] ; LOCATE on $(versionrc) = $(LOCATE_TARGET) ; SEARCH on $(versionrc) = $(LOCATE_TARGET) ; MakeVersionRc $(versionrc) : $(<) ; Clean $(<)clean : $(versionrc) ; Clean clean : $(versionrc) ; Win32Resource $(<) : $(versionrc) ; local manifestrc = [ DoObjectGrist _manifestrc.rc ] ; LOCATE on $(manifestrc) = $(LOCATE_TARGET) ; SEARCH on $(manifestrc) = $(LOCATE_TARGET) ; MakeManifestRc $(manifestrc) : $(<) ; Clean $(<)clean : $(manifestrc) ; Clean clean : $(manifestrc) ; Win32Resource $(<) : $(manifestrc) ; local icon = [ ApplicationIcon win32 : $(<) ] ; if ! $(icon) { local apptype = gui ; if [ IsElem console : $(>) ] { apptype = console ; } icon = [ ApplicationIconDefault win32 : $(apptype) ] ; } if $(icon) { local iconcopy = [ DoObjectGrist $(icon) ] ; MakeLocate $(iconcopy) : $(LOCATE_TARGET) ; Depends $(iconcopy) : $(icon) ; Copy $(iconcopy) : $(icon) ; Clean $(<)clean : $(iconcopy) ; Clean clean : $(iconcopy) ; local iconrc = [ DoObjectGrist $(<)_iconrc.rc ] ; MakeLocate $(iconrc) : $(LOCATE_TARGET) ; Depends $(iconrc) : $(iconcopy) ; GenerateIconRc $(iconrc) : $(iconcopy) ; Clean $(<)clean : $(iconrc) ; Clean clean : $(iconrc) ; Win32Resource $(<) : $(iconrc) ; } } rule PluginResourceWin32 { local versionrc, metarc ; versionrc = [ DoObjectGrist $(<)_versionrc.rc ] ; LOCATE on $(versionrc) = $(LOCATE_TARGET) ; SEARCH on $(versionrc) = $(LOCATE_TARGET) ; MakeVersionRc $(versionrc) : $(<) ; if $(EMBED_META) = "yes" { metarc = [ DoObjectGrist $(<)_metarc.rc ] ; LOCATE on $(metarc) = $(LOCATE_TARGET) ; SEARCH on $(metarc) = $(LOCATE_TARGET) ; MakeMetadataRc $(metarc) : $(<) ; } Clean clean : $(versionrc) $(metarc) ; Clean $(<)clean : $(versionrc) $(metarc) ; Win32Resource $(<) : $(versionrc) $(metarc) ; } # SystemLinkApplication target : objects : options rule SystemLinkApplication { local target = $($(<)_TARGET) ; Depends $(target) : $(>) ; LinkApplication $(target) : $(>) ; # setup clean rules Clean clean : $(target) ; Clean $(<)clean : $(target) ; AppResourceWin32 $(<) : $(3) ; } rule SystemInstallApplication { Depends install_bin : [ DoInstall $(<) : $(bindir) $(2) : $(INSTALL_PROGRAM) ] ; } rule SystemInstallPlugin { Depends install_plugin : [ DoInstall $(<) : $(plugindir) $(2) : $(INSTALL_PROGRAM) ] ; } # SystemLinkPlugin target : objects : options rule SystemLinkPlugin { local target = $($(<)_TARGET) ; if $(USE_DLLWRAP) = "yes" { local exportdefs = [ DoObjectGrist $(<).def ] ; NAME on $(exportdefs) = $(<) ; GenerateExportDefs $(exportdefs) : $($(<)_METAFILE) ; Depends $(target) : $(exportdefs) ; EXPORTDEFS on $(target) = $(exportdefs) ; } Depends $(target) : $(>) ; LinkPlugin $(target) : $(>) ; PluginResourceWin32 $(<) ; if $(EMBED_META) != "yes" { PluginMetaData $(<) : $($(<)_METAFILE) : $(3) ; } Clean clean : $(target) ; Clean $(<)clean : $(target) ; } rule SystemLinkSharedLibrary { LFlags $(<) : $(LINKLIBS) ; Depends $(<) : $(>) ; LinkSharedLibrary $(<) : $(>) ; MakeImportLib $(3) : $(<) ; Clean clean : $(target) ; Clean $(<)clean : $(target) ; } rule MakeImportLib { local deffile = "$(<:B).def" ; LOCATE on $(deffile) = $(LOCATE_TARGET) ; SEARCH on $(deffile) = $(LOCATE_TARGET) ; Clean clean : $(deffile) ; Clean $(<)clean : $(deffile) ; Depends $(deffile) : $(>) ; GenerateDef $(deffile) : $(>) ; Depends $(<) : $(deffile) ; GenerateImportLib $(<) : $(deffile) ; } actions GenerateDef { pexports $(>) > $(<) } actions GenerateImportLib { $(CMD.DLLTOOL) -d $(>) -l $(<) } actions LinkApplication bind NEEDLIBS bind EXTRAOBJECTS { $(CMD.LINK) -o $(<) $(>) $(EXTRAOBJECTS) $(NEEDLIBS) $(LINKLIBS) } if $(USE_DLLWRAP) != "yes" { actions LinkPlugin bind NEEDLIBS bind EXTRAOBJECTS { $(CMD.LINK) -o $(<) $(>) $(EXTRAOBJECTS) $(NEEDLIBS) $(LINKLIBS) } } else { actions LinkPlugin bind NEEDLIBS bind EXTRAOBJECTS bind EXPORTDEFS { $(CMD.DLLWRAP) --driver-name=$(CMD.LINK) --dllname $(<:B) --def=$(EXPORTDEFS) -o $(<) $(>) $(EXTRAOBJECTS) $(NEEDLIBS) $(LINKLIBS) } } #$(CMD.LINK) -o $(<) $(>) -mdll $(EXTRAOBJECTS) $(NEEDLIBS) $(LINKLIBS) actions LinkSharedLibrary bind NEEDLIBS bind EXTRAOBJECTS { $(CMD.LINK) -shared -o $(<) $(>) $(EXTRAOBJECTS) $(NEEDLIBS) $(LINKLIBS) } |
From: Vincent K. <vk...@us...> - 2005-07-14 18:47:07
|
Update of /cvsroot/crystaldoc/crystaldoc/de/texinfo In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv13213/de/texinfo Modified Files: Jamfile Log Message: Adaptation of per-language Jamfiles Index: Jamfile =================================================================== RCS file: /cvsroot/crystaldoc/crystaldoc/de/texinfo/Jamfile,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** Jamfile 31 Jan 2005 16:58:36 -0000 1.1 --- Jamfile 14 Jul 2005 18:46:41 -0000 1.2 *************** *** 1,57 **** SubDir TOP de texinfo ; - if $(CMD.MAKEINFO) { ! Texi2Info de_info : [ ConcatDirs $(TOP) de texinfo cs-unix.txi ] : info : de info ; ! FLAGS.MAKEINFO on de_info += --output=crystal.info ; ! Help de_info : "Convert German user manual to Info format" ; ! } ! ! if $(CMD.TEXI2HTML) ! { ! TEXI2HTML.INIT = [ ConcatDirs $(TOP) base texi2html.init ] ; ! FLAGS.TEXI2HTML on de_html += -init_file=$(TEXI2HTML.INIT) -prefix=cs -I\ $(CRYSTAL)/docs/texinfo ; ! Texi2HTML de_html : [ ConcatDirs $(TOP) de texinfo cs-unix.txi ] : de html ; ! Help de_html : "Convert German user manual to HTML format" ; ! } ! if $(CMD.TEXI2DVI) ! { ! #This doesn't work ! #FLAGS.TEXI2DVI on de_dvi += -I\ $(CRYSTAL)/docs/texinfo ; ! Texi2DVI de_dvi : [ ConcatDirs $(TOP) de texinfo cs-unix.txi ] : de dvi ; ! Help de_dvi : "Convert German user manual to DVI format" ; ! } ! if $(CMD.TEXI2DVI) && $(CMD.DVIPS) ! { ! Texi2PS de_ps : cs-unix.txi : de ps ; ! Help de_ps : "Convert German user manual to PostScript format" ; ! } ! if $(CMD.TEXI2DVI) && $(CMD.DVIPDF) ! { ! Texi2PDF de_pdf : [ ConcatDirs $(TOP) de texinfo cs-unix.txi ] : de pdf ; ! Help de_pdf : "Convert German user manual to PDF format" ; ! } ! if $(PERL) { ! NODEFIX = [ ConcatDirs $(TOP) base nodefix.pl ] ; ! rule RepairNodes { ! Depends $(<) : $(>) ; ! NotFile $(<) ; ! Always $(<) ; ! TEXINFO.INCDIR on $(<) = $(3) ; } ! actions RepairNodes { ! $(PERL) "$(NODEFIX)" --include-dir="$(TEXINFO.INCDIR)" "$(>)" ; } ! RepairNodes repair_de_doc : [ ConcatDirs $(TOP) de texinfo cs-unix.txi ] : $(SUBDIR) ; ! Help repair_de_doc : "Repair German Texinfo @node and @menu directives" ; } --- 1,74 ---- SubDir TOP de texinfo ; { ! local alltexi = cs-unix.txi [ Filter [ Recurse : .txi ] : ! cs-unix.txi cs-dos.txi cs-mac.txi dosdef.txi macdef.txi unixdef.txi ] ; ! RepairNodes de_repairdoc : $(alltexi[1]) ; ! Help de_repairdoc : "Repair Deutsch Texinfo @node and @menu directives" ; ! Texi2Info de_info : $(alltexi) : info : de info manual : crystalspace.info ; ! Help de_info : "Convert Deutsch user manual to Info format" ; ! Texi2DVI de_dvi : $(alltexi) : de dvi manual : csmanual.dvi : -I\ $(CRYSTAL)/docs/texinfo ; ! Help de_dvi : "Convert Deutsch user manual to DVI format" ; ! Texi2PS de_ps : $(alltexi) : de ps manual : csmanual.ps ; ! Help de_ps : "Convert Deutsch user manual to PostScript format" ; ! ! Texi2PDF de_pdf : $(alltexi) : de pdf manual : csmanual.pdf ; ! Help de_pdf : "Convert Deutsch user manual to PDF format" ; ! ! local htmlroot = [ Texi2HTML de_html : $(alltexi) : de html manual : ! index.html : -prefix=cs -I\ $(CRYSTAL)/docs/texinfo ] ; ! Help de_html : "Convert Deutsch user manual to HTML format" ; ! ! if $(PERL) && $(CMD.HHC) { ! GENDOCTOC ?= [ ConcatDirs $(TOP) base winhelp gendoctoc.pl ] ; ! actions GenDocToc { ! $(PERL) -I"$(GENDOCTOC:D)" "$(GENDOCTOC)" manual $(>:D) $(<) } ! actions CompileCHM { ! cd $(<:D) ; $(CMD.HHC) $(>:BS) } ! local outtmp = [ on $(htmlroot) GetVar LOCATE ] ; ! local hhcfile = manualtoc.hhc ; ! local hhkfile = manualindex.hhk ; ! MakeLocate $(hhcfile) $(hhkfile) : $(outtmp) ; ! GenDocToc $(hhcfile) $(hhkfile) : $(htmlroot) ; ! Depends $(hhcfile) $(hhkfile) : $(htmlroot) ; ! ! local hhpfile = csmanual.hhp ; ! local hhpcopy = $(hhpfile:G=copy) ; ! SEARCH on $(hhpfile) = $(GENDOCTOC:D) ; ! MakeLocate $(hhpcopy) : $(outtmp) ; ! Copy $(hhpcopy) : $(hhpfile) ; ! Depends $(hhpcopy) : $(hhpfile) ; ! ! local chmtmp = csmanual.chm ; ! MakeLocate $(chmtmp) : $(outtmp) ; ! CompileCHM $(chmtmp) : $(hhpcopy) ; ! Depends $(chmtmp) : $(hhpcopy) $(hhcfile) $(hhkfile) ; ! ! local outdir = [ FDirName $(LOCATE.DOCS) de chm manual ] ; ! local chmfile = $(chmtmp:G=final) ; ! MakeLocate $(chmfile) : $(outdir) ; ! Copy $(chmfile) : $(chmtmp) ; ! Depends $(chmfile) : $(chmtmp) ; ! ! RmTemps $(chmtmp) : $(hhpcopy) $(hhcfile) $(hhkfile) ; ! RmTemps $(chmfile) : $(chmtmp) ; ! Depends de_manualchm : $(chmfile) ; ! NotFile de_manualchm ; ! Help de_manualchm : "Convert Deutsch user manual to CHM format" ; ! Clean de_manualchmclean : $(chmfile) ; ! CleanDir de_manualchmclean : $(outdir) ; ! Depends clean : de_manualchmclean ; ! } } |
From: Vincent K. <vk...@us...> - 2005-07-14 18:46:52
|
Update of /cvsroot/crystaldoc/crystaldoc/es/texinfo In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv13213/es/texinfo Modified Files: Jamfile Log Message: Adaptation of per-language Jamfiles Index: Jamfile =================================================================== RCS file: /cvsroot/crystaldoc/crystaldoc/es/texinfo/Jamfile,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** Jamfile 27 Jun 2004 13:31:53 -0000 1.2 --- Jamfile 14 Jul 2005 18:46:41 -0000 1.3 *************** *** 1,55 **** SubDir TOP es texinfo ; - if $(CMD.MAKEINFO) { ! Texi2Info es_info : [ ConcatDirs $(TOP) es texinfo cs-unix.txi ] : info : es info ; ! FLAGS.MAKEINFO on es_info += --output=crystal.info ; ! Help es_info : "Convert Spanish user manual to Info format" ; ! } ! ! if $(CMD.TEXI2HTML) ! { ! TEXI2HTML.INIT = [ ConcatDirs $(TOP) base texi2html.init ] ; ! FLAGS.TEXI2HTML on es_html += -init_file=$(TEXI2HTML.INIT) -prefix=cs -I\ $(CRYSTAL)/docs/texinfo ; ! Texi2HTML es_html : [ ConcatDirs $(TOP) es texinfo cs-unix.txi ] : es html ; ! Help es_html : "Convert Spanish user manual to HTML format" ; ! } ! if $(CMD.TEXI2DVI) ! { ! Texi2DVI es_dvi : [ ConcatDirs $(TOP) es texinfo cs-unix.txi ] : es dvi ; ! Help es_dvi : "Convert Spanish user manual to DVI format" ; ! } ! if $(CMD.TEXI2DVI) && $(CMD.DVIPS) ! { ! Texi2PS es_ps : [ ConcatDirs $(TOP) es texinfo cs-unix.txi ] : es ps ; ! Help es_ps : "Convert Spanish user manual to PostScript format" ; ! } ! if $(CMD.TEXI2DVI) && $(CMD.DVIPDF) ! { ! Texi2PDF es_pdf : [ ConcatDirs $(TOP) es texinfo cs-unix.txi ] : es pdf ; ! Help es_pdf : "Convert Spanish user manual to PDF format" ; ! } ! if $(PERL) { ! NODEFIX = [ ConcatDirs $(TOP) base nodefix.pl ] ; ! rule RepairNodes { ! Depends $(<) : $(>) ; ! NotFile $(<) ; ! Always $(<) ; ! TEXINFO.INCDIR on $(<) = $(3) ; } ! actions RepairNodes { ! $(PERL) "$(NODEFIX)" --include-dir="$(TEXINFO.INCDIR)" "$(>)" ; } ! RepairNodes repair_es_doc : [ ConcatDirs $(TOP) es texinfo cs-unix.txi ] : $(SUBDIR) ; ! Help repair_es_doc : "Repair Spanish Texinfo @node and @menu directives" ; } --- 1,74 ---- SubDir TOP es texinfo ; { ! local alltexi = cs-unix.txi [ Filter [ Recurse : .txi ] : ! cs-unix.txi cs-dos.txi cs-mac.txi dosdef.txi macdef.txi unixdef.txi ] ; ! RepairNodes es_repairdoc : $(alltexi[1]) ; ! Help es_repairdoc : "Repair Spanish Texinfo @node and @menu directives" ; ! Texi2Info es_info : $(alltexi) : info : es info manual : crystalspace.info ; ! Help es_info : "Convert Spanish user manual to Info format" ; ! Texi2DVI es_dvi : $(alltexi) : es dvi manual : csmanual.dvi : -I\ $(CRYSTAL)/docs/texinfo ; ! Help es_dvi : "Convert Spanish user manual to DVI format" ; ! Texi2PS es_ps : $(alltexi) : es ps manual : csmanual.ps ; ! Help es_ps : "Convert Spanish user manual to PostScript format" ; ! ! Texi2PDF es_pdf : $(alltexi) : es pdf manual : csmanual.pdf ; ! Help es_pdf : "Convert Spanish user manual to PDF format" ; ! ! local htmlroot = [ Texi2HTML es_html : $(alltexi) : es html manual : ! index.html : -prefix=cs -I\ $(CRYSTAL)/docs/texinfo ] ; ! Help es_html : "Convert Spanish user manual to HTML format" ; ! ! if $(PERL) && $(CMD.HHC) { ! GENDOCTOC ?= [ ConcatDirs $(TOP) base winhelp gendoctoc.pl ] ; ! actions GenDocToc { ! $(PERL) -I"$(GENDOCTOC:D)" "$(GENDOCTOC)" manual $(>:D) $(<) } ! actions CompileCHM { ! cd $(<:D) ; $(CMD.HHC) $(>:BS) } ! local outtmp = [ on $(htmlroot) GetVar LOCATE ] ; ! local hhcfile = manualtoc.hhc ; ! local hhkfile = manualindex.hhk ; ! MakeLocate $(hhcfile) $(hhkfile) : $(outtmp) ; ! GenDocToc $(hhcfile) $(hhkfile) : $(htmlroot) ; ! Depends $(hhcfile) $(hhkfile) : $(htmlroot) ; ! ! local hhpfile = csmanual.hhp ; ! local hhpcopy = $(hhpfile:G=copy) ; ! SEARCH on $(hhpfile) = $(GENDOCTOC:D) ; ! MakeLocate $(hhpcopy) : $(outtmp) ; ! Copy $(hhpcopy) : $(hhpfile) ; ! Depends $(hhpcopy) : $(hhpfile) ; ! ! local chmtmp = csmanual.chm ; ! MakeLocate $(chmtmp) : $(outtmp) ; ! CompileCHM $(chmtmp) : $(hhpcopy) ; ! Depends $(chmtmp) : $(hhpcopy) $(hhcfile) $(hhkfile) ; ! ! local outdir = [ FDirName $(LOCATE.DOCS) es chm manual ] ; ! local chmfile = $(chmtmp:G=final) ; ! MakeLocate $(chmfile) : $(outdir) ; ! Copy $(chmfile) : $(chmtmp) ; ! Depends $(chmfile) : $(chmtmp) ; ! ! RmTemps $(chmtmp) : $(hhpcopy) $(hhcfile) $(hhkfile) ; ! RmTemps $(chmfile) : $(chmtmp) ; ! Depends es_manualchm : $(chmfile) ; ! NotFile es_manualchm ; ! Help es_manualchm : "Convert Spanish user manual to CHM format" ; ! Clean es_manualchmclean : $(chmfile) ; ! CleanDir es_manualchmclean : $(outdir) ; ! Depends clean : es_manualchmclean ; ! } } |
From: Vincent K. <vk...@us...> - 2005-07-14 18:46:51
|
Update of /cvsroot/crystaldoc/crystaldoc/fr/texinfo In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv13213/fr/texinfo Modified Files: Jamfile Log Message: Adaptation of per-language Jamfiles Index: Jamfile =================================================================== RCS file: /cvsroot/crystaldoc/crystaldoc/fr/texinfo/Jamfile,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** Jamfile 27 Jun 2004 13:31:53 -0000 1.2 --- Jamfile 14 Jul 2005 18:46:41 -0000 1.3 *************** *** 1,57 **** SubDir TOP fr texinfo ; - if $(CMD.MAKEINFO) { ! Texi2Info fr_info : [ ConcatDirs $(TOP) fr texinfo cs-unix.txi ] : info : fr info ; ! FLAGS.MAKEINFO on fr_info += --output=crystal.info ; ! Help fr_info : "Convert French user manual to Info format" ; ! } ! ! if $(CMD.TEXI2HTML) ! { ! TEXI2HTML.INIT = [ ConcatDirs $(TOP) base texi2html.init ] ; ! FLAGS.TEXI2HTML on fr_html += -init_file=$(TEXI2HTML.INIT) -prefix=cs -I\ $(CRYSTAL)/docs/texinfo ; ! Texi2HTML fr_html : [ ConcatDirs $(TOP) fr texinfo cs-unix.txi ] : fr html ; ! Help fr_html : "Convert French user manual to HTML format" ; ! } ! if $(CMD.TEXI2DVI) ! { ! #This doesn't work ! #FLAGS.TEXI2DVI on fr_dvi += -I\ $(CRYSTAL)/docs/texinfo ; ! Texi2DVI fr_dvi : [ ConcatDirs $(TOP) fr texinfo cs-unix.txi ] : fr dvi ; ! Help fr_dvi : "Convert French user manual to DVI format" ; ! } ! if $(CMD.TEXI2DVI) && $(CMD.DVIPS) ! { ! Texi2PS fr_ps : cs-unix.txi : fr ps ; ! Help fr_ps : "Convert French user manual to PostScript format" ; ! } ! if $(CMD.TEXI2DVI) && $(CMD.DVIPDF) ! { ! Texi2PDF fr_pdf : [ ConcatDirs $(TOP) fr texinfo cs-unix.txi ] : fr pdf ; ! Help fr_pdf : "Convert French user manual to PDF format" ; ! } ! if $(PERL) { ! NODEFIX = [ ConcatDirs $(TOP) base nodefix.pl ] ; ! rule RepairNodes { ! Depends $(<) : $(>) ; ! NotFile $(<) ; ! Always $(<) ; ! TEXINFO.INCDIR on $(<) = $(3) ; } ! actions RepairNodes { ! $(PERL) "$(NODEFIX)" --include-dir="$(TEXINFO.INCDIR)" "$(>)" ; } ! RepairNodes repair_fr_doc : [ ConcatDirs $(TOP) fr texinfo cs-unix.txi ] : $(SUBDIR) ; ! Help repair_fr_doc : "Repair French Texinfo @node and @menu directives" ; } --- 1,74 ---- SubDir TOP fr texinfo ; { ! local alltexi = cs-unix.txi [ Filter [ Recurse : .txi ] : ! cs-unix.txi cs-dos.txi cs-mac.txi dosdef.txi macdef.txi unixdef.txi ] ; ! RepairNodes fr_repairdoc : $(alltexi[1]) ; ! Help fr_repairdoc : "Repair French Texinfo @node and @menu directives" ; ! Texi2Info fr_info : $(alltexi) : info : fr info manual : crystalspace.info ; ! Help fr_info : "Convert French user manual to Info format" ; ! Texi2DVI fr_dvi : $(alltexi) : fr dvi manual : csmanual.dvi : -I\ $(CRYSTAL)/docs/texinfo ; ! Help fr_dvi : "Convert French user manual to DVI format" ; ! Texi2PS fr_ps : $(alltexi) : fr ps manual : csmanual.ps -I\ $(CRYSTAL)/docs/texinfo ; ! Help fr_ps : "Convert French user manual to PostScript format" ; ! ! Texi2PDF fr_pdf : $(alltexi) : fr pdf manual : csmanual.pdf : -I\ $(CRYSTAL)/docs/texinfo ; ! Help fr_pdf : "Convert French user manual to PDF format" ; ! ! local htmlroot = [ Texi2HTML fr_html : $(alltexi) : fr html manual : ! index.html : -prefix=cs -I\ $(CRYSTAL)/docs/texinfo ] ; ! Help fr_html : "Convert French user manual to HTML format" ; ! ! if $(PERL) && $(CMD.HHC) { ! GENDOCTOC ?= [ ConcatDirs $(TOP) base winhelp gendoctoc.pl ] ; ! actions GenDocToc { ! $(PERL) -I"$(GENDOCTOC:D)" "$(GENDOCTOC)" manual $(>:D) $(<) } ! actions CompileCHM { ! cd $(<:D) ; $(CMD.HHC) $(>:BS) } ! local outtmp = [ on $(htmlroot) GetVar LOCATE ] ; ! local hhcfile = manualtoc.hhc ; ! local hhkfile = manualindex.hhk ; ! MakeLocate $(hhcfile) $(hhkfile) : $(outtmp) ; ! GenDocToc $(hhcfile) $(hhkfile) : $(htmlroot) ; ! Depends $(hhcfile) $(hhkfile) : $(htmlroot) ; ! ! local hhpfile = csmanual.hhp ; ! local hhpcopy = $(hhpfile:G=copy) ; ! SEARCH on $(hhpfile) = $(GENDOCTOC:D) ; ! MakeLocate $(hhpcopy) : $(outtmp) ; ! Copy $(hhpcopy) : $(hhpfile) ; ! Depends $(hhpcopy) : $(hhpfile) ; ! ! local chmtmp = csmanual.chm ; ! MakeLocate $(chmtmp) : $(outtmp) ; ! CompileCHM $(chmtmp) : $(hhpcopy) ; ! Depends $(chmtmp) : $(hhpcopy) $(hhcfile) $(hhkfile) ; ! ! local outdir = [ FDirName $(LOCATE.DOCS) fr chm manual ] ; ! local chmfile = $(chmtmp:G=final) ; ! MakeLocate $(chmfile) : $(outdir) ; ! Copy $(chmfile) : $(chmtmp) ; ! Depends $(chmfile) : $(chmtmp) ; ! ! RmTemps $(chmtmp) : $(hhpcopy) $(hhcfile) $(hhkfile) ; ! RmTemps $(chmfile) : $(chmtmp) ; ! Depends fr_manualchm : $(chmfile) ; ! NotFile fr_manualchm ; ! Help fr_manualchm : "Convert French user manual to CHM format" ; ! Clean fr_manualchmclean : $(chmfile) ; ! CleanDir fr_manualchmclean : $(outdir) ; ! Depends clean : fr_manualchmclean ; ! } } |
From: Vincent K. <vk...@us...> - 2005-07-14 18:40:54
|
Update of /cvsroot/crystaldoc/crystaldoc/base In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv12013/base Added Files: translations.pl texi2html.patch texi2html.pl T2h_i18n.pm nodefix.pl MySimple.pod MySimple.pm Log Message: New texi2html and nodefix addition --- NEW FILE: MySimple.pm --- package Getopt::MySimple; # Name: # Getopt::MySimple. # # Documentation: # POD-style (incomplete) documentation is in file MySimple.pod # # Tabs: # 4 spaces || die. # # Author: # Ron Savage rps...@oz.... # 1.00 19-Aug-97 Initial version. # 1.10 13-Oct-97 Add arrays of switches (eg '=s@'). # 1.20 3-Dec-97 Add 'Help' on a per-switch basis. # 1.30 11-Dec-97 Change 'Help' to 'verbose'. Make all hash keys lowercase. # 1.40 10-Nov-98 Change width of help report. Restructure tests. # 1-Jul-00 Modifications for Texi2html # -------------------------------------------------------------------------- # Locally modified by obachman (Display type instead of env, order by cmp) # $Id: MySimple.pm,v 1.1 2005/07/14 18:40:45 vknecht Exp $ # use strict; # no strict 'refs'; use vars qw(@EXPORT @EXPORT_OK @ISA); use vars qw($fieldWidth $opt $VERSION); use Exporter(); use Getopt::Long; @ISA = qw(Exporter); @EXPORT = qw(); @EXPORT_OK = qw($opt); # An alias for $self -> {'opt'}. # -------------------------------------------------------------------------- $fieldWidth = 20; $VERSION = '1.41'; # -------------------------------------------------------------------------- sub byOrder { my($self) = @_; return uc($a) cmp (uc($b)); } # -------------------------------------------------------------------------- sub dumpOptions { my($self) = @_; print 'Option', ' ' x ($fieldWidth - length('Option') ), "Value\n"; for (sort byOrder keys(%{$self -> {'opt'} }) ) { print "-$_", ' ' x ($fieldWidth - (1 + length) ), "${$self->{'opt'} }{$_}\n"; } print "\n"; } # End of dumpOptions. # -------------------------------------------------------------------------- # Return: # 0 -> Error. # 1 -> Ok. sub getOptions { push(@_, 0) if ($#_ == 2); # Default for $ignoreCase is 0. push(@_, 1) if ($#_ == 3); # Default for $helpThenExit is 1. my($self, $default, $helpText, $versionText, $helpThenExit, $versionThenExit, $ignoreCase) = @_; $helpThenExit = 1 unless (defined($helpThenExit)); $versionThenExit = 1 unless (defined($versionThenExit)); $ignoreCase = 0 unless (defined($ignoreCase)); $self -> {'default'} = $default; $self -> {'helpText'} = $helpText; $self -> {'versionText'} = $versionText; $Getopt::Long::ignorecase = $ignoreCase; unless (defined($self -> {'default'}{'help'})) { $self -> {'default'}{'help'} = { type => ':i', default => '', linkage => sub {$self->helpOptions($_[1]); sleep 5;exit (0) if $helpThenExit;}, verbose => "print help and exit" }; } unless (defined($self -> {'default'}{'version'})) { $self -> {'default'}{'version'} = { type => '', default => '', linkage => sub {print $self->{'versionText'}; exit (0) if $versionThenExit;}, verbose => "print version and exit" }; } for (keys(%{$self -> {'default'} }) ) { my $type = ${$self -> {'default'} }{$_}{'type'}; push(@{$self -> {'type'} }, "$_$type"); $self->{'opt'}->{$_} = ${$self -> {'default'} }{$_}{'linkage'} if ${$self -> {'default'} }{$_}{'linkage'}; } my($result) = &GetOptions($self -> {'opt'}, @{$self -> {'type'} }); return $result unless $result; for (keys(%{$self -> {'default'} }) ) { if (! defined(${$self -> {'opt'} }{$_})) #{ { ${$self -> {'opt'} }{$_} = ${$self -> {'default'} }{$_}{'default'}; } } $result; } # End of getOptions. # -------------------------------------------------------------------------- sub helpOptions { my($self) = shift; my($noHelp) = shift; $noHelp = 0 unless $noHelp; my($optwidth, $typewidth, $defaultwidth, $maxlinewidth, $valind, $valwidth) = (10, 5, 9, 78, 4, 11); print "$self->{'helpText'}" if ($self -> {'helpText'}); print ' Option', ' ' x ($optwidth - length('Option') -1 ), 'Type', ' ' x ($typewidth - length('Type') + 1), 'Default', ' ' x ($defaultwidth - length('Default') ), "Description\n"; for (sort byOrder keys(%{$self -> {'default'} }) ) { my($line, $help, $option, $val); $option = $_; next if ${$self->{'default'} }{$_}{'noHelp'} && ${$self->{'default'} }{$_}{'noHelp'} > $noHelp; #$line = " -$_" . ' ' x ($optwidth - (2 + length) ) . # "${$self->{'default'} }{$_}{'type'} ". # ' ' x ($typewidth - (1+length(${$self -> {'default'} }{$_}{'type'}) )); $line = " --$_" . "${$self->{'default'} }{$_}{'type'}". ' ' x ($typewidth - (1+length(${$self -> {'default'} }{$_}{'type'}) )); $val = ${$self->{'default'} }{$_}{'linkage'}; if ($val) { if (ref($val) eq 'SCALAR') { $val = $$val; } else { $val = ''; } } else { $val = ${$self->{'default'} }{$_}{'default'}; } $line .= "$val "; $line .= ' ' x ($optwidth + $typewidth + $defaultwidth + 1 - length($line)); if (defined(${$self -> {'default'} }{$_}{'verbose'}) && ${$self -> {'default'} }{$_}{'verbose'} ne '') { $help = "${$self->{'default'} }{$_}{'verbose'}"; } else { $help = ' '; } if ((length("$line") + length($help)) < $maxlinewidth) { print $line , $help, "\n"; } else { print $line, "\n", ' ' x $valind, $help, "\n"; } for $val (sort byOrder keys(%{${$self->{'default'}}{$option}{'values'}})) { print ' ' x ($valind + 2); print $val, ' ', ' ' x ($valwidth - length($val) - 2); print ${$self->{'default'}}{$option}{'values'}{$val}, "\n"; } } print <<EOT; Note: 'Options' may be abbreviated. 'Type' specifications mean: <none>| ! no argument: variable is set to 1 on -foo (or, to 0 on -nofoo) =s | :s mandatory (or, optional) string argument =i | :i mandatory (or, optional) integer argument EOT } # End of helpOptions. #------------------------------------------------------------------- sub new { my($class) = @_; my($self) = {}; $self -> {'default'} = {}; $self -> {'helpText'} = ''; $self -> {'opt'} = {}; $opt = $self -> {'opt'}; # An alias for $self -> {'opt'}. $self -> {'type'} = (); return bless $self, $class; } # End of new. # -------------------------------------------------------------------------- 1; # End MySimple.pm --- NEW FILE: MySimple.pod --- =head1 NAME C<Getopt::MySimple> - Provide a simple wrapper around Getopt::Long. =head NOTE Based on GetOpt::Simple, with some (here undocumented) modifications to fit texi2hml needs. =head1 SYNOPSIS use Getopt::MySimple; # Or ... # use Getopt::MySimple qw($opt); my($options) = { 'help' => { 'type' => '', 'default' => '', # 'verbose' => '', # Not needed on every key. }, 'username' => { 'type' => '=s', # As per Getopt::Long. 'default' => $ENV{'USER'} || 'RonSavage', # In case $USER is undef. 'verbose' => 'Specify the username on the remote machine', }, 'password' => { 'type' => '=s', 'default' => 'password', 'verbose' => 'Specify the password on the remote machine', }, }; my($option) = new Getopt::MySimple; if (! $option -> getOptions($options, "Usage: testMySimple.pl [options]") ) { exit(-1); # Failure. } print "username: $option->{'opt'}{'username'}. \n"; print "password: $option->{'opt'}{'password'}. \n"; # Or, after 'use Getopt::MySimple qw($opt);' ... # print "username: $opt->{'username'}. \n"; # print "password: $opt->{'password'}. \n"; =head1 DESCRIPTION The C<Getopt::MySimple> module provides a simple way of specifying: =over 4 =item * Command line optes =item * Type information for opt values =item * Default values for the optes =item * Help text per opt =back =head1 The C<getOptions()> function The C<getOptions()> function takes 4 parameters: =over 4 =item * A hash defining the command line optes =item * A string to display as a help text heading =item * A Boolean. 0 = (Default) Use case-sensitive opt names. 1 = Ignore case =item * A Boolean. 0 = Return after displaying help. 1 = (Default) Terminate with exit(0) after displaying help =back =head1 The $classRef -> {'opt'} hash reference Command line option values are accessed in your code by dereferencing the hash reference $classRef -> {'opt'}. Two examples are given above, under synopsis. Alternately, you can use the hash reference $opt. See below. =head1 The $opt hash reference Command line option values are accessed in your code by dereferencing the hash reference $opt. Two examples are given above, under synopsis. Alternately, you can use the hash reference $classRef -> {'opt'}. See above. =head1 The C<dumpOptions()> function C<dumpOptions()> prints all your option's keys and their current values. =head1 The C<helpOptions()> function C<helpOptions()> prints nicely formatted help text. =head1 WARNING re Perl bug As always, be aware that these 2 lines mean the same thing, sometimes: =over 4 =item * $self -> {'thing'} =item * $self->{'thing'} =back The problem is the spaces around the ->. Inside double quotes, "...", the first space stops the dereference taking place. Outside double quotes the scanner correctly associates the $self token with the {'thing'} token. I regard this as a bug. =head1 REQUIRED MODULES =over 4 =item * Exporter =item * Getopt::Long =back =head1 RETURN VALUES =over 4 =item * C<dumpOptions()> returns nothing =item * C<helpOptions()> returns nothing =item * C<getOptions()> returns 0 for failure and 1 for success =back =head1 AUTHOR C<Getopt::MySimple> was written by Ron Savage I<E<lt>rps...@oz...E<gt>> in 1997. Modifications for texi2html by Olaf Bachmann I<E<lt>oba...@ma...E<gt>> in 2000. =head1 LICENCE This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself. --- NEW FILE: nodefix.pl --- #!/usr/bin/perl -w #============================================================================== # # Texinfo @node and @menu Repair Script # Copyright (C) 2000 by Eric Sunshine <sun...@su...> # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # # 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 # #============================================================================== #------------------------------------------------------------------------------ # nodefix.pl # # A tool for repairing broken and out-of-date @node directives and @menu # blocks. Understands @include and @import{} directives and will correctly # repair an entire Texinfo tree when given a root Texinfo file which # directly or indirectly includes all other files within the tree. # # (The @import{} directive is a special macro developed by Eric Sunshine to # deal gracefully with differences in pathname syntax between platforms.) # # To-Do List # * Add support for @detailmenu. # #------------------------------------------------------------------------------ use strict; use Getopt::Long; $Getopt::Long::ignorecase = 0; my $PROG_NAME = 'nodefix.pl'; my $PROG_VERSION = '1.3'; my $AUTHOR_NAME = 'Eric Sunshine'; my $AUTHOR_EMAIL = 'sun...@su...'; my $COPYRIGHT = "Copyright (C) 2000 by $AUTHOR_NAME <$AUTHOR_EMAIL>"; @main::opt_include_dir = (); $main::opt_verbose = 0; $main::opt_debug = 0; $main::opt_help = 0; my @script_options = ('include-dir|I=s@', 'verbose!', 'debug!', 'help' ); my $broken_nodes = 0; my $broken_menus = 0; my $broken_files = 0; $main::current_file = undef; $main::line_number = 0; $main::scan_depth = 0; my $current_node = undef; my $current_depth = 0; my $depth_adjustment = 0; my %node_map; my @node_list; my @menu_list; my @file_list; my %ignored_blocks = ( 'iftex' => 1, 'ifhtml' => 1, 'ifnotinfo' => 1, 'ignore' => 1, 'macro' => 1, 'rmacro' => 1, ); my $depth_min = 1; # Limit for @raisesections. my $depth_max = 4; # Limit for @lowersections. my %depth_map = ( 'chapter' => 1, 'section' => 2, 'subsection' => 3, 'subsubsection' => 4, 'top' => 0, 'unnumbered' => 1, 'unnumberedsec' => 2, 'unnumberedsubsec' => 3, 'unnumberedsubsubsec' => 4, 'appendix' => 1, 'appendixsec' => 2, 'appendixsection' => 2, 'appendixsubsec' => 3, 'appendixsubsubsec' => 4, ); #------------------------------------------------------------------------------ # Emit an error message and terminate abnormally. #------------------------------------------------------------------------------ sub fatal { my $msg = shift; die "ERROR: $msg\n"; } #------------------------------------------------------------------------------ # Emit a warning message. #------------------------------------------------------------------------------ sub warning { my $msg = shift; warn "WARNING: $msg\n"; } #------------------------------------------------------------------------------ # Print an underlined title. #------------------------------------------------------------------------------ sub print_title { my $msg = shift; print "$msg\n", '-' x length($msg), "\n"; } #------------------------------------------------------------------------------ # Find a file, possibly searching a list of alternate directories specified # on the command line. #------------------------------------------------------------------------------ sub find_include_file { my $file = shift; return $file if -f "$file"; my $dir; foreach $dir (@main::opt_include_dir) { return "$dir/$file" if -f "$dir/$file"; } return undef; } #------------------------------------------------------------------------------ # For older versions of Perl which lack FileHandle, we fake up a unique file # handle type object. #------------------------------------------------------------------------------ *main::file_handle_template = 'FH0000'; sub new_file_handle { return $main::file_handle_template++; } #------------------------------------------------------------------------------ # Open a Texinfo file for input and construct a file record which records the # contained nodes and menus. #------------------------------------------------------------------------------ sub open_input_file { my $file = shift; my $path = find_include_file($file) or fatal "Unable to locate file: $file"; local *handle = new_file_handle(); open(*handle, $path) or fatal "Failed to open file: $path"; $main::current_file = { 'path' => $path, 'nodes' => [], 'menus' => [], }; push(@file_list, $main::current_file); $main::line_number = 0; return *handle; } #------------------------------------------------------------------------------ # Read an input line from a Texinfo file. If the line begins with a Texinfo # directive, parse it and strip the trailing @comment if present. #------------------------------------------------------------------------------ sub input_line { my $handle = shift; my $line = <$handle>; close($handle), return () unless $line; my ($key, $option) = ('', ''); if ($line =~ /^\@(\w+)\s*(.*)$/) { # Got a @directive? ($key, $option) = ($1, $2); # Extract components. $option =~ s/\@c(?:omment)?\b.*$//; # Strip trailing comment. $option =~ s/\s+$//; # Strip trailing whitespace. } return ($line, $key, $option); } #------------------------------------------------------------------------------ # Canonicalize a node name. #------------------------------------------------------------------------------ sub canonicalize { local $_ = $_[0]; $_ = '' unless $_; s/\s+/ /g; s/^ //; s/ $//; $_[0] = $_; } #------------------------------------------------------------------------------ # Parse the contents of a @node line ("Name, Next, Previous, Up"). #------------------------------------------------------------------------------ sub parse_node { my $node = shift; my ($nname, $nnext, $nprev, $nup) = split(/,/, $node); canonicalize($nname); canonicalize($nnext); canonicalize($nprev); canonicalize($nup ); return ($nname, $nnext, $nprev, $nup); } #------------------------------------------------------------------------------ # Get a node's depth. Internally, a negative depth is used as a flag to # indicate that a node's depth has not been changed by one of the sectioning # commands. The first sectioning directive following a @node is allowed to # change the node's depth; subsequent sectioning directives do not. This # function always returns the node's real (positive) depth. #------------------------------------------------------------------------------ sub node_depth { my $node = shift; my $depth = $node->{'depth'}; return $depth < 0 ? -$depth - 1 : $depth; } #------------------------------------------------------------------------------ # Scan a @node line and construct a node record. #------------------------------------------------------------------------------ sub scan_node { my $node_line = shift; my ($nname, $nnext, $nprev, $nup) = parse_node($node_line); fatal "Malformed \@node at line $main::line_number in " . "$main::current_file->{'path'}." unless $nname; $current_node = { 'name' => $nname, 'old' => { 'next' => $nnext, 'prev' => $nprev, 'up' => $nup, }, 'new' => { 'next' => '', 'prev' => '', 'up' => '', }, 'title' => $nname, 'file' => $main::current_file, 'depth' => -$current_depth - 1, 'menu' => undef, 'dirty' => 0, }; $node_map{$nname} = $current_node; push(@node_list, $current_node); push(@{$main::current_file->{'nodes'}}, $current_node); } #------------------------------------------------------------------------------ # Add a menu item to a menu record's item list. #------------------------------------------------------------------------------ sub add_menu_item { my ($item_list, $node, $title) = @_; $title = '' if $node eq $title; my $item = { 'node' => $node, 'title' => $title, }; push(@{$item_list}, $item); } #------------------------------------------------------------------------------ # Parse a menu item ("Entry:Node. Title" or "Node:: Title"). #------------------------------------------------------------------------------ sub parse_menu_item { my $item = shift; return () unless $item =~ /^\s*\*\s+(.+?):(.*?)[:,.\t\n]\s*(.*)\s*$/; my ($entry, $node, $title) = ($1, $2, $3); $node = $entry unless $node; return ($node, $title); } #------------------------------------------------------------------------------ # Scan a menu. Build a new menu record and then iteratively scan each item # contained within the menu. #------------------------------------------------------------------------------ sub scan_menu { fatal "Orphaned \@menu outside of \@node block at line " . "$main::line_number in $main::current_file->{'path'}" unless $current_node; fatal "Mutiple \@menus in node \"$current_node->{'name'}\" at line " . "$main::line_number in $main::current_file->{'path'}" if $current_node->{'menu'}; my $handle = shift; my $start_line = $main::line_number; my $menu = { 'node' => $current_node, 'file' => $main::current_file, 'items' => [], 'detail' => undef, 'dirty' => 0, }; $current_node->{'menu'} = $menu; push(@menu_list, $menu); push(@{$main::current_file->{'menus'}}, $menu); my ($line, $key, $option) = (undef, undef, undef); while (($line, $key, $option) = input_line($handle)) { $main::line_number++; return if $key eq 'end' && $option eq 'menu'; next unless my ($node, $title) = parse_menu_item($line); add_menu_item($menu->{'items'}, $node, $title); } fatal "Missing \"\@end menu\" near line $start_line in " . "$main::current_file->{'path'}."; } #------------------------------------------------------------------------------ # Ignore a section of text enclosed within a specified "@foo...@end foo" block. #------------------------------------------------------------------------------ sub scan_ignored { my ($key, $handle) = @_; my $start_line = $main::line_number; while (<$handle>) { $main::line_number++; next unless /\@end\s+(\w+)\b/; return if $key eq $1; } fatal "Missing \"\@end $key\" near line $start_line in " . "$main::current_file->{'path'}."; } #------------------------------------------------------------------------------ # Scan a sectioning command which indicate a node's depth. #------------------------------------------------------------------------------ sub scan_depth { my ($key, $title) = @_; $current_depth = $depth_map{$key}; $current_depth += $depth_adjustment if ($depth_adjustment < 0 && $current_depth > $depth_min) || ($depth_adjustment > 0 && $current_depth < $depth_max); if ($current_node && $current_node->{'depth'} < 0) { $current_node->{'depth'} = $current_depth; $current_node->{'title'} = $title; } } #------------------------------------------------------------------------------ # Recursively scan included files. Understands the standard @include directive # as well as @import{} which is a special Texinfo macro designed by Eric # Sunshine to deal with differences in pathname syntax between platorms. #------------------------------------------------------------------------------ sub scan_include { my $line = shift; my $child; $line =~ /^\@include\s+(.+)$/ && do { $child = $1; }; $line =~ /^\@imports*\s*\{(.+)\}/ && do { $child = $1; $child =~ tr|,|/| }; fatal "Missing filename following \@include or \@import{} at line " . "$main::line_number in $main::current_file->{'path'}" unless $child; return scan_file($child); } #------------------------------------------------------------------------------ # Scan a file and build a list of nodes and menus. Handle sectioning # directives which indicate a node's depth (and implicitly which other nodes # are its siblings, children, and parent). Recursively scan included files. #------------------------------------------------------------------------------ sub scan_file { local ($main::current_file, $main::line_number); my $file = shift; my $handle = open_input_file($file); my $path = $main::current_file->{'path'}; local $main::scan_depth = $main::scan_depth + 1; print ' ' x ($main::scan_depth - 1) . "$path\n" if $main::opt_verbose; my ($line, $key, $option) = (undef, undef, undef); LINE: while (($line, $key, $option) = input_line($handle)) { $main::line_number++; next LINE unless $key; # Got a @directive? next LINE if $key eq 'c' || $key eq 'comment'; # Ignore @comments. return undef if $key eq 'bye'; # @bye terminates. $depth_adjustment++, next LINE if $key eq 'raisesections'; $depth_adjustment--, next LINE if $key eq 'lowersections'; scan_depth($key, $option), next LINE if exists $depth_map{$key}; scan_ignored($key, $handle), next LINE if exists $ignored_blocks{$key}; scan_node($option), next LINE if $key eq 'node'; scan_menu($handle), next LINE if $key eq 'menu'; warning("Orphaned \@detailmenu at line $main::line_number in $path."), next LINE if $key eq 'detailmenu'; if ($key =~ /include|imports*/) { scan_include($line) or return undef; next LINE; } } return 1; } #------------------------------------------------------------------------------ # Scan the root Texinfo file and all files it includes directly or indirectly. #------------------------------------------------------------------------------ sub scan_root_file { my $file = shift; print_title("Scanning") if $main::opt_verbose; scan_file($file) and warning "Missing \"\@bye\" directive."; print "\n" if $main::opt_verbose; } #------------------------------------------------------------------------------ # Update a node pointer and mark the node as dirty if necessary. #------------------------------------------------------------------------------ sub node_set { my ($node, $key, $value) = @_; $node->{'new'}{$key} = ($value ? $value->{'name'} : ''); } sub node_set_next { node_set(shift, 'next', shift); } sub node_set_prev { node_set(shift, 'prev', shift); } sub node_set_up { node_set(shift, 'up' , shift); } #------------------------------------------------------------------------------ # Repair links of all @nodes lines. Set up the links in the customary Texinfo # fashion where "next" and "previous" point at sibling nodes at the same # "depth" (chapter, section, subsection, etc.), rather than merely pointing at # physical neighboring nodes. The "up" link points at the immediate parent # node. The "top" node is handled specially. Its "next" link points at its # first child node (rather than a sibling), and its "up" link points at the # literal name "(dir)". #------------------------------------------------------------------------------ sub repair_nodes { my @prev_at_depth; my $last_depth = -1; my $node; foreach $node (@node_list) { my $depth = node_depth($node); my $parent_depth = ($depth > 0 ? $depth - 1 : 0); if ($depth < $last_depth) { my $i; foreach $i ($depth + 1..$last_depth) { $prev_at_depth[$i] = undef; } } my $prev_node = $prev_at_depth[$depth]; node_set_next($prev_node, $node) if $prev_node; my $up_node = $prev_at_depth[$parent_depth]; node_set_up($node, $up_node) unless $depth == 0; # 'top' special case. $prev_node = $up_node unless $prev_node; node_set_prev($node, $prev_node); if ($last_depth == 0) { # 'top' special case. my $top_node = $prev_at_depth[$last_depth]; node_set_next($top_node, $node); node_set_up($top_node, { 'name' => '(dir)' }); } $prev_at_depth[$depth] = $node; $last_depth = $depth; } foreach $node (@node_list) { $node->{'dirty'} = 1 if $node->{'new'}{'next'} ne $node->{'old'}{'next'} || $node->{'new'}{'prev'} ne $node->{'old'}{'prev'} || $node->{'new'}{'up' } ne $node->{'old'}{'up' }; } } #------------------------------------------------------------------------------ # Perform a deep comparision of two menu item lists to see if they differ. #------------------------------------------------------------------------------ sub menus_differ { my ($old_items, $new_items) = @_; return 1 unless scalar(@{$old_items}) == scalar(@{$new_items}); my $i; for ($i = 0; $i < @{$new_items}; $i++) { my $old_item = @{$old_items}[$i]; my $new_item = @{$new_items}[$i]; return 1 if ($old_item->{'node'} ne $new_item->{'node'} || $old_item->{'title'} ne $new_item->{'title'}); } return 0; } #------------------------------------------------------------------------------ # Repair all menus in the entire document hierarchy. For each node, if it # has an existing menu, build a brand new menu from scratch and replace the # old menu with the new one if the two menus differ in any way. #------------------------------------------------------------------------------ sub repair_menus { my $i; for ($i = 0; $i < @node_list; $i++) { my $menu_node = $node_list[$i]; my $menu = $menu_node->{'menu'}; next unless $menu; my $item_depth = node_depth($menu_node) + 1; # Node depth of items. my $items = []; my $j; for ($j = $i + 1; $j < @node_list; $j++) { my $node = $node_list[$j]; my $node_depth = node_depth($node); next if $node_depth > $item_depth; last if $node_depth < $item_depth; add_menu_item($items, $node->{'name'}, $node->{'title'}); } if (menus_differ($menu->{'items'}, $items)) { $menu->{'items'} = $items; $menu->{'dirty'} = 1; } } } #------------------------------------------------------------------------------ # Patch a @node by emitting the correct links if the old links are broken. #------------------------------------------------------------------------------ sub patch_node { my ($lines, $node_line) = @_; my ($nname, $nnext, $nprev, $nup) = parse_node($node_line); if (exists $node_map{$nname}) { my $node = $node_map{$nname}; if ($node->{'dirty'}) { $node_line = "$nname, " . "$node->{'new'}{'next'}, " . "$node->{'new'}{'prev'}, " . "$node->{'new'}{'up'}"; $broken_nodes++; } } push(@{$lines}, "\@node $node_line\n"); } #------------------------------------------------------------------------------ # Patch a @menu by emitting an entire new menu if the old one is broken. # Always emits items of form "Node:: Title", or "Node::" if Title is identical # to Node. Never emits item of form "Entry:Node. Title" since Entry can not # be automatically gleaned from any source, whereas Node and Title can. #------------------------------------------------------------------------------ sub patch_menu { my ($lines, $menu, $handle) = @_; push(@{$lines}, "\@menu\n"); # Always emit whether dirty or not. if ($menu->{'dirty'}) { scan_ignored('menu', $handle); # Skip the old menu. my $item; foreach $item (@{$menu->{'items'}}) { # Emit the new menu. my $line = "* $item->{'node'}::" . ($item->{'title'} ? " $item->{'title'}" : '') . "\n"; push(@{$lines}, $line); } push(@{$lines}, "\@end menu\n"); $broken_menus++; } } #------------------------------------------------------------------------------ # Patch a file by repairing each broken node and menu. #------------------------------------------------------------------------------ sub patch_file { my $file = shift; my $path = $file->{'path'}; my $menu_number = 0; print "$path\n" if $main::opt_verbose; $broken_files++; local *handle = new_file_handle(); open(*handle, $path) or fatal "Failed to open file: $path"; my $lines = []; my ($line, $key, $option) = (undef, undef, undef); while (($line, $key, $option) = input_line(*handle)) { patch_node($lines, $option), next if $key eq 'node'; patch_menu($lines, $file->{'menus'}[$menu_number++], *handle), next if $key eq 'menu'; push(@{$lines}, $line); } close(*handle); unless ($main::opt_debug) { open(*handle, ">$path") or fatal "Failed to truncate file: $path"; print {*handle} @{$lines} or fatal "Failed to write file: $path"; close(*handle); } } #------------------------------------------------------------------------------ # Patch all files which contain broken nodes or menus. #------------------------------------------------------------------------------ sub patch_files { print_title("Repairing") if $main::opt_verbose; my $file; FILE: foreach $file (@file_list) { my $node; foreach $node (@{$file->{'nodes'}}) { patch_file($file), next FILE if $node->{'dirty'}; } my $menu; foreach $menu (@{$file->{'menus'}}) { patch_file($file), next FILE if $menu->{'dirty'}; } } print "\n" if $main::opt_verbose; } #------------------------------------------------------------------------------ # Display repair summary. #------------------------------------------------------------------------------ sub summary { print_title("Repair Summary"); print <<EOS; Nodes: $broken_nodes of ${\scalar(@node_list)} Menus: $broken_menus of ${\scalar(@menu_list)} Files: $broken_files of ${\scalar(@file_list)} EOS } #------------------------------------------------------------------------------ # Display usage statement. #------------------------------------------------------------------------------ sub print_usage { my $stream = shift; $stream = \*STDOUT unless $stream; print $stream <<EOT; $PROG_NAME version $PROG_VERSION $COPYRIGHT Repairs out-of-date and broken \@node directives and \@menu blocks. Understands \@include and \@import{} directives and will correctly repair an entire Texinfo tree when given a root Texinfo file which directly or indirectly includes all other files within the tree. Usage: $PROG_NAME [options] <file> <file> is the root file of the entire Texinfo hierarchy. This file is repaired along with all files which it directly or indirectly includes. Options: -I <dir> --include-dir=<dir> Search directory <dir> when looking for files included by \@include or \@import{}. May be used multiple times to specify additional search directories. -v --verbose Emit informational messages as processing proceeds. -d --debug Perform all repair work but do not actually modify any files. -h --help Print this usage message. EOT } #------------------------------------------------------------------------------ # Process command-line options. #------------------------------------------------------------------------------ sub process_options { GetOptions(@script_options) or usage_error(''); print_help() if $main::opt_help; usage_error("Must specify exactly one input file.\n") unless @ARGV == 1; print "$PROG_NAME version $PROG_VERSION\n$COPYRIGHT\n\n"; print "Debugging enabled.\n\n" if $main::opt_debug; } sub print_help { print_usage(\*STDOUT); exit(0); } sub usage_error { my $msg = shift; print STDERR "$msg\n"; print_usage(\*STDERR); exit(1); } #------------------------------------------------------------------------------ # Perform the complete repair process. #------------------------------------------------------------------------------ process_options(); scan_root_file(shift @ARGV); repair_nodes(); repair_menus(); patch_files(); summary(); --- NEW FILE: T2h_i18n.pm --- #+############################################################################## # # T2h_i18n.pm: Internationalization for texi2html # # Copyright (C) 1999, 2000 Free Software Foundation, Inc. # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # # 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 # #-############################################################################## # This requires perl version 5 or higher require 5.0; package Texi2HTML::I18n; use strict; use vars qw( @ISA @EXPORT ); use Exporter; @ISA = qw(Exporter); @EXPORT = qw(pretty_date); my $language; my $i18n_dir = 'i18n'; # name of the directory containing the per language files #my $translation_file = 'translations.pl'; # file containing all the translations #my @known_languages = ('de', 'nl', 'es', 'no', 'pt', 'fr'); # The supported # languages ######################################################################## # Language dependencies: # To add a new language extend the WORDS hash and create $T2H_<...>_WORDS hash # To redefine one word, simply do: # $T2h_i18n::T2H_LANGUAGES->{<language>}->{<word>} = 'whatever' in your personal init file. # my $T2H_WORDS_EN = { # titles of pages #'Table of Contents' => 'Table of Contents', #'Short Table of Contents' => 'Short Table of Contents', #'Index' => 'Index', #'About This Document' => 'About This Document', #'Footnotes' => 'Footnotes', #'See' => 'See', #'see' => 'see', #'section' => 'section', 'About This Document' => '', 'Table of Contents' => '', 'Short Table of Contents', => '', 'Index' => '', 'Footnotes' => '', 'See' => '', 'see' => '', 'section' => '', 'Top' => '', 'Untitled Document' => '', # If necessary, we could extend this as follows: # # text for buttons # 'Top_Button' => 'Top', # 'ToC_Button' => 'Contents', # 'Overview_Button' => 'Overview', # 'Index_button' => 'Index', # 'Back_Button' => 'Back', # 'FastBack_Button' => 'FastBack', # 'Prev_Button' => 'Prev', # 'Up_Button' => 'Up', # 'Next_Button' => 'Next', # 'Forward_Button' =>'Forward', # 'FastWorward_Button' => 'FastForward', # 'First_Button' => 'First', # 'Last_Button' => 'Last', # 'About_Button' => 'About' 'January' => '', 'February' => '', 'March' => '', 'April' => '', 'May' => '', 'June' => '', 'July' => '', 'August' => '', 'September' => '', 'October' => '', 'November' => '', 'December' => '', 'T2H_today' => '%s, %d %d', }; my $T2H_WORDS_DE = { 'Table of Contents' => 'Inhaltsverzeichniss', 'Short Table of Contents' => 'Kurzes Inhaltsverzeichniss', 'Index' => 'Index', 'About This Document' => 'Über dieses Dokument', 'Footnotes' => 'Fußnoten', 'See' => 'Siehe', 'see' => 'siehe', 'section' => 'Abschnitt', 'January' => 'Januar', 'February' => 'Februar', 'March' => 'März', 'April' => 'April', 'May' => 'Mai', 'June' => 'Juni', 'July' => 'Juli', 'August' => 'August', 'September' => 'September', 'October' => 'Oktober', 'November' => 'November', 'December' => 'Dezember', }; my $T2H_WORDS_NL = { 'Table of Contents' => 'Inhoudsopgave', 'Short Table of Contents' => 'Korte inhoudsopgave', 'Index' => 'Index', #Not sure ;-) 'About This Document' => 'No translation available!', #No translation available! 'Footnotes' => 'No translation available!', #No translation available! 'See' => 'Zie', 'see' => 'zie', 'section' => 'sectie', 'January' => 'Januari', 'February' => 'Februari', 'March' => 'Maart', 'April' => 'April', 'May' => 'Mei', 'June' => 'Juni', 'July' => 'Juli', 'August' => 'Augustus', 'September' => 'September', 'October' => 'Oktober', 'November' => 'November', 'December' => 'December', }; my $T2H_WORDS_ES = { 'Table of Contents' => 'índice General', 'Short Table of Contents' => 'Resumen del Contenido', 'Index' => 'Index', #Not sure ;-) 'About This Document' => 'No translation available!', #No translation available! 'Footnotes' => 'Fußnoten', 'See' => 'Véase', 'see' => 'véase', 'section' => 'sección', 'January' => 'enero', 'February' => 'febrero', 'March' => 'marzo', 'April' => 'abril', 'May' => 'mayo', 'June' => 'junio', 'July' => 'julio', 'August' => 'agosto', 'September' => 'septiembre', 'October' => 'octubre', 'November' => 'noviembre', 'December' => 'diciembre', }; my $T2H_WORDS_NO = { 'Table of Contents' => 'Innholdsfortegnelse', 'Short Table of Contents' => 'Kort innholdsfortegnelse', 'Index' => 'Indeks', #Not sure ;-) 'About This Document' => 'No translation available!', #No translation available! 'Footnotes' => 'No translation available!', 'See' => 'Se', 'see' => 'se', 'section' => 'avsnitt', 'January' => 'januar', 'February' => 'februar', 'March' => 'mars', 'April' => 'april', 'May' => 'mai', 'June' => 'juni', 'July' => 'juli', 'August' => 'august', 'September' => 'september', 'October' => 'oktober', 'November' => 'november', 'December' => 'desember', }; my $T2H_WORDS_PT = { 'Table of Contents' => 'Sumário', 'Short Table of Contents' => 'Breve Sumário', 'Index' => 'Índice', #Not sure ;-) 'About This Document' => 'No translation available!', #No translation available! 'Footnotes' => 'No translation available!', 'See' => 'Veja', 'see' => 'veja', 'section' => 'Seção', 'January' => 'Janeiro', 'February' => 'Fevereiro', 'March' => 'Março', 'April' => 'Abril', 'May' => 'Maio', 'June' => 'Junho', 'July' => 'Julho', 'August' => 'Agosto', 'September' => 'Setembro', 'October' => 'Outubro', 'November' => 'Novembro', 'December' => 'Dezembro', }; my $T2H_WORDS_FR = { 'Table of Contents' => 'Table des matières', 'Short Table of Contents' => 'Résumée du contenu', 'Index' => 'Index', 'About This Document' => 'A propos de ce document', 'Footnotes' => 'Notes de bas de page', 'See' => 'Voir', 'see' => 'voir', 'section' => 'section', 'January' => 'Janvier', 'February' => 'Février', 'March' => 'Mars', 'April' => 'Avril', 'May' => 'Mai', 'June' => 'Juin', 'July' => 'Juillet', 'August' => 'Août', 'September' => 'Septembre', 'October' => 'Octobre', 'November' => 'Novembre', 'December' => 'Décembre', 'T2H_today' => 'le %2$d %1$s %3$d' }; #$T2H_LANGUAGES = #{ # 'en' => $T2H_WORDS_EN, # 'de' => $T2H_WORDS_DE, # 'nl' => $T2H_WORDS_NL, # 'es' => $T2H_WORDS_ES, # 'no' => $T2H_WORDS_NO, # 'pt' => $T2H_WORDS_PT, # 'fr' => $T2H_WORDS_FR, #}; sub set_language($) { my $lang = shift; if (defined($lang) && exists($Texi2HTML::Config::LANGUAGES->{$lang}) && defined($Texi2HTML::Config::LANGUAGES->{$lang})) { $language = $lang; return 1; } else { return 0; } } my @MONTH_NAMES = ( 'January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'September', 'October', 'November', 'December' ); my $I = \&get_string; sub pretty_date($) { my $lang = shift; my($sec, $min, $hour, $mday, $mon, $year, $wday, $yday, $isdst); ($sec, $min, $hour, $mday, $mon, $year, $wday, $yday, $isdst) = localtime(time); $year += ($year < 70) ? 2000 : 1900; # obachman: Let's do it as the Americans do #return($MONTH_NAMES->{$lang}[$mon] . ", " . $mday . " " . $year); #return(sprintf(&$I('T2H_today'), (get_string($MONTH_NAMES[$mon]), $mday, $year))); return &$I('%{month}, %{day} %{year}', { 'month' => get_string($MONTH_NAMES[$mon]), 'day' => $mday, 'year' => $year }); } my $error_no_en = 0; sub get_string($;$$) { my $string = shift; my $arguments = shift; my $state = shift; my $T2H_LANGUAGES = $Texi2HTML::Config::LANGUAGES; if (! exists($T2H_LANGUAGES->{'en'})) { unless($error_no_en) { print STDERR "i18n: no LANGUAGES->{'en'} hash\n"; $error_no_en = 1; } } else { print STDERR "i18n: missing string $string\n" unless (exists ($T2H_LANGUAGES->{'en'}->{$string})); if (defined ($T2H_LANGUAGES->{$language}->{$string}) and ($T2H_LANGUAGES->{$language}->{$string} ne '')) { $string = $T2H_LANGUAGES->{$language}->{$string}; } elsif (defined ($T2H_LANGUAGES->{'en'}->{$string}) and ($T2H_LANGUAGES->{'en'}->{$string} ne '')) { $string = $T2H_LANGUAGES->{'en'}->{$string}; } } return main::substitute_line($string, $state) unless (defined($arguments) or !keys(%$arguments)); my $result = ''; while ($string) { if ($string =~ s/^([^%]*)%//) { $result .= $1 if (defined($1)); $result .= '%'; if ($string =~ s/^%//) { $result .= '%'; } elsif ($string =~ /^\{(\w+)\}/ and exists($arguments->{$1})) { $string =~ s/^\{(\w+)\}//; if (!$state->{'keep_texi'}) { $result .= "\@\{$1\@\}"; } else { $result .= "\{$1\}"; } } else { $result .= '%'; } next; } else { $result .= $string; last; } } if (!$state->{'keep_texi'}) { $string = main::substitute_line($result, $state); } else { $string = $result; } $result = ''; while ($string) { if ($string =~ s/^([^%]*)%//) { $result .= $1 if (defined($1)); if ($string =~ s/^%//) { $result .= '%'; } elsif ($string =~ /^\{(\w+)\}/ and exists($arguments->{$1})) { $string =~ s/^\{(\w+)\}//; $result .= $arguments->{$1}; } else { $result .= '%'; } next; } else { $result .= $string; last; } } return $result; } 1; --- NEW FILE: texi2html.pl --- #! /usr/bin/perl 'di '; 'ig 00 '; #+############################################################################## # # texi2html: Program to transform Texinfo documents to HTML # # Copyright (C) 1999, 2000 Free Software Foundation, Inc. # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # # 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. # [...11786 lines suppressed...] #l2h_FinishFromHtml() if ($Texi2HTML::Config::L2H); #l2h_Finish() if($Texi2HTML::Config::L2H); Texi2HTML::LaTeX2HTML::finish(); &$Texi2HTML::Config::finish_out(); print STDERR "# that's all folks\n" if $T2H_VERBOSE; exit(0); ############################################################################## # These next few lines are legal in both Perl and nroff. .00 ; # finish .ig 'di \" finish diversion--previous line must be blank .nr nl 0-1 \" fake up transition to first page again .nr % 0 \" start at page 1 '; __END__ ############# From here on it's a standard manual page ############ .so @mandir@/man1/texi2html.1 --- NEW FILE: texi2html.patch --- --- texi2html.pl Wed Jun 29 10:48:57 2005 +++ CrystalSpace/CS/docs/support/texi2html.pl Wed Jun 29 10:51:58 2005 @@ -1,4 +1,4 @@ -#! @PERL@ +#! /usr/bin/perl 'di '; 'ig 00 '; #+############################################################################## @@ -32,8 +32,11 @@ use strict; # used in case of tests, to revert to "C" locale. use POSIX qw(setlocale LC_ALL LC_CTYPE); +# used to obtain the name of the current working directory +use Cwd; # used to find a relative path back to the current working directory use File::Spec; + # # According to # lar...@sd... (Larry Jones) @@ -55,7 +58,7 @@ #--############################################################################## # CVS version: -# $Id: texi2html.patch,v 1.1 2005/07/14 18:40:45 vknecht Exp $ +# $Id: texi2html.patch,v 1.1 2005/07/14 18:40:45 vknecht Exp $ # Homepage: my $T2H_HOMEPAGE = "http://texi2html.cvshome.org/"; @@ -71,7 +74,7 @@ EOT # Version: set in configure.in -my $THISVERSION = '@PACKAGE_VERSION@'; +my $THISVERSION = '1.76'; my $THISPROG = "texi2html $THISVERSION"; # program name and version # set by configure, prefix for the sysconfdir and so on @@ -2360,17 +2363,6 @@ # file name buisness # -# this is directly pasted over from latex2html -sub getcwd -{ - local($_) = `pwd`; - - die "'pwd' failed (out of memory?)\n" - unless length; - chop; - $_; -} - my $docu_dir; # directory of the document my $docu_name; # basename of the document @@ -2500,7 +2492,7 @@ my $path_to_working_dir = $docu_rdir; if ($docu_rdir ne '') { - my $cwd = getcwd; + my $cwd = cwd; my $docu_path = $docu_rdir; $docu_path = $cwd . '/' . $docu_path unless ($docu_path =~ /^\//); my @result = (); @@ -3037,7 +3029,7 @@ } else { - if (main::getcwd() =~ /\./) + if (cwd() =~ /\./) { warn "$ERROR Warning l2h: current dir contains a dot. Use /tmp as l2h_tmp dir \n"; $dotbug = 1; @@ -4415,12 +4407,18 @@ { $section->{'number'} = $number; } + $section->{'id'} = $section->{'number'}; $level--; } my $toplevel_number = $previous_numbers[$toplevel]; $toplevel_number = 0 if (!defined($toplevel_number)); $section->{'number'} = "$toplevel_number.$section->{'number'}"; + $section->{'id'} = $section->{'number'}; } + else + { + $section->{'id'} = $section->{'texi'}; + } # find the previous section if (defined($previous_sections[$section->{'level'}])) { --- NEW FILE: translations.pl --- $LANGUAGES->{'en'} = { ' The buttons in the navigation panels have the following meaning:' => '', ' where the @strong{ Example } assumes that the current position is at @strong{ Subsubsection One-Two-Three } of a document of the following structure:' => '', ' Up ' => '', '%{acronym_like} (%{explanation})' => '', '%{month}, %{day} %{year}' => '', '%{name} of %{class}' => '', '%{name} on %{class}' => '', '%{node_file_href}' => '', '%{node_file_href} @cite{%{book}}' => '', '%{node_file_href} section `%{section}\' in @cite{%{book}}' => '', '%{reference_name}' => '', '%{style} %{number}' => '', '%{style}: %{caption_first_line}' => '', '%{style}: %{shortcaption_first_line}' => '', '@b{%{quotation_arg}:} ' => '', '@cite{%{book}}' => '', 'About This Document' => '', 'April' => '', 'August' => '', 'Button' => '', 'Contents' => '', 'Current Position' => '', 'December' => '', 'February' => '', 'Footnotes' => '', 'From 1.2.3 go to' => '', 'Go to' => '', 'Index' => '', 'Index Entry' => '', 'January' => '', 'July' => '', 'Jump to' => '', 'June' => '', 'March' => '', 'May' => '', 'Menu:' => '', 'Name' => '', 'Next' => '', 'November' => '', 'October' => '', 'Overview' => '', 'Overview:' => '', 'Prev' => '', 'Section' => '', 'Section One' => '', 'See %{node_file_href}' => '', 'See %{node_file_href} @cite{%{book}}' => '', 'See %{node_file_href} section `%{section}\' in @cite{%{book}}' => '', 'See %{reference_name}' => '', 'See @cite{%{book}}' => '', 'See section %{reference_name}' => '', 'See section `%{section}\' in @cite{%{book}}' => '', 'September' => '', 'Short Table of Contents' => '', 'Subsection One-Four' => '', 'Subsection One-One' => '', 'Subsection One-Three' => '', 'Subsection One-Two' => '', 'Subsubsection One-Two-Four' => '', 'Subsubsection One-Two-One' => '', 'Subsubsection One-Two-Three' => '', 'Subsubsection One-Two-Two' => '', 'T2H_today' => '%s, %d %d', 'Table of Contents' => '', 'This document was generated by @emph{%{user}} on @emph{%{date}} using @uref{%{program_homepage}, @emph{%{program}}}.' => '', 'This document was generated by @emph{%{user}} using @uref{%{program_homepage}, @emph{%{program}}}.' => '', 'This document was generated on @i{%{date}} using @uref{%{program_homepage}, @i{%{program}}}.' => '', 'This document was generated using @uref{%{program_homepage}, @emph{%{program}}}.' => '', 'Top' => '', 'Untitled Document' => '', 'about (help)' => '', 'beginning of this chapter or previous chapter' => '', 'by @emph{%{user}}' => '', 'by @emph{%{user}} on @emph{%{date}}' => '', 'cover (top) of document' => '', 'current' => '', 'current section' => '', 'first section in reading order' => '', 'following node' => '', 'index' => '', 'last section in reading order' => '', 'next chapter' => '', 'next node' => '', 'next section in reading order' => '', 'next section on same level' => '', 'node following in node reading order' => '', 'node up' => '', 'on @emph{%{date}}' => '', 'previous node' => '', 'previous section in reading order' => '', 'previous section on same level' => '', 'section `%{section}\' in @cite{%{book}}' => '', 'see %{node_file_href}' => '', 'see %{node_file_href} @cite{%{book}}' => '', 'see %{node_file_href} section `%{section}\' in @cite{%{book}}' => '', 'see %{reference_name}' => '', 'see @cite{%{book}}' => '', 'see section %{reference_name}' => '', 'see section `%{section}\' in @cite{%{book}}' => '', 'short table of contents' => '', 'table of contents' => '', 'unknown' => '', 'up node' => '', 'up section' => '' }; $T2H_OBSOLETE_STRINGS->{'en'} = {}; $LANGUAGES->{'de'} = { ' The buttons in the navigation panels have the following meaning:' => '', ' where the @strong{ Example } assumes that the current position is at @strong{ Subsubsection One-Two-Three } of a document of the following structure:' => '', ' Up ' => '', '%{acronym_like} (%{explanation})' => '', '%{month}, %{day} %{year}' => '', '%{name} of %{class}' => '', '%{name} on %{class}' => '', '%{node_file_href}' => '', '%{node_file_href} @cite{%{book}}' => '', '%{node_file_href} section `%{section}\' in @cite{%{book}}' => '', '%{reference_name}' => '', '%{style} %{number}' => '', '%{style}: %{caption_first_line}' => '', '%{style}: %{shortcaption_first_line}' => '', '@b{%{quotation_arg}:} ' => '', '@cite{%{book}}' => '', 'About This Document' => '@"Uber dieses Dokument', 'April' => 'April', 'August' => 'August', 'Button' => '', 'Contents' => '', 'Current Position' => '', 'December' => 'Dezember', 'February' => 'Februar', 'Footnotes' => 'Fu@ss{}noten', 'From 1.2.3 go to' => '', 'Go to' => '', 'Index' => 'Index', 'Index Entry' => '', 'January' => 'Januar', 'July' => 'Juli', 'Jump to' => '', 'June' => 'Juni', 'March' => 'M@"arz', 'May' => 'Mai', 'Menu:' => '', 'Name' => '', 'Next' => '', 'November' => 'November', 'October' => 'Oktober', 'Overview' => '', 'Overview:' => '', 'Prev' => '', 'Section' => '', 'Section One' => '', 'See %{node_file_href}' => '', 'See %{node_file_href} @cite{%{book}}' => '', 'See %{node_file_href} section `%{section}\' in @cite{%{book}}' => '', 'See %{reference_name}' => '', 'See @cite{%{book}}' => '', 'See section %{reference_name}' => '', 'See section `%{section}\' in @cite{%{book}}' => '', 'September' => 'September', 'Short Table of Contents' => 'Kurzes Inhaltsverzeichniss', 'Subsection One-Four' => '', 'Subsection One-One' => '', 'Subsection One-Three' => '', 'Subsection One-Two' => '', 'Subsubsection One-Two-Four' => '', 'Subsubsection One-Two-One' => '', 'Subsubsection One-Two-Three' => '', 'Subsubsection One-Two-Two' => '', 'T2H_today' => '', 'Table of Contents' => 'Inhaltsverzeichniss', 'This document was generated by @emph{%{user}} on @emph{%{date}} using @uref{%{program_homepage}, @emph{%{program}}}.' => '', 'This document was generated by @emph{%{user}} using @uref{%{program_homepage}, @emph{%{program}}}.' => '', 'This document was generated on @i{%{date}} using @uref{%{program_homepage}, @i{%{program}}}.' => '', 'This document was generated using @uref{%{program_homepage}, @emph{%{program}}}.' => '', 'Top' => '', 'Untitled Document' => '', 'about (help)' => '', 'beginning of this chapter or previous chapter' => '', 'by @emph{%{user}}' => '', 'by @emph{%{user}} on @emph{%{date}}' => '', 'cover (top) of document' => '', 'current' => '', 'current section' => '', 'first section in reading order' => '', 'following node' => '', 'index' => '', 'last section in reading order' => '', ... [truncated message content] |
From: Vincent K. <vk...@us...> - 2005-07-14 18:38:50
|
Update of /cvsroot/crystaldoc/crystaldoc/base In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv11513/base Modified Files: texi2html.init Log Message: New version of texi2html.init Index: texi2html.init =================================================================== RCS file: /cvsroot/crystaldoc/crystaldoc/base/texi2html.init,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** texi2html.init 25 Jun 2004 18:32:51 -0000 1.1 --- texi2html.init 14 Jul 2005 18:38:40 -0000 1.2 *************** *** 3,121 **** # File: texi2html.init # ! # Customizations for Crystal Space documentation. # ###################################################################### ! $T2H_EXPAND = undef; ! $T2H_TOP_FILE = 'index.html'; ! $T2H_SHOW_MENU = 1; ! $T2H_NUMBER_SECTIONS = 1; [...4361 lines suppressed...] ! { ! my $alpha = shift; ! my $nonalpha = shift; ! my $join = ''; ! my $nonalpha_text = ''; ! my $alpha_text = ''; ! $join = " \n<br>\n" if (@$nonalpha and @$alpha); ! if (@$nonalpha) ! { ! $nonalpha_text = join("\n \n", @$nonalpha) . "\n"; ! } ! if (@$alpha) ! { ! $alpha_text = join("\n \n", @$alpha) . "\n \n"; ! } ! return "<table><tr><th valign=\"top\">" . &$I('Jump to') .": </th><td>" . ! $nonalpha_text . $join . $alpha_text . "</td></tr></table>\n"; ! } ! ! 1; |
From: Vincent K. <vk...@us...> - 2005-07-14 18:36:08
|
Update of /cvsroot/crystaldoc/crystaldoc In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv11022 Modified Files: Jamrules Log Message: Commenting JAMCONFIG_READ Index: Jamrules =================================================================== RCS file: /cvsroot/crystaldoc/crystaldoc/Jamrules,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** Jamrules 25 Jun 2004 18:30:47 -0000 1.1 --- Jamrules 14 Jul 2005 18:35:58 -0000 1.2 *************** *** 9,16 **** JAMCONFIG ?= $(BUILDTOP)/Jamconfig ; include $(JAMCONFIG) ; ! if ! $(JAMCONFIG_READ) ! { ! EXIT "Failed to find configuration information. Please configure project." ; ! } # Put output files into out/systemname. --- 9,16 ---- JAMCONFIG ?= $(BUILDTOP)/Jamconfig ; include $(JAMCONFIG) ; ! #if ! $(JAMCONFIG_READ) ! #{ ! # EXIT "Failed to find configuration information. Please configure project." ; ! #} # Put output files into out/systemname. |
From: Vincent K. <vk...@us...> - 2005-07-14 18:34:46
|
Update of /cvsroot/crystaldoc/crystaldoc In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv10662 Added Files: Jamfile.in configure.ac configure autogen.sh Log Message: Addition of configure stuff --- NEW FILE: configure.ac --- # configure.ac -*- Autoconf -*- #============================================================================== # Copyright (C)2003-2005 by Eric Sunshine <sun...@su...> # # Autoconf input script for Crystal Space. Process this file with # CS/bin/autogen.sh to produce a configure script. #============================================================================== AC_PREREQ([2.56]) #------------------------------------------------------------------------------ # cs_version_number # Keep this value synchronized with CS/include/csver.h. #------------------------------------------------------------------------------ m4_define([cs_version_number], [0.3]) #============================================================================== # INITIALIZATION #============================================================================== AC_INIT([crystaldoc], [cs_version_number], [cry...@li...]) CS_PACKAGEINFO([Crystaldoc], [Copyright (C)1998-2005 Jorrit Tyberghein and others], [http://crystaldoc.sourceforge.net/]) AC_CONFIG_SRCDIR([base/mk/jam/build.jam]) AC_CONFIG_AUX_DIR([base/mk/autoconf]) AC_CANONICAL_HOST #------------------------------------------------------------------------------ # Check for common tools. #------------------------------------------------------------------------------ CS_CHECK_PROGS([TEXI2DVI], [texi2dvi]) CS_EMIT_BUILD_PROPERTY([CMD.TEXI2DVI], [$TEXI2DVI]) CS_CHECK_PROGS([TEXI2PDF], [texi2pdf]) CS_EMIT_BUILD_PROPERTY([CMD.TEXI2PDF], [$TEXI2PDF]) CS_CHECK_PROGS([DVIPS], [dvips]) CS_EMIT_BUILD_PROPERTY([CMD.DVIPS], [$DVIPS]) CS_CHECK_PROGS([DVIPDF], [dvipdf]) CS_EMIT_BUILD_PROPERTY([CMD.DVIPDF], [$DVIPDF]) CS_CHECK_PROGS([MAKEINFO], [makeinfo]) CS_EMIT_BUILD_PROPERTY([CMD.MAKEINFO], [$MAKEINFO]) CS_CHECK_TOOLS([HHC], [hhc]) CS_EMIT_BUILD_PROPERTY([CMD.HHC], [$HHC]) CS_CHECK_PROGS([INSTALL], [install]) CS_EMIT_BUILD_PROPERTY([INSTALL], [$INSTALL]) #CS_CHECK_PROGS([SWIG], [swig]) #AS_IF([test -n "$SWIG"], # [CS_CHECK_PROG_VERSION([swig], [$SWIG -version 2>&1], [1.3.21], # [9.9|.9], [CS_EMIT_BUILD_PROPERTY([CMD.SWIG], [$SWIG])])]) #CS_CHECK_LIBTOOL #CS_EMIT_BUILD_PROPERTY([LIBTOOL], [$LIBTOOL]) #CS_EMIT_BUILD_PROPERTY([APPLE_LIBTOOL], [$APPLE_LIBTOOL]) CS_CHECK_MKDIR CS_EMIT_BUILD_PROPERTY([CMD.MKDIR], [$MKDIR]) CS_EMIT_BUILD_PROPERTY([CMD.MKDIRS], [$MKDIRS]) #------------------------------------------------------------------------------ # In order to avoid alienating users by forcing them to install and use Jam, # config.status is instructed (see far below) to build Jam on the user's behalf # from local sources, and to place the executable in the root of the build # directory. When checking for Jam, in addition to PATH, we also look in root # of the build directory since we might already have built Jam on a previous # configure run. # # IMPLEMENTATION NOTES # # The Crystal Space build system supports Jam versions starting with 2.4. # Earlier versions are rejected. Examples of rejected versions include Apple's # highly modified Jam (based upon 2.2.1), and ftjam (based upon # 2.3.2). BoostJam reports its version number as 3.1.9 (or greater), though it # is actually based upon Jam 2.4. Since we accept 2.4, and since 3.1.9 passes # the "jam -v >= 2.4" assertion, this version anomaly is not a problem. # # We also check for 'make', since it is used to build Jam locally, when needed. #------------------------------------------------------------------------------ m4_define([cs_jam_local_exe], [jam$EXEEXT]) CS_PATH_PROGS([JAM], [jam], [], [$PATH$PATH_SEPARATOR.]) AS_IF([test -n "$JAM"], [CS_CHECK_PROG_VERSION([jam], ["$JAM" -v 2>&1], [2.4], [9.9|.9], [cs_prog_jam_okay=yes], [cs_prog_jam_okay=no])], [cs_prog_jam_okay=no]) AS_IF([test $cs_prog_jam_okay != yes], [JAM=./cs_jam_local_exe CS_NEED_LOCAL_JAM=yes]) CS_EMIT_BUILD_PROPERTY([JAM], [$JAM]) CS_CHECK_PROGS([MAKE], [gnumake gmake make]) #------------------------------------------------------------------------------ # Determine host platform. Recognized families: Unix, Windows, MacOS/X. # # CS_CHECK_HOST # Sets the shell variables cs_host_target and cs_host_family. Client # code can use these variables to emit appropriate Jam variables and # CS_PLATFORM_FOO header define. #------------------------------------------------------------------------------ AC_DEFUN([CS_CHECK_HOST], [AC_REQUIRE([AC_CANONICAL_HOST]) cs_host_os_normalized='' case $host_os in mingw*|cygwin*) cs_host_target=win32gcc cs_host_family=windows ;; darwin*) _CS_CHECK_HOST_DARWIN ;; *) # Everything else is assumed to be Unix or Unix-like. cs_host_target=unix cs_host_family=unix ;; esac]) # crystaldoc: this section was commented (with ##) to prevent compiler # detection. Uncommenting it works. ##AC_DEFUN([_CS_CHECK_HOST_DARWIN], ## [AC_REQUIRE([AC_PROG_CC]) ## AC_REQUIRE([AC_PROG_CXX]) # Both MacOS/X and Darwin are identified via $host_os as "darwin". We need # a way to distinguish between the two. If Carbon.h is present, then # assume MacOX/S; if not, assume Darwin. If --with-x=yes was invoked, and # Carbon.h is present, then assume that user wants to cross-build for # Darwin even though build host is MacOS/X. Implementation note: At least # one MacOS/X user switches between gcc 2.95 and gcc 3.3 with a script # which toggles the values of CC, CXX, and CPP. Unfortunately, CPP was # being set to run the preprocessor directly ("cpp", for instance) rather # than running it via the compiler ("gcc -E", for instance). The problem # with running the preprocessor directly is that __APPLE__ and __GNUC__ are # not defined, which causes the Carbon.h check to fail. We avoid this # problem by supplying a non-empty fourth argument to AC_CHECK_HEADER(), # which causes it to test compile the header only (which is a more robust # test), rather than also testing it via the preprocessor. ## AC_CHECK_HEADER([Carbon/Carbon.h], ## [cs_host_macosx=yes], [cs_host_macosx=no], [/* force compile */]) ## AS_IF([test $cs_host_macosx = yes], ## [AC_MSG_CHECKING([for --with-x]) ## AS_IF([test "${with_x+set}" = set && test "$with_x" = "yes"], ## [AC_MSG_RESULT([yes (assume Darwin)]) ## cs_host_macosx=no], ## [AC_MSG_RESULT([no])])]) ## AS_IF([test $cs_host_macosx = yes], ## [cs_host_target=macosx ## cs_host_family=unix ## cs_host_os_normalized='MacOS/X' ## CS_HEADER_PROPERTY([CS_PLATFORM_MACOSX]) ## CS_HEADER_PROPERTY([CS_24BIT_PIXEL_LAYOUT], [CS_24BIT_PIXEL_ARGB]) # We assume that we always have CoreAudio available on MacOS/X. ## CS_EMIT_BUILD_PROPERTY([COREAUDIO.AVAILABLE], [yes]) ## CS_EMIT_BUILD_PROPERTY([COREAUDIO.LFLAGS], [-framework CoreAudio]) ## AC_CACHE_CHECK([for Objective-C compiler], [cs_cv_prog_objc], ## [cs_cv_prog_objc="$CC"]) ## CS_EMIT_BUILD_PROPERTY([CMD.OBJC], [$cs_cv_prog_objc]) ## AC_CACHE_CHECK([for Objective-C++ compiler], [cs_cv_prog_objcxx], ## [cs_cv_prog_objcxx="$CXX"]) ## CS_EMIT_BUILD_PROPERTY([CMD.OBJC++], [$cs_cv_prog_objcxx])], ## [cs_host_target=unix ## cs_host_family=unix])]) CS_CHECK_HOST case $cs_host_family in windows) CS_HEADER_PROPERTY([CS_PLATFORM_WIN32]) AS_IF([test -z "$cs_host_os_normalized"], [cs_host_os_normalized='Win32']) ;; unix) CS_HEADER_PROPERTY([CS_PLATFORM_UNIX]) AS_IF([test -z "$cs_host_os_normalized"], [cs_host_os_normalized='Unix']) ;; esac cs_host_os_normalized_uc="AS_TR_CPP([$cs_host_os_normalized])" CS_EMIT_BUILD_PROPERTY([TARGET.OS], [$cs_host_os_normalized_uc]) CS_EMIT_BUILD_PROPERTY([TARGET.OS.NORMALIZED], [$cs_host_os_normalized]) CS_HEADER_PROPERTY([CS_PLATFORM_NAME], [AS_ESCAPE(["])$cs_host_os_normalized[]AS_ESCAPE(["])]) #------------------------------------------------------------------------------ # Check if Perl SDK is installed and which compiler and linker flags are # required to embed Perl. Also determine if the glue file can be created with # ExtUtils::Embed or if it must be created manually. #------------------------------------------------------------------------------ CS_CHECK_PROGS([PERL], [perl5 perl]) CS_EMIT_BUILD_PROPERTY([PERL5], [$PERL]) CS_EMIT_BUILD_PROPERTY([PERL], [$PERL]) CS_EMIT_BUILD_PROPERTY([CMD.PERL5], [$PERL]) # csperl5 fails to build on many platforms, so default is NO for now. #AC_ARG_WITH([perl], [AC_HELP_STRING([--with-perl], # [use Perl5 scripting interface (default NO)])]) #AS_IF([test -z "$with_perl"], [with_perl=no]) #AS_IF([test -n "$PERL" && test "$with_perl" != no], # [AC_CACHE_CHECK([for perl ExtUtils::Embed module], [cs_cv_perl_mod_embed], # [AS_IF([AC_RUN_LOG([$PERL -MExtUtils::Embed -e 0 1>&2])], # [cs_cv_perl_mod_embed=yes], [cs_cv_perl_mod_embed=no])]) # AS_IF([test $cs_cv_perl_mod_embed = yes], # [CS_EMIT_BUILD_PROPERTY([PERL5.EXTUTILS.EMBED.AVAILABLE], [yes]) # AC_CACHE_CHECK([for perl DynaLoader module], # [cs_cv_perl_mod_dynaloader], # [AS_IF([AC_RUN_LOG([$PERL -MDynaLoader -e 0 1>&2])], # [cs_cv_perl_mod_dynaloader=yes], # [cs_cv_perl_mod_dynaloader=no])]) # AS_IF([test $cs_cv_perl_mod_dynaloader = yes], # [CS_EMIT_BUILD_PROPERTY([PERL5.DYNALOADER.AVAILABLE], [yes])])], # [# ExtUtils::Embed absent. # AC_MSG_NOTICE([Recommend you install a recent release of Perl 5.]) # AC_MSG_NOTICE([http://www.perl.org/]) # AC_CACHE_CHECK([for perl Config module], [cs_cv_perl_mod_config], # [AS_IF([AC_RUN_LOG([$PERL -MConfig -e 0 1>&2])], # [cs_cv_perl_mod_config=yes], [cs_cv_perl_mod_config=no])])]) # AS_VAR_SET_IF([cs_cv_perl_cflags], [], # [AS_IF([test $cs_cv_perl_mod_embed = yes], # [cs_cv_perl_cflags=`AC_RUN_LOG( # [$PERL -MExtUtils::Embed -e ccopts])` # cs_cv_perl_lflags=`AC_RUN_LOG( # [$PERL -MExtUtils::Embed -e ldopts])` # cs_cv_perl_ext=`AC_RUN_LOG([$PERL -MConfig -e \ # '$e = $Config{"dlext"} || $Config{"so"} || ""; print "$e"'])`], # [AS_IF([test $cs_cv_perl_mod_config = yes], # [cs_perl_core=`AC_RUN_LOG( # [$PERL -MConfig -e 'print $Config{archlib}'])` # cs_perl_core="${cs_perl_core}/CORE" # cs_cv_perl_cflags=`AC_RUN_LOG( # [$PERL -MConfig -e 'print $Config{ccflags}'])` # cs_cv_perl_cflags="${cs_cv_perl_cflags} -I${cs_perl_core}" # cs_cv_perl_lflags=`AC_RUN_LOG([$PERL -MConfig -e \ # 'print $Config{ldflags}, " ", $Config{libs}'])` # cs_cv_perl_lflags="${cs_cv_perl_lflags} -L${cs_perl_core}" # cs_cv_perl_ext=`AC_RUN_LOG([$PERL -MConfig -e \ # '$e = $Config{"dlext"}||$Config{"so"}||""; print "$e"'])`], # [cs_perl_core=`AC_RUN_LOG([$PERL -V:archlib | \ # $PERL -e '<STDIN> =~ m/\x27(.*)\x27/; print $1'])` # cs_perl_core="${cs_perl_core}/CORE" # cs_cv_perl_cflags=`AC_RUN_LOG([$PERL -V:ccflags | \ # $PERL -e '<STDIN> =~ m/\x27(.*)\x27/; print $1'])` # cs_cv_perl_cflags="${cs_cv_perl_cflags} -I${cs_perl_core}" # cs_cv_perl_lflags=`AC_RUN_LOG([$PERL -V:ldflags | \ # $PERL -e '<STDIN> =~ m/\x27(.*)\x27/; print $1'])` # cs_perl_lflags_tmp=`AC_RUN_LOG([$PERL -V:libs | \ # $PERL -e '<STDIN> =~ m/\x27(.*)\x27/; print $1'])` # cs_cv_perl_lflags="${cs_cv_perl_lflags} ${cs_perl_lflags_tmp} # -L${cs_perl_core}" # cs_cv_perl_ext=`AC_RUN_LOG([$PERL -V:dlext | \ # $PERL -e '<STDIN> =~ m/\x27(.*)\x27/; print $1'])`])]) # cs_cv_perl_cflags=CS_PATH_NORMALIZE([$cs_cv_perl_cflags]) # cs_cv_perl_lflags=CS_PATH_NORMALIZE([$cs_cv_perl_lflags])]) # AS_IF([test -n "$cs_cv_perl_cflags$cs_cv_perl_lflags"], # [CS_CHECK_BUILD([if Perl SDK is usable], [cs_cv_perl], # [AC_LANG_PROGRAM( # [[#include <EXTERN.h> # #include <perl.h>]], # [perl_run(0);])], # [CS_CREATE_TUPLE([$cs_cv_perl_cflags],[],[$cs_cv_perl_lflags])]) # AS_IF([test $cs_cv_perl = yes], # [CS_EMIT_BUILD_RESULT([cs_cv_perl], [PERL5]) # CS_EMIT_BUILD_PROPERTY([PERL5.MODULE_EXT],[.$cs_cv_perl_ext])])])]) #------------------------------------------------------------------------------ # Determine if the "make" emulation layer should be synthesized. #------------------------------------------------------------------------------ #AC_MSG_CHECKING([whether to emulate makefiles]) #AC_ARG_ENABLE([make-emulation], # [AC_HELP_STRING([--enable-make-emulation], # [enable emulation layer allowing project to be built with `make', in # addition to `jam' (default YES)])], # [], [enable_make_emulation=yes]) #AC_MSG_RESULT([$enable_make_emulation]) #------------------------------------------------------------------------------ # Boilerplate: Jamconfig #------------------------------------------------------------------------------ #CS_EMIT_BUILD_PROPERTY([COMPILER.CFLAGS], # [AS_ESCAPE([$(COMPILER.CFLAGS.MANDATORY)])], [+]) #CS_EMIT_BUILD_PROPERTY([COMPILER.C++FLAGS], # [AS_ESCAPE([$(COMPILER.C++FLAGS.MANDATORY)])], [+]) CS_EMIT_PACKAGEINFO #CS_OUTPUT_INSTALLDIRS #------------------------------------------------------------------------------ # Output generated files. #------------------------------------------------------------------------------ #CS_HEADER_OUTPUT([include/csconfig.h]) CS_JAMCONFIG_OUTPUT([Jamconfig]) AC_CONFIG_FILES([Jamfile]) #------------------------------------------------------------------------------ # In order to avoid alienating users by forcing them to install and use Jam, we # perform the following actions: # # (1) If the user does not have Jam installed, we build it on his behalf from a # copy of the Jam sources residing in $srcdir/apps/tools/jam, and place the # executable in the root of the build directory. # # (2) Synthesize a makefile which implements all of top-level user-visible # targets provided by the Jam system. The makefile simply forwards these # target invocations over to Jam. #------------------------------------------------------------------------------ # (1) #AC_DEFUN([CS_BUILD_LOCAL_JAM], # [rm -rf $2 # AS_MKDIR_P([$2]) # for jamsrc in $1/*; do # AS_IF([test -f $jamsrc], [cp $jamsrc $2]) # done # # Yacc might not be installed, so ensure that Jam does not try to use it. # YACC= # export YACC # rm -f $3 # AS_IF([AC_RUN_LOG([cd $2 && # $MAKE CC="$CC" CFLAGS="$JAM_CFLAGS" EXENAME=$JAM_EXE0NAME 1>&2])], # [cs_built_jam=`echo $2/bin.*/jam$EXEEXT` # AS_IF([test -f $cs_built_jam], # [cp $cs_built_jam $3], # [AC_MSG_ERROR([failed to build jam; please install manually])])], # [AC_MSG_ERROR([failed to build jam; please install manually])]) # rm -rf $2]) #AC_DEFUN([CS_JAM_CFLAGS], # [AC_REQUIRE([AC_CANONICAL_HOST]) # case $host_os in # mingw*) $1="$$1 -DMSYS" ;; # cygwin*) $1="$$1 -D__cygwin__" ;; # esac # $1=CS_TRIM([$$1])]) #AS_IF([test "$CS_NEED_LOCAL_JAM" = yes && test $enable_make_emulation = yes], # [CS_JAM_CFLAGS([JAM_CFLAGS]) # AC_CONFIG_COMMANDS([cs_jam_local_exe], # [CS_BUILD_LOCAL_JAM([$srcdir/apps/tools/jam], [jambuild], # [cs_jam_local_exe])], # [MAKE=$MAKE # EXEEXT=$EXEEXT # CC="$CC" # JAM_CFLAGS="$JAM_CFLAGS" # JAM_EXE0NAME=./jam0$EXEEXT])]) # (2) #AC_DEFUN([CS_SYNTHESIZE_MAKEFILE], # [AS_IF([AC_RUN_LOG( # ["$JAM" -sDUMPTARGETS_FILE=$tmp/jcache dumptargets 1>&2])], # [jam_targets=all # while read jam_line; do # jam_targets="$jam_targets $jam_line" # done < $tmp/jcache # cat << 'EOF' >$1 # Auto-generated; do not modify. #TO_NULL = >/dev/null 2>&1 #RUN_JAM = \ # silent='-d0'; \ # loud='-dx'; \ # $(JAM) -h | grep '(x)commands' $(TO_NULL) || loud='-d+2'; \ # makeflags=`echo $$MAKEFLAGS | \ # sed 's/--[[^ ]][[^ ]]*//g;s/[[^ ]][[^ ]]*=.*//g'`; \ # jamflags=''; \ # echo "x$$makeflags" | grep k $(TO_NULL) || jamflags="-q $$jamflags"; \ # echo "x$$makeflags" | grep s $(TO_NULL) || jamflags="$$loud $$jamflags"; \ # echo "x$$makeflags" | grep s $(TO_NULL) && jamflags="$$silent $$jamflags"; \ # $(JAM) $$jamflags #EOF # echo "JAM = $JAM" >>$1 # for jam_target in $jam_targets; do # echo ".PHONY: $jam_target" >>$1 # echo "$jam_target:" >>$1 # case $jam_target in # help) echo ' @$(JAM)'" $jam_target" >>$1 ;; # *) echo ' @$(RUN_JAM)'" $jam_target" >>$1 ;; # esac # done], # [AC_MSG_WARN([failed to create makefile emulation layer])]) # rm -f $tmp/jcache]) #AS_IF([test $enable_make_emulation = yes], # [AC_CONFIG_COMMANDS([Makefile], [CS_SYNTHESIZE_MAKEFILE([Makefile])], # [JAM=$JAM])]) #------------------------------------------------------------------------------ # Finalization. #------------------------------------------------------------------------------ AC_OUTPUT AC_MSG_NOTICE([ Please note that this project uses Jam as its build tool, therefore you must type 'jam' to build the project. Jam home: http://www.perforce.com/jam/jam.html Jam source: ftp://ftp.perforce.com/jam/ Also, you must set CRYSTAL environment variable, pointing the CS/ directory of the Crystal Space version used for the translation. Note that all translations may not be based on the same CS version. ]) --- NEW FILE: configure --- #! /bin/sh # Guess values for system-dependent variables and create Makefiles. # Generated by GNU Autoconf 2.59 for crystaldoc 0.3. # # Report bugs to <cry...@li...>. # # Copyright (C) 2003 Free Software Foundation, Inc. # This configure script is free software; the Free Software Foundation # gives unlimited permission to copy, distribute and modify it. ## --------------------- ## ## M4sh Initialization. ## ## --------------------- ## # Be Bourne compatible if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then emulate sh NULLCMD=: # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which # is contrary to our usage. Disable this feature. [...3588 lines suppressed...] Jam source: ftp://ftp.perforce.com/jam/ Also, you must set CRYSTAL environment variable, pointing the CS/ directory of the Crystal Space version used for the translation. Note that all translations may not be based on the same CS version. " >&5 echo "$as_me: Please note that this project uses Jam as its build tool, therefore you must type 'jam' to build the project. Jam home: http://www.perforce.com/jam/jam.html Jam source: ftp://ftp.perforce.com/jam/ Also, you must set CRYSTAL environment variable, pointing the CS/ directory of the Crystal Space version used for the translation. Note that all translations may not be based on the same CS version. " >&6;} --- NEW FILE: autogen.sh --- #! /bin/sh if test ! -f configure.ac ; then echo "*** Please invoke this script from directory containing configure.ac." exit 1 fi MACROFILE=aclocal.m4 MACRODIR=base/mk/autoconf rm -f $MACROFILE for i in $MACRODIR/*.m4 ; do cat $i >> $MACROFILE done autoconf $@ rc=$? rm -f $MACROFILE exit $rc --- NEW FILE: Jamfile.in --- TOP ?= "@top_srcdir@" ; BUILDTOP ?= "@top_builddir@" ; SubDir TOP ; # Common include directories. IncludeDir ; #IncludeDir $(BUILDTOP) include : : literal transient ; #IncludeDir "include" ; # Create some clean targets CleanDir clean : out cs-unix.log ; Clean distclean : Jamconfig Jamfile jambuild jam$(SUFEXE) Makefile config.log config.status config.status.lineno config.cache configure.lineno ; CleanDir distclean : autom4te.cache ; Depends distclean : clean ; Help distclean : "Remove configuration information and built targets" ; Clean maintainerclean : aclocal.m4 configure configure.scan ; Depends maintainerclean : distclean ; # Installation of top-level resources. #InstallDoc README LICENSE ; # In order to avoid alienating users by forcing them to install and use Jam, # the CS configure script synthesizes a makefile which implements all of # top-level user-visible targets provided by the Jam system; and which simply # forwards these target invocations over to Jam. In addition, we also supply # do-nothing 'depend' and 'dep' targets to pacify users who habitually type # 'make depend' or 'make dep'. rule BuildDepend { NotFile $(<) ; Always $(<) ; } BuildDepend depend ; BuildDepend dep ; # msvcgen setup must occur before compile group registration. #SubInclude TOP base mk ; # Process subdirectories. NOTE: Unfortunately, Jam rules are presently # order-sensitive; Library targets must be seen by Jam before Application and # Plugin targets, thus ordering of these SubInclude invocations is dictated by # this limitation. SubInclude TOP fr ; SubInclude TOP es ; SubInclude TOP de ; |
Update of /cvsroot/crystaldoc/crystaldoc/base/mk/autoconf In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv10000/base/mk/autoconf Added Files: checkbuild.m4 checkcppunit.m4 checklib.m4 checklibtool.m4 checkpic.m4 checkprog.m4 checkpthread.m4 checkpython.m4 checktt2.m4 compiler.m4 config.guess config.sub crystal.m4 diagnose.m4 embed.m4 emit.m4 headercache.m4 installdirs.m4 install-sh jamcache.m4 Jamfile makecache.m4 mkdir.m4 packageinfo.m4 path.m4 progver.m4 qualify.m4 split.m4 textcache.m4 trim.m4 warnings.m4 Log Message: Addition of autoconf stuff --- NEW FILE: embed.m4 --- # embed.m4 -*- Autoconf -*- #============================================================================== # Copyright (C)2003,2005 by Eric Sunshine <sun...@su...> # # 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. # #============================================================================== AC_PREREQ([2.56]) #------------------------------------------------------------------------------ # CS_META_INFO_EMBED([EMITTER], [GPL-OKAY]) # Determine if plugin meta-information should be embedded or if it should # exist in a stand-alone .csplugin file, and check if necessary tools and # libraries are present. Sets the shell variable # enable_meta_info_embedding to "yes" if the user requested embedding or # if it was enabled by default; otherwise sets it to "no". # # If EMITTER is provided, then a subset of the following variables # (depending upon platform and availability) are recorded by invoking # CS_EMIT_BUILD_PROPERTY() with EMITTER. As a convenience, if EMITTER is # the literal value "emit" or "yes", then CS_EMIT_BUILD_RESULT()'s # default emitter will be used. # # EMBED_META := yes or no # EMBED_META.CFLAGS := compiler flags # EMBED_META.LFLAGS := linker flags # CMD.WINDRES := windres.exe # OBJCOPY.AVAILABLE := yes or no # CMD.OBJCOPY := objcopy.exe # LIBBFD.AVAILABLE := yes or no # LIBBFD.CFLAGS := libbfd compiler flags # LIBBFD.LFLAGS := libbfd linker flags # # In general, clients need only concern themselves with the various # EMBED_META-related variables. For building plugin modules, utilize # EMBED_META.CFLAGS when compiling, and EMBED_META.LFLAGS when linking. # # On Unix, embedding is accomplished via libbfd, which carries a GPL # license. Projects which carry licenses not compatible with GPL should # consider carefully before enabling embedding on Unix. If your project # is GPL-compatible, then set GPL-OKAY to "yes". This will enable # embedding on Unix by default. If not, then set it to "no" in order to # disable embedding on Unix by default. (The user can still override the # setting via the --enable-meta-info-embedding option.) #------------------------------------------------------------------------------ AC_DEFUN([CS_META_INFO_EMBED], [_CS_META_INFO_EMBED_ENABLE([$1], [$2]) AS_IF([test $enable_meta_info_embedding = yes], [_CS_META_INFO_EMBED_TOOLS([$1]) _CS_META_INFO_EMBED_BFD([$1])], [cs_embed_meta_info=no])]) #------------------------------------------------------------------------------ # _CS_META_INFO_EMBED_ENABLE([EMITTER], [GPL-OKAY]) # Helper for CS_META_INFO_EMBED which adds an # --enable-meta-info-embedding option to the configure script allowing # the user to control embedding. Sets the shell variable # enable_meta_info_embedding to yes or no. # # IMPLEMENTATION NOTES # # On Unix, embedding is disabled by default unless overridden via # GPL-OKAY because libbfd carries a GPL license which may be incompatible # with a project's own license (such as LGPL). #------------------------------------------------------------------------------ AC_DEFUN([_CS_META_INFO_EMBED_ENABLE], [AC_REQUIRE([CS_CHECK_HOST]) AC_MSG_CHECKING([whether to embed plugin meta-information]) case $cs_host_target in unix) cs_embed_meta_info_default=m4_default([$2],[no]) ;; *) cs_embed_meta_info_default=yes ;; esac AC_ARG_ENABLE([meta-info-embedding], [AC_HELP_STRING([--enable-meta-info-embedding], [store plugin meta-information directly inside plugin modules if supported by platform; if disabled, meta-information is stored in stand-alone .csplugin files; this is enabled by default for non-Unix platforms, and disabled by default for non-GPL projects on Unix platforms since the Unix implementation requires the GPL-licensed libbfd library; enable this option on Unix only if you are certain you want a GPL-licensed library infecting your project])], [], [enable_meta_info_embedding=$cs_embed_meta_info_default]) AC_MSG_RESULT([$enable_meta_info_embedding]) CS_EMIT_BUILD_PROPERTY([EMBED_META], [$enable_meta_info_embedding], [], [], CS_EMITTER_OPTIONAL([$1]))]) #------------------------------------------------------------------------------ # _CS_META_INFO_EMBED_TOOLS([EMITTER]) # Helper for CS_META_INFO_EMBED() which searches for tools required for # plugin meta-info embedding. #------------------------------------------------------------------------------ AC_DEFUN([_CS_META_INFO_EMBED_TOOLS], [CS_CHECK_TOOLS([WINDRES], [windres]) CS_EMIT_BUILD_PROPERTY([CMD.WINDRES], [$WINDRES], [], [], CS_EMITTER_OPTIONAL([$1])) CS_CHECK_TOOLS([OBJCOPY], [objcopy]) AS_IF([test -n "$OBJCOPY"], [CS_EMIT_BUILD_PROPERTY([OBJCOPY.AVAILABLE], [yes], [], [], CS_EMITTER_OPTIONAL([$1])) CS_EMIT_BUILD_PROPERTY([CMD.OBJCOPY], [$OBJCOPY], [], [], CS_EMITTER_OPTIONAL([$1]))])]) #------------------------------------------------------------------------------ # _CS_META_INFO_EMBED_BFD([EMITTER]) # Helper for CS_EMIT_BUILD_PROPERTY() which checks if libbfd is present # (which is part of GNU binutils). # # WARNING # # libbfd carries a GPL license which is incompatible with the LGPL # license of Crystal Space. On platforms for which libbfd can be used, # we check for and utilize this library only if explicitly requested by # the user via --enable-meta-info-embedding. # # IMPLEMENTATION NOTES # # It seems that some platforms have two version of libiberty installed: # one from binutils and one from gcc. The binutils version resides in # /usr/lib, whereas the gcc version resides in the gcc installation # directory. The gcc version, by default, takes precedence at link time # over the binutils version. Unfortunately, in broken cases, the gcc # version of libiberty is missing htab_create_alloc() which is required # by some libbfd functions. The extensive secondary check of libbfd # catches this anomalous case of broken gcc libiberty. It turns out that # it is possible to make the linker prefer the binutils version by # specifying -L/usr/lib, thus the extensive test attempts to do so in an # effort to resolve this unfortunate issue. # # Furthermore, recent versions of Mingw supply libbfd and libiberty. # Since Crystal Space uses native Win32 API for meta-information # embedding on Windows, we do not require these libraries on Windows. # More importantly, users do not want to see these GPL-licensed libraries # appear in the link statement for plugin modules, thus we explicitly # disable this test on Windows. #------------------------------------------------------------------------------ AC_DEFUN([_CS_META_INFO_EMBED_BFD], [AC_REQUIRE([AC_CANONICAL_HOST]) AS_IF([test $enable_meta_info_embedding = yes], [case $host_os in mingw*|cygwin*) cs_check_libbfd=no ;; *) cs_check_libbfd=yes ;; esac], [cs_check_libbfd=no]) AS_IF([test $cs_check_libbfd = yes], [CS_CHECK_LIB_WITH([bfd], [AC_LANG_PROGRAM([[#include <bfd.h>]], [bfd_init();])], [], [], [], [], [], [], [-liberty])], [cs_cv_libbfd=no]) AS_IF([test $cs_cv_libbfd = yes], [CS_CHECK_BUILD([if libbfd is usable], [cs_cv_libbfd_ok], [AC_LANG_PROGRAM([[#include <bfd.h>]], [bfd* p; asection* s; bfd_init(); p = bfd_openr(0,0); bfd_check_format(p,bfd_object); bfd_get_section_by_name(p,0); bfd_section_size(p,s); bfd_get_section_contents(p,s,0,0,0); bfd_close(p);])], [CS_CREATE_TUPLE() CS_CREATE_TUPLE([],[-L/usr/lib],[])], [], [], [], [], [$cs_cv_libbfd_cflags], [$cs_cv_libbfd_lflags], [$cs_cv_libbfd_libs])], [cs_cv_libbfd_ok=no]) AS_IF([test $cs_cv_libbfd_ok = yes], [CS_EMIT_BUILD_RESULT([cs_cv_libbfd_ok], [LIBBFD], CS_EMITTER_OPTIONAL([$1])) CS_EMIT_BUILD_PROPERTY([EMBED_META.CFLAGS], [$cs_cv_libbfd_ok_cflags], [+], [], CS_EMITTER_OPTIONAL([$1])) CS_EMIT_BUILD_PROPERTY([EMBED_META.LFLAGS], [$cs_cv_libbfd_ok_lflags $cs_cv_libbfd_ok_libs],[+], [], CS_EMITTER_OPTIONAL([$1]))])]) --- NEW FILE: checkbuild.m4 --- # checkbuild.m4 -*- Autoconf -*- #============================================================================== # Copyright (C)2003 by Eric Sunshine <sun...@su...> # # 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. # #============================================================================== AC_PREREQ([2.56]) #------------------------------------------------------------------------------ # CS_SPLIT_TUPLE(TUPLE, OUTPUT-VARIABLES) # Split a build-tuple into its component parts. A build tuple is # constructed by CS_CREATE_TUPLE() and is comprised of compiler flags, # linker flags, and library references. OUTPUT-VARIABLES is a # comma-delimited list of shell variables which should receive the # extracted compiler flags, linker flags, and library references, # respectively. #------------------------------------------------------------------------------ AC_DEFUN([CS_SPLIT_TUPLE], [CS_SPLIT([$1], [cs_dummy,$2], [@]) m4_map([_CS_SPLIT_TUPLE], [$2])]) AC_DEFUN([_CS_SPLIT_TUPLE], [$1=`echo $$1 | sed 'y%@%:@% %'` ]) #------------------------------------------------------------------------------ # CS_CREATE_TUPLE([CFLAGS], [LFLAGS], [LIBS]) # Construct a build-tuple which is comprised of compiler flags, linker # flags, and library references. Build tuples are encoded so as to # preserve whitespace in each component. This makes it possible for # macros (such as CS_BUILD_IFELSE) which employ build tuples to accept # whitespace-delimited lists of tuples, and for shell "for" statements to # iterate over tuple lists without compromising whitespace embedded # within individual flags or library references. #------------------------------------------------------------------------------ AC_DEFUN([CS_CREATE_TUPLE], [`echo @$1@$2@$3 | sed 'y% %@%:@%'`]) #------------------------------------------------------------------------------ # CS_LANG_CFLAGS # Return the literal string CFLAGS if the current language is C. Return # the literal string CXXFLAGS if the current language is C++. Generic # compiler test macros which need to modify or save the compiler flags # can invoke this macro to get the name of the compiler flags environment # variable (either CFLAGS or CXXFLAGS) depending upon the current # language. For example: # CS_LANG_CFLAGS="$CS_LANG_CFLAGS -Wall" # With C, this expands to: # CFLAGS="$CFLAGS -Wall" # With C++, it expands to: # CXXFLAGS="$CXXFLAGS -Wall" #------------------------------------------------------------------------------ AC_DEFUN([CS_LANG_CFLAGS], [AC_LANG_CASE([C], [CFLAGS], [C++], [CXXFLAGS])]) #------------------------------------------------------------------------------ # CS_BUILD_IFELSE([PROGRAM], [FLAGS], [LANGUAGE], [ACTION-IF-BUILT], # [ACTION-IF-NOT-BUILT], [OTHER-CFLAGS], [OTHER-LFLAGS], # [OTHER-LIBS], [INHIBIT-OTHER-FLAGS], [ERROR-REGEX]) # Try building a program using the supplied compiler flags, linker flags, # and library references. PROGRAM is typically a program composed via # AC_LANG_PROGRAM(). PROGRAM may be omitted if you are interested only # in learning if the compiler or linker respects certain flags. LANGUAGE # is typically either C or C++ and specifies which compiler to use for # the test. If LANGUAGE is omitted, C is used. FLAGS is a whitespace # delimited list of build tuples. Tuples are created with # CS_CREATE_TUPLE() and are composed of up to three elements each. The # first element represents compiler flags, the second linker flags, and # the third libraries used when linking the program. Each tuple from # FLAGS is attempted in order. If you want a build attempted with no # special flags prior to builds with specialized flags, create an empty # tuple with CS_CREATE_TUPLE() at the start of the FLAGS list. If the # build is successful, then the shell variables cs_build_ok is set to # "yes", cs_build_cflags, cs_build_lflags, and cs_build_libs are set to # the tuple elements which resulted in the successful build, and # ACTION-IF-BUILT is invoked. Upon successful build, no further tuples # are consulted. If no tuple results in a successful build, then # cs_build_ok is set to "no" and ACTION-IF-NOT-BUILT is invoked. # OTHER-CFLAGS, OTHER-LFLAGS, and OTHER-LIBS specify additional compiler # flags, linker flags, and libraries which should be used with each tuple # build attempt. Upon successful build, these additional flags are also # reflected in the variables cs_build_cflags, cs_build_lflags, and # cs_build_libs unless INHIBIT-OTHER-FLAGS is a non-empty string. The # optional ERROR-REGEX places an additional constraint upon the build # check. If specified, ERROR-REGEX, which is a standard `grep' regular # expression, is applied to output captured from the compiler and linker. # If ERROR-REGEX matches, then the build is deemed a failure, and # cs_build_ok is set to "no". This facility is useful for broken build # tools which emit an error message yet still return success as a result. # In such cases, it should be possible to detect the failure by scanning # the tools' output. # # IMPLEMENTATION NOTES # # In Autoconf 2.57 and earlier, AC_LINK_IFELSE() invokes AC_TRY_EVAL(), # which does not provide access to the captured output. To work around # this limitation, we temporarily re-define AC_TRY_EVAL() as # _AC_EVAL_STDERR(), which leaves the captured output in conftest.err # (which we must also delete). In Autoconf 2.58, however, # AC_LINK_IFELSE() instead already invokes _AC_EVAL_STDERR() on our # behalf, however we must be careful to apply ERROR-REGEX within the # invocation AC_LINK_IFELSE(), since AC_LINK_IFELSE() deletes # conftest.err before it returns. #------------------------------------------------------------------------------ AC_DEFUN([CS_BUILD_IFELSE], [AC_LANG_PUSH(m4_default([$3],[C])) cs_cflags_save="$CS_LANG_CFLAGS" cs_lflags_save="$LDFLAGS" cs_libs_save="$LIBS" cs_build_ok=no m4_ifval([$10], [m4_pushdef([AC_TRY_EVAL], [_AC_EVAL_STDERR]($$[1]))]) for cs_build_item in m4_default([$2],[CS_CREATE_TUPLE()]) do CS_SPLIT_TUPLE( [$cs_build_item],[cs_cflags_test,cs_lflags_test,cs_libs_test]) CS_LANG_CFLAGS="$cs_cflags_test $6 $cs_cflags_save" LDFLAGS="$cs_lflags_test $7 $cs_lflags_save" LIBS="$cs_libs_test $8 $cs_libs_save" AC_LINK_IFELSE(m4_default([$1], [AC_LANG_PROGRAM([],[])]), [m4_ifval([$10], [AS_IF([AC_TRY_COMMAND( [grep "AS_ESCAPE([$10])" conftest.err >/dev/null 2>&1])], [cs_build_ok=no], [cs_build_ok=yes])], [cs_build_ok=yes])]) AS_IF([test $cs_build_ok = yes], [break]) done m4_ifval([$10], [m4_popdef([AC_TRY_EVAL]) rm -f conftest.err]) CS_LANG_CFLAGS=$cs_cflags_save LDFLAGS=$cs_lflags_save LIBS=$cs_libs_save AC_LANG_POP(m4_default([$3],[C])) AS_IF([test $cs_build_ok = yes], [cs_build_cflags=CS_TRIM([$cs_cflags_test[]m4_ifval([$9],[],[ $6])]) cs_build_lflags=CS_TRIM([$cs_lflags_test[]m4_ifval([$9],[],[ $7])]) cs_build_libs=CS_TRIM([$cs_libs_test[]m4_ifval([$9],[],[ $8])]) $4], [$5])]) #------------------------------------------------------------------------------ # CS_CHECK_BUILD(MESSAGE, CACHE-VAR, [PROGRAM], [FLAGS], [LANGUAGE], # [ACTION-IF-BUILT], [ACTION-IF-NOT-BUILT], [IGNORE-CACHE], # [OTHER-CFLAGS], [OTHER-LFLAGS], [OTHER-LIBS], # [INHIBIT-OTHER-FLAGS], [ERROR-REGEX]) # Like CS_BUILD_IFELSE() but also prints "checking" and result messages, # and optionally respects the cache. Sets CACHE-VAR to "yes" upon # success, else "no" upon failure. Additionally, sets CACHE-VAR_cflags, # CACHE-VAR_lflags, and CACHE-VAR_libs to the values which resulted in a # successful build. If IGNORE-CACHE is "yes", then the cache variables # are ignored upon entry to this macro, however they are still set to # appropriate values upon exit. #------------------------------------------------------------------------------ AC_DEFUN([CS_CHECK_BUILD], [AS_IF([test "$8" != yes], [AC_CACHE_CHECK([$1], [$2], [CS_BUILD_IFELSE([$3], [$4], [$5], [$2=yes $2_cflags=$cs_build_cflags $2_lflags=$cs_build_lflags $2_libs=$cs_build_libs], [$2=no], [$9], [$10], [$11], [$12], [$13])])], [AC_MSG_CHECKING([$1]) CS_BUILD_IFELSE([$3], [$4], [$5], [$2=yes $2_cflags=$cs_build_cflags $2_lflags=$cs_build_lflags $2_libs=$cs_build_libs], [$2=no], [$9], [$10], [$11], [$12], [$13]) AC_MSG_RESULT([$$2])]) AS_IF([test $$2 = yes], [$6], [$2_cflags='' $2_lflags='' $2_libs='' $7])]) #------------------------------------------------------------------------------ # CS_CHECK_BUILD_FLAGS(MESSAGE, CACHE-VAR, FLAGS, [LANGUAGE], # [ACTION-IF-RECOGNIZED], [ACTION-IF-NOT-RECOGNIZED], # [OTHER-CFLAGS], [OTHER-LFLAGS], [OTHER-LIBS], # [ERROR-REGEX]) # Like CS_CHECK_BUILD(), but checks only if the compiler or linker # recognizes a command-line option or options. MESSAGE is the "checking" # message. CACHE-VAR is the shell cache variable which receives the flag # or flags recognized by the compiler or linker. FLAGS is a # whitespace-delimited list of build tuples created with # CS_CREATE_TUPLE(). Each tuple from FLAGS is attempted in order until # one is found which is recognized by the compiler. After that, no # further flags are checked. LANGUAGE is typically either C or C++ and # specifies which compiler to use for the test. If LANGUAGE is omitted, # C is used. If a command-line option is recognized, then CACHE-VAR is # set to the composite value of $cs_build_cflags, $cs_build_lflags, and # $cs_build_libs of the FLAGS element which succeeded (not including the # "other" flags) and ACTION-IF-RECOGNIZED is invoked. If no options are # recognized, then CACHE-VAR is set to the empty string, and # ACTION-IF-NOT-RECOGNIZED is invoked. As a convenience, in case # comparing CACHE-VAR against the empty string to test for failure is # undesirable, a second variable named CACHE-VAR_ok is set to the literal # "no" upon failure, and to the same value as CACHE-VAR upon success. #------------------------------------------------------------------------------ AC_DEFUN([CS_CHECK_BUILD_FLAGS], [AC_CACHE_CHECK([$1], [$2_ok], [CS_BUILD_IFELSE([], [$3], [$4], [$2=CS_TRIM([$cs_build_cflags $cs_build_lflags $cs_build_libs]) $2_ok="$$2"], [$2='' $2_ok=no], [$7], [$8], [$9], [Y], [$10])]) AS_IF([test "$$2_ok" != no], [$5], [$6])]) --- NEW FILE: mkdir.m4 --- # mkdir.m4 -*- Autoconf -*- #============================================================================== # Copyright (C)2003 by Eric Sunshine <sun...@su...> # # 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. # #============================================================================== AC_PREREQ([2.56]) #------------------------------------------------------------------------------ # CS_CHECK_MKDIR # Determine how to create a directory and a directory tree. Sets the # shell variable MKDIR to the command which creates a directory, and # MKDIRS to the command which creates a directory tree. Invokes # AC_SUBST() for MKDIR and MKDIRS. # # IMPLEMENTATION NOTES # We need to know the exact commands, so that we can emit them, thus the # AS_MKDIR_P function is not what we want to use here since it does not # provide access to the commands (and might not even discover suitable # commands). First try "mkdir -p", then try the older "mkdirs". # Finally, if the mkdir command failed to recognize -p, then it might # have created a directory named "-p", so clean up that bogus directory. #------------------------------------------------------------------------------ AC_DEFUN([CS_CHECK_MKDIR], [AC_CACHE_CHECK([how to create a directory], [cs_cv_shell_mkdir], [cs_cv_shell_mkdir='mkdir']) AC_SUBST([MKDIR], [$cs_cv_shell_mkdir]) AC_CACHE_CHECK([how to create a directory tree], [cs_cv_shell_mkdir_p], [if $cs_cv_shell_mkdir -p . 2>/dev/null; then cs_cv_shell_mkdir_p='mkdir -p' elif mkdirs . 2>/dev/null; then cs_cv_shell_mkdir_p='mkdirs' fi test -d ./-p && rmdir ./-p]) AS_VAR_SET_IF([cs_cv_shell_mkdir_p], [AC_SUBST([MKDIRS], [$cs_cv_shell_mkdir_p])], [CS_MSG_ERROR([do not know how to create a directory tree])])]) #------------------------------------------------------------------------------ # Replacement for AS_MKDIR_P() from m4sugar/m4sh.m4 which fixes two problems # which are present in Autoconf 2.57 and probably all earlier 2.5x versions. # This bug, along with a patch, was submitted to the Autoconf GNATS database by # Eric Sunshine as #227 on 17-Dec-2002. The bogus "-p" directory bug was fixed # for Autoconf 2.58 on 26-Sep-2003. The "mkdirs" optimization was not accepted # (since it is unnecessary; it's only an optimization). # # 1) Removes bogus "-p" directory which the stock AS_MKDIR_P() leaves laying # around in the working directory if the mkdir command does not recognize # the -p option. # 2) Takes advantage of the older "mkdirs" program if it exists and if "mkdir # -p" does not work. #------------------------------------------------------------------------------ m4_defun([_AS_MKDIR_P_PREPARE], [if mkdir -p . 2>/dev/null; then as_mkdir_p='mkdir -p' elif mkdirs . 2>/dev/null; then as_mkdir_p='mkdirs' else as_mkdir_p='' fi test -d ./-p && rmdir ./-p ])# _AS_MKDIR_P_PREPARE m4_define([AS_MKDIR_P], [AS_REQUIRE([_$0_PREPARE])dnl { if test -n "$as_mkdir_p"; then $as_mkdir_p $1 else as_dir=$1 as_dirs= while test ! -d "$as_dir"; do as_dirs="$as_dir $as_dirs" as_dir=`AS_DIRNAME("$as_dir")` done test ! -n "$as_dirs" || mkdir $as_dirs fi || AS_ERROR([cannot create directory $1]); } ])# AS_MKDIR_P --- NEW FILE: jamcache.m4 --- # jamcache.m4 -*- Autoconf -*- #============================================================================== # Copyright (C)2003 by Eric Sunshine <sun...@su...> # # 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. # #============================================================================== AC_PREREQ([2.56]) #------------------------------------------------------------------------------ # Text cache facility for Jam-style properties. The cache is stored in # the shell variable cs_jamfile_text. # # CS_JAMCONFIG_APPEND(TEXT) # Append text to the Jam text cache. This is a cover for # CS_TEXT_CACHE_APPEND(). # # CS_JAMCONFIG_PREPEND(TEXT) # Prepend text to the Jam text cache. This is a cover for # CS_TEXT_CACHE_PREPEND(). # # CS_JAMCONFIG_PROPERTY(KEY, VALUE, [APPEND], [UNCONDITIONAL]) # Append a line of the form "KEY ?= VALUE" to the Jam text cache. If the # APPEND argument is not the empty string, then VALUE is appended to the # existing value of KEY using the form "KEY += VALUE". If the # UNCONDITIONAL argument is not empty, then the value of KEY is set # unconditionally "KEY = VALUE", rather than via "KEY ?= VALUE". APPEND # takes precedence over UNCONDITIONAL. Note that if VALUE references # other Jam variables, for example $(OBJS), then be sure to protect the # value with AS_ESCAPE(). For example: # CS_JAMCONFIG_PROPERTY([ALLOBJS], [AS_ESCAPE([$(OBJS) $(LIBOBJS)])]) # # CS_JAMCONFIG_OUTPUT(FILENAME) # Instruct config.status to write the Jam text cache to the given # filename. This is a cover for CS_TEXT_CACHE_OUTPUT(). #------------------------------------------------------------------------------ AC_DEFUN([CS_JAMCONFIG_APPEND], [CS_TEXT_CACHE_APPEND([cs_jamconfig_text], [$1])]) AC_DEFUN([CS_JAMCONFIG_PREPEND], [CS_TEXT_CACHE_PREPEND([cs_jamconfig_text], [$1])]) AC_DEFUN([CS_JAMCONFIG_PROPERTY], [CS_JAMCONFIG_APPEND( [$1 m4_ifval([$3], [+=], m4_ifval([$4], [=], [?=])) \"$2\" ; ])]) AC_DEFUN([CS_JAMCONFIG_OUTPUT], [CS_TEXT_CACHE_OUTPUT([cs_jamconfig_text], [$1])]) --- NEW FILE: textcache.m4 --- # textcache.m4 -*- Autoconf -*- #============================================================================== # Copyright (C)2003 by Eric Sunshine <sun...@su...> # # 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. # #============================================================================== AC_PREREQ([2.56]) #------------------------------------------------------------------------------ # Text cache facility. These macros provide a way to incrementally store # arbitrary text in a shell variable, and to write the saved text to a file. # # CS_TEXT_CACHE_APPEND(VARIABLE, TEXT) # Append text to the contents of the named shell variable. If the text # contains references to shell variables (such as $foo), then those # references will be expanded. If expansion is not desired, then protect # the text with AS_ESCAPE(). # # CS_TEXT_CACHE_PREPEND(VARIABLE, TEXT) # Prepend text to the contents of the named shell variable. If the text # contains references to shell variables (such as $foo), then those # references will be expanded. If expansion is not desired, then protect # the text with AS_ESCAPE(). # # CS_TEXT_CACHE_OUTPUT(VARIABLE, FILENAME) # Instruct config.status to write the contents of the named shell # variable to the given filename. If the file resides in a directory, # the directory will be created, if necessary. If the output file # already exists, and if the cached text is identical to the contents of # the existing file, then the existing file is left alone, thus its time # stamp remains unmolested. This heuristic may help to minimize rebuilds # when the file is listed as a dependency in a makefile. # # *NOTE* # There is a bug in Autoconf 2.57 and probably all earlier 2.5x versions # which results in errors if AC_CONFIG_COMMANDS is invoked for a `tag' # which represents a file in a directory which does not yet exist. # Unfortunately, even invoking AS_MKDIR_P in the `cmd' portion of # AC_CONFIG_COMMANDS does not solve the problem because the generated # configure script attempts to access information about the directory # before AS_MKDIR_P has a chance to create it. This forces us to invoke # AS_MKDIR_P in the third argument to AC_CONFIG_COMMANDS (the # `init-cmds') rather than the second (the `cmds'). This is undesirable # because it means that the directory will be created anytime # config.status is invoked (even for a simple --help), rather than being # created only when requested to output the text cache. This bug was # submitted to the Autoconf GNATS database by Eric Sunshine as #228 on # 27-Dec-2002. It was fixed for Autoconf 2.58 on 26-Sep-2003. The # official fix makes the assumption that `tag' always represents a file # (as opposed to some generic target), and creates the file's directory # is not present. #------------------------------------------------------------------------------ AC_DEFUN([CS_TEXT_CACHE_APPEND], [$1="${$1}$2"]) AC_DEFUN([CS_TEXT_CACHE_PREPEND], [$1="$2${$1}"]) AC_DEFUN([CS_TEXT_CACHE_OUTPUT], [AC_CONFIG_COMMANDS([$2], [echo $ECHO_N "$$1$ECHO_C" > $tmp/tcache AS_IF([diff $2 $tmp/tcache >/dev/null 2>&1], [AC_MSG_NOTICE([$2 is unchanged])], [rm -f $2 cp $tmp/tcache $2]) rm -f $tmp/tcache], [$1='$$1' cs_dir=`AS_DIRNAME([$2])` AS_ESCAPE(AS_MKDIR_P([$cs_dir]), [$`\])])]) --- NEW FILE: checkpython.m4 --- # checkpython.m4 -*- Autoconf -*- #============================================================================== # Copyright (C)2003,2004 by Eric Sunshine <sun...@su...> # # 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. # #============================================================================== AC_PREREQ([2.56]) #------------------------------------------------------------------------------ # CS_CHECK_PYTHON([EMITTER], [SDK-CHECK-DEFAULT], [WITH-DESCRIPTION]) # Check for Python and a working Python SDK. Sets the shell variable # PYTHON to the name of the Python interpreter and invokes AC_SUBST(). # The shell variable cs_cv_python is set to "yes" if a working Python SDK # is discovered, else "no". If available, then the variables # cs_cv_python_cflags, cs_cv_python_lflags, and cs_cv_python_libs are # set. (As a convenience, these variables can be emitted to an output # file with CS_EMIT_BUILD_RESULT() by passing "cs_cv_python" as its # CACHE-VAR argument.) As a convenience, the shell variable # cs_cv_python_ext is set to the suffix of Python extension modules (with # leading dot; typically ".dll" or ".so"). The SDK check can be enabled # or disabled with --with[out]-python. SDK-CHECK-DEFAULT should be # "with" or "without". If SDK-CHECK-DEFAULT is "with" or if it is # ommitted, then --with-python is the default, else --without-python is # the default. WITH-DESCRIPTION is the description to use for the # --with[out]-python option. The literal string "use" (or "do not use") # is prepended to WITH-DESCRIPTION. If omitted, WITH-DESCRIPTION defaults # to "Python". If EMITTER is provided, then CS_EMIT_BUILD_RESULT() is # invoked with EMITTER in order to record the results in an output # file. As a convenience, if EMITTER is the literal value "emit" or # "yes", then CS_EMIT_BUILD_RESULT()'s default emitter will be used. # When EMITTER is provided, the following properties are emitted to the # output file: PTYHON (the actual interpreter), PYTHON.AVAILABLE ("yes" # or "no"), PYTHON.CFLAGS, PYTHON.LFLAGS, and PYTHON.MODULE_EXT. #------------------------------------------------------------------------------ AC_DEFUN([CS_CHECK_PYTHON], [AC_REQUIRE([CS_CHECK_PTHREAD]) CS_COMPILER_IGNORE_LONG_DOUBLE([C++], [cs_cv_prog_cxx_ignore_long_double]) AC_ARG_WITH([python], [AC_HELP_STRING([--]m4_if([$2],[without],[with],[without])[-python], m4_if([$2],[without],[use],[do not use]) m4_default([$3],[Python]))]) AS_IF([test -z "$with_python"], [with_python=m4_if([$2], [without], [no], [yes])]) CS_CHECK_PROGS([PYTHON], [python]) AC_SUBST([PYTHON]) CS_EMIT_BUILD_PROPERTY([PYTHON],[$PYTHON],[],[],CS_EMITTER_OPTIONAL([$1])) AS_IF([test -n "$PYTHON" && test "$with_python" != no], [AC_CACHE_CHECK([for python SDK], [cs_cv_python_sdk], [cs_pyver=`AC_RUN_LOG([$PYTHON -c 'import sys, string; \ print string.join(map(str,sys.version_info[[:2]]),".")'])` cs_cv_pybase="python${cs_pyver}" cs_cv_pybase_cflags=CS_RUN_PATH_NORMALIZE([$PYTHON -c \ 'import distutils.sysconfig; \ print "-I" + distutils.sysconfig.get_python_inc()']) cs_cv_pybase_cflags="$cs_cv_pybase_cflags \ $cs_cv_prog_cxx_ignore_long_double" # Depending upon platform and installation, link library might # reside in "${prefix}/lib", "get_python_lib()/config", or # "${prefix}/libs" on Windows. cs_cv_pybase_lflags=CS_RUN_PATH_NORMALIZE([$PYTHON -c \ 'import sys,distutils.sysconfig; \ print "-L" + distutils.sysconfig.get_python_lib(0,1) + \ " -L"+distutils.sysconfig.get_python_lib(0,1)+"/config" + \ " -L"+sys.prefix + "/lib" + " -L"+sys.prefix + "/libs"']) cs_cv_pybase_libs=CS_RUN_PATH_NORMALIZE([$PYTHON -c \ 'import distutils.sysconfig; \ print (distutils.sysconfig.get_config_var("LIBS") or "")+" "+ \ (distutils.sysconfig.get_config_var("SYSLIBS") or "")']) cs_cv_python_ext=`AC_RUN_LOG([$PYTHON -c \ 'import distutils.sysconfig; \ print (distutils.sysconfig.get_config_var("SO") or "")'])` AS_IF([test -n "$cs_pyver" && test -n "$cs_cv_pybase_cflags" && test -n "$cs_cv_pybase_lflags"], [cs_cv_python_sdk=yes], [cs_cv_python_sdk=no])]) # Check if Python SDK is usable. The most common library name is the # basename with a few decorations (for example, libpython2.2.a), # however some Windows libraries lack the decimal point (for example, # libpython22.a or python22.lib), so we must check for both variations. # Furthermore, MacOS/X 10.3 supplies a Python.framework, however, # earlier releases did not. Instead, Python on MacOS/X pre-10.3 uses a # one-level linker namespace, which means that loadable Python modules # do not link against the Python library; instead, unresolved symbols # in the modules are satisfied automatically by the Python executable # when the module is loaded into the executable. For this reason, # Python on MacOS/X does not even provide a Python link library. We # account for this by trying -bundle, rather than linking against the # library. AS_IF([test $cs_cv_python_sdk = yes], [CS_EMIT_BUILD_PROPERTY([PYTHON.MODULE_EXT], [$cs_cv_python_ext], [], [], CS_EMITTER_OPTIONAL([$1])) cs_pywinlib=`echo "$cs_cv_pybase" | sed 's/\.//g'` cs_pyflags="$cs_pyflags CS_CREATE_TUPLE([],[],[-framework Python])" cs_pyflags="$cs_pyflags CS_CREATE_TUPLE([],[],[-l$cs_cv_pybase])" cs_pyflags="$cs_pyflags CS_CREATE_TUPLE([],[],[-l$cs_pywinlib])" cs_pyflags="$cs_pyflags CS_CREATE_TUPLE( [],[-bundle -flat_namespace -undefined suppress])" CS_CHECK_BUILD([if python SDK is usable], [cs_cv_python], [AC_LANG_PROGRAM([[#include <Python.h>]], [Py_Initialize(); Py_Finalize();])], [$cs_pyflags], [], [CS_EMIT_BUILD_RESULT([cs_cv_python], [PYTHON], CS_EMITTER_OPTIONAL([$1]))], [], [], [$cs_cv_pybase_cflags $cs_cv_sys_pthread_cflags], [$cs_cv_pybase_lflags $cs_cv_sys_pthread_lflags], [$cs_cv_pybase_libs $cs_cv_sys_pthread_libs])], [cs_cv_python=no])], [cs_cv_python=no])]) #------------------------------------------------------------------------------ # CS_EMIT_CHECK_PYTHON([SDK-CHECK-DEFAULT], [WITH-DESCRIPTION], [EMITTER]) # DEPRECATED: Previously, layered EMITTER functionality atop # CS_CHECK_PYTHON() before CS_CHECK_PYTHON() supported emitters directly. #------------------------------------------------------------------------------ AC_DEFUN([CS_EMIT_CHECK_PYTHON], [CS_CHECK_PYTHON(m4_ifval([$3], [$3], [emit]), [$1], [$2])]) --- NEW FILE: diagnose.m4 --- # diagnose.m4 -*- Autoconf -*- #============================================================================== # Copyright (C)2003 by Eric Sunshine <sun...@su...> # # 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. # #============================================================================== AC_PREREQ([2.56]) #------------------------------------------------------------------------------ # CS_MSG_ERROR(ERROR-DESCRIPTION, [EXIT-STATUS]) # A convenience wrapper for AC_MSG_ERROR() which invokes AC_CACHE_SAVE() # before aborting the script. Saving the cache should make subsequent # re-invocations of the configure script faster once the user has # corrected the problem(s) which caused the failure. #------------------------------------------------------------------------------ AC_DEFUN([CS_MSG_ERROR], [AC_CACHE_SAVE AC_MSG_ERROR([$1], [$2])]) --- NEW FILE: warnings.m4 --- # warnings.m4 -*- Autoconf -*- #============================================================================== # Copyright (C)2005 by Eric Sunshine <sun...@su...> # # 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. # #============================================================================== AC_PREREQ([2.56]) #------------------------------------------------------------------------------ # CS_COMPILER_WARNINGS([LANGUAGE], [CACHE-VAR], [ACTION-IF-FOUND], # [ACTION-IF-NOT-FOUND]) # Check how to enable compilation warnings. If LANGUAGE is not provided, # then `C' is assumed (other options include `C++'). If CACHE-VAR is not # provided, then it defaults to the name # "cs_cv_prog_compiler_enable_warnings". If an option for enabling # warnings (such as `-Wall') is discovered, then it is assigned to # CACHE-VAR and ACTION-IF-FOUND is invoked; otherwise the empty string is # assigned to CACHE-VAR and ACTION-IF-NOT-FOUND is invoked. # # IMPLEMENTATION NOTES # # On some platforms, it is more appropriate to use -Wmost rather than # -Wall even if the compiler understands both, thus we attempt -Wmost # before -Wall. #------------------------------------------------------------------------------ AC_DEFUN([CS_COMPILER_WARNINGS], [CS_CHECK_BUILD_FLAGS( [how to enable m4_default([$1],[C]) compilation warnings], [m4_default([$2],[cs_cv_prog_compiler_enable_warnings])], [CS_CREATE_TUPLE([-Wmost]) CS_CREATE_TUPLE([-Wall])], [$1], [$3], [$4])]) #------------------------------------------------------------------------------ # CS_COMPILER_ERRORS([LANGUAGE], [CACHE-VAR], [ACTION-IF-FOUND], # [ACTION-IF-NOT-FOUND]) # Check how to promote compilation diganostics from warning to error # status. If LANGUAGE is not provided, then `C' is assumed (other options # include `C++'). If CACHE-VAR is not provided, then it defaults to the # name "cs_cv_prog_compiler_enable_errors". If an option for performing # this promotion (such as `-Werror') is discovered, then it is assigned # to CACHE-VAR and ACTION-IF-FOUND is invoked; otherwise the empty string # is assigned to CACHE-VAR and ACTION-IF-NOT-FOUND is invoked. #------------------------------------------------------------------------------ AC_DEFUN([CS_COMPILER_ERRORS], [CS_CHECK_BUILD_FLAGS( [how to treat m4_default([$1],[C]) warnings as errors], [m4_default([$2],[cs_cv_prog_compiler_enable_errors])], [CS_CREATE_TUPLE([-Werror])], [$1], [$3], [$4])]) #------------------------------------------------------------------------------ # CS_COMPILER_IGNORE_UNUSED([LANGUAGE], [CACHE-VAR], [ACTION-IF-FOUND], # [ACTION-IF-NOT-FOUND]) # Check how to instruct compiler to ignore unused variables and # arguments. This option may be useful for code generated by tools, such # as Swig, Bison, and Flex, over which the client has no control, yet # wishes to compile without excessive diagnostic spew. If LANGUAGE is # not provided, then `C' is assumed (other options include `C++'). If # CACHE-VAR is not provided, then it defaults to the name # "cs_cv_prog_compiler_ignore_unused". If an option (such as # `-Wno-unused') is discovered, then it is assigned to CACHE-VAR and # ACTION-IF-FOUND is invoked; otherwise the empty string is assigned to # CACHE-VAR and ACTION-IF-NOT-FOUND is invoked. #------------------------------------------------------------------------------ AC_DEFUN([CS_COMPILER_IGNORE_UNUSED], [CS_CHECK_BUILD_FLAGS( [how to suppress m4_default([$1],[C]) unused variable warnings], [m4_default([$2],[cs_cv_prog_compiler_ignore_unused])], [CS_CREATE_TUPLE([-Wno-unused])], [$1], [$3], [$4])]) #------------------------------------------------------------------------------ # CS_COMPILER_IGNORE_UNINITIALIZED([LANGUAGE], [CACHE-VAR], [ACTION-IF-FOUND], # [ACTION-IF-NOT-FOUND]) # Check how to instruct compiler to ignore uninitialized variables. This # option may be useful for code generated by tools, such as Swig, Bison, # and Flex, over which the client has no control, yet wishes to compile # without excessive diagnostic spew. If LANGUAGE is not provided, then # `C' is assumed (other options include `C++'). If CACHE-VAR is not # provided, then it defaults to the name # "cs_cv_prog_compiler_ignore_uninitialized". If an option (such as # `-Wno-uninitialized') is discovered, then it is assigned to CACHE-VAR # and ACTION-IF-FOUND is invoked; otherwise the empty string is assigned # to CACHE-VAR and ACTION-IF-NOT-FOUND is invoked. #------------------------------------------------------------------------------ AC_DEFUN([CS_COMPILER_IGNORE_UNINITIALIZED], [CS_CHECK_BUILD_FLAGS( [how to suppress m4_default([$1],[C]) uninitialized warnings], [m4_default([$2], [cs_cv_prog_compiler_ignore_uninitialized_variables])], [CS_CREATE_TUPLE([-Wno-uninitialized])], [$1], [$3], [$4])]) #------------------------------------------------------------------------------ # CS_COMPILER_IGNORE_PRAGMAS([LANGUAGE], [CACHE-VAR], [ACTION-IF-FOUND], # [ACTION-IF-NOT-FOUND]) # Check how to instruct compiler to ignore unrecognized #pragma # directives. This option may be useful for code which contains # unprotected #pragmas which are not understood by all compilers. If # LANGUAGE is not provided, then `C' is assumed (other options include # `C++'). If CACHE-VAR is not provided, then it defaults to the name # "cs_cv_prog_compiler_ignore_unknown_pragmas". If an option (such as # `-Wno-unknown-pragmas') is discovered, then it is assigned to CACHE-VAR # and ACTION-IF-FOUND is invoked; otherwise the empty string is assigned # to CACHE-VAR and ACTION-IF-NOT-FOUND is invoked. #------------------------------------------------------------------------------ AC_DEFUN([CS_COMPILER_IGNORE_PRAGMAS], [CS_CHECK_BUILD_FLAGS( [how to suppress m4_default([$1],[C]) unknown [#pragma] warnings], [m4_default([$2],[cs_cv_prog_compiler_ignore_unknown_pragmas])], [CS_CREATE_TUPLE([-Wno-unknown-pragmas])], [$1], [$3], [$4])]) #------------------------------------------------------------------------------ # CS_COMPILER_IGNORE_LONG_DOUBLE([LANGUAGE], [CACHE-VAR], [ACTION-IF-FOUND], # [ACTION-IF-NOT-FOUND]) # Check how to instruct compiler to suppress warnings about `long double' # usage. This option may be useful for code generated by tools, such as # Swig, Bison, and Flex, over which the client has no control, yet wishes # to compile without excessive diagnostic spew. If LANGUAGE is not # provided, then `C' is assumed (other options include `C++'). If # CACHE-VAR is not provided, then it defaults to the name # "cs_cv_prog_compiler_ignore_long_double". If an option (such as # `-Wno-long-double') is discovered, then it is assigned to CACHE-VAR and # ACTION-IF-FOUND is invoked; otherwise the empty string is assigned to # CACHE-VAR and ACTION-IF-NOT-FOUND is invoked. #------------------------------------------------------------------------------ AC_DEFUN([CS_COMPILER_IGNORE_LONG_DOUBLE], [CS_CHECK_BUILD_FLAGS( [how to suppress m4_default([$1],[C]) `long double' warnings], [m4_default([$2],[cs_cv_prog_compiler_ignore_long_double])], [CS_CREATE_TUPLE([-Wno-long-double])], [$1], [$3], [$4])]) --- NEW FILE: emit.m4 --- # emit.m4 -*- Autoconf -*- #============================================================================== # Copyright (C)2003-2005 by Eric Sunshine <sun...@su...> # # 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. # #============================================================================== AC_PREREQ([2.56]) #------------------------------------------------------------------------------ # CS_EMIT_BUILD_PROPERTY(KEY, VALUE, [APPEND], [EMPTY-OKAY], [EMITTER], # [UNCONDITIONAL]) # A utility function which invokes an emitter to record the KEY/VALUE # tuple if VALUE is not the empty string (after leading and trailing # whitespace is stripped). If EMPTY-OKAY is not an empty string, then the # property is emitted even if VALUE is empty; that is, it is emitted # unconditionally. If APPEND is the empty string, then the emitter sets # the key's value directly (though it may be overridden by the # environment), otherwise the emitter appends VALUE to the existing value # of the key. EMITTER is a macro name, such as CS_JAMCONFIG_PROPERTY or # CS_MAKEFILE_PROPERTY, which performs the actual task of emitting the # KEY/VALUE tuple; it should also accept APPEND as an optional third # argument. If EMITTER is omitted, CS_JAMCONFIG_PROPERTY is used. Some # emitters accept an optional fourth argument, UNCONDITIONAL, which # instructs it to set KEY's value unconditionally, even if KEY already # had been assigned a value via some other mechanism (such as imported # from the environment, or from Jambase, in the case of # CS_JAMCONFIG_PROPERTY). #------------------------------------------------------------------------------ AC_DEFUN([CS_EMIT_BUILD_PROPERTY], [cs_build_prop_val="$2" cs_build_prop_val=CS_TRIM([$cs_build_prop_val]) m4_ifval([$4], [CS_JAMCONFIG_PROPERTY([$1], [$cs_build_prop_val], [$3])], AS_IF([test -n "$cs_build_prop_val"], [m4_default([$5],[CS_JAMCONFIG_PROPERTY])( [$1], [$cs_build_prop_val], [$3], [$6])]))]) #------------------------------------------------------------------------------ # CS_EMIT_BUILD_RESULT(CACHE-VAR, PREFIX, [EMITTER]) # Record the results of CS_CHECK_BUILD() or CS_CHECK_LIB_WITH() via some # emitter. If CACHE-VAR indicates that the build succeeded, then the # following properties are emitted: # # PREFIX.AVAILABLE = yes # PREFIX.CFLAGS = $CACHE-VAR_cflags # PREFIX.LFLAGS = $CACHE-VAR_lflags $CACHE-VAR_libs # # EMITTER is a macro name, such as CS_JAMCONFIG_PROPERTY or # CS_MAKEFILE_PROPERTY, which performs the actual task of emitting the # KEY/VALUE tuple. If EMITTER is omitted, CS_JAMCONFIG_PROPERTY is used. #------------------------------------------------------------------------------ AC_DEFUN([CS_EMIT_BUILD_RESULT], [AS_IF([test "$$1" = yes], [CS_EMIT_BUILD_PROPERTY([$2.AVAILABLE], [yes], [], [], [$3]) CS_EMIT_BUILD_PROPERTY([$2.CFLAGS], [$$1_cflags], [], [], [$3]) CS_EMIT_BUILD_PROPERTY([$2.LFLAGS], [$$1_lflags $$1_libs], [], [], [$3])])]) #------------------------------------------------------------------------------ # CS_EMIT_BUILD_FLAGS(MESSAGE, CACHE-VAR, FLAGS, [LANGUAGE], EMITTER-KEY, # [APPEND], [ACTION-IF-RECOGNIZED], # [ACTION-IF-NOT-RECOGNIZED], [EMITTER]) # A convenience wrapper for CS_CHECK_BUILD_FLAGS() which also records the # results via CS_EMIT_BUILD_PROPERTY(). Checks if the compiler or linker # recognizes a command-line option. MESSAGE is the "checking" message. # CACHE-VAR is the shell cache variable which receives the flag # recognized by the compiler or linker, or "no" if the flag was not # recognized. FLAGS is a whitespace- delimited list of build tuples # created with CS_CREATE_TUPLE(). Each tuple from FLAGS is attempted in # order until one is found which is recognized by the compiler. After # that, no further flags are checked. LANGUAGE is typically either C or # C++ and specifies which compiler to use for the test. If LANGUAGE is # omitted, C is used. EMITTER-KEY is the name to pass as the emitter's # "key" argument if a usable flag is encountered. If APPEND is not the # empty string, then the discovered flag is appended to the existing # value of the EMITTER-KEY. If the command-line option was recognized, # then ACTION-IF-RECOGNIZED is invoked, otherwise # ACTION-IF-NOT-RECOGNIZED is invoked. EMITTER is a macro name, such as # CS_JAMCONFIG_PROPERTY or CS_MAKEFILE_PROPERTY, which performs the # actual task of emitting the KEY/VALUE tuple; it should also accept # APPEND as an optional third argument. If EMITTER is omitted, # CS_JAMCONFIG_PROPERTY is used. #------------------------------------------------------------------------------ AC_DEFUN([CS_EMIT_BUILD_FLAGS], [CS_CHECK_BUILD_FLAGS([$1], [$2], [$3], [$4], [CS_EMIT_BUILD_PROPERTY([$5], [$$2], [$6], [], [$9]) $7], [$8])]) #------------------------------------------------------------------------------ # CS_EMITTER_OPTIONAL([EMITTER]) # The CS_EMIT_FOO() macros optionally accept an emitter. If no emitter is # supplied to those macros, then a default emitter is chosen. Other # macros, however, which perform testing and optionally emit the results # may wish to interpret an omitted EMITTER as a request not to emit the # results. CS_EMITTER_OPTIONAL() is a convenience macro to help in these # cases. It should be passed to one of the CS_EMIT_FOO() macros in place # of the literal EMITTER argument. It functions by re-interpretating # EMITTER as follows: # # - If EMITTER is omitted, then CS_NULL_EMITTER is returned, effectively # disabling output by the CS_EMIT_FOO() macro. # - If EMITTER is the literal string "emit" or "yes", then it returns an # empty string, which signals to the CS_EMIT_FOO() macro that is should # use its default emitter. # - Any other value for EMITTER is passed along as-is to the # CS_EMIT_FOO() macro. #------------------------------------------------------------------------------ AC_DEFUN([CS_EMITTER_OPTIONAL], [m4_case([$1], [], [[CS_NULL_EMITTER]], [emit], [], [yes], [], [[$1]])]) #------------------------------------------------------------------------------ # CS_NULL_EMITTER(KEY, VALUE, [APPEND]) # A do-nothing emitter suitable for use as the EMITTER argument of one of # the CS_EMIT_FOO() macros. #------------------------------------------------------------------------------ AC_DEFUN([CS_NULL_EMITTER], [: ]) #------------------------------------------------------------------------------ # CS_SUBST_EMITTER(KEY, VALUE, [APPEND]) # An emitter wrapped around AC_SUBST(). Invokes # AC_SUBST(AS_TR_SH(KEY),VALUE). The APPEND argument is ignored. # Suitable for use as the EMITTER argument of one of the CS_EMIT_FOO() # macros. The call to AS_TR_SH() ensures that KEY is transformed into a # valid shell variable. For instance, if a macro attempts to emit # MYLIB.CFLAGS and MYLIB.LFLAGS via CS_SUBST_EMITTER(), then the names # will be transformed to MYLIB_CFLAGS and MYLIB_LFLAGS, respectively, for # the invocation of AC_SUBST(). #------------------------------------------------------------------------------ AC_DEFUN([CS_SUBST_EMITTER], [AC_SUBST(AS_TR_SH([$1]),[$2])]) #------------------------------------------------------------------------------ # CS_DEFINE_EMITTER(KEY, VALUE, [APPEND]) # An emitter wrapped around AC_DEFINE_UNQUOTED(). Invokes # AC_DEFINE_UNQUOTED(AS_TR_CPP(KEY),VALUE). The APPEND argument is # ignored. Suitable for use as the EMITTER argument of one of the # CS_EMIT_FOO() macros. The call to AS_TR_CPP() ensures that KEY is a # well-formed token for the C-preprocessor. #------------------------------------------------------------------------------ AC_DEFUN([CS_DEFINE_EMITTER], [AC_DEFINE_UNQUOTED(AS_TR_CPP([$1]),[$2], [Define when feature is available])]) --- NEW FILE: split.m4 --- # split.m4 -*- Autoconf -*- #============================================================================== # Copyright (C)2003 by Eric Sunshine <sun...@su...> # # 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. # #============================================================================== AC_PREREQ([2.56]) #------------------------------------------------------------------------------ # CS_SPLIT(LINE, [OUTPUT-VARIABLES], [DELIMITER], [FILLER]) # Split LINE into individual tokens. Tokens are delimited by DELIMITER, # which is the space character if omitted. OUTPUT-VARIABLES is a # comma-delimited list of shell variables which should receive the # extracted tokens. If there are too few tokens to fill the output # variables, then the excess variables will be assigned the empty string. # If there are too few output variables, then the excess tokens will be # ignored. If OUTPUT-VARIABLES is omitted, then the split tokens will be # assigned to the shell meta-variables $1, $2, $3, etc. When # OUTPUT-VARIABLES is omitted, FILLER is assigned to meta-variables in # cases where DELIMITER delimits a zero-length token. FILLER defaults # to "filler". For example, if DELIMITER is "+" and OUTPUT-VARIABLES is # omitted, given the line "one++three", $1 will be "one", $2 will be # "filler", and $3 will be "three". #------------------------------------------------------------------------------ AC_DEFUN([CS_SPLIT], [m4_define([cs_split_filler], m4_default([$4],[filler])) set cs_split_filler `echo "$1" | awk 'BEGIN { FS="m4_default([$3],[ ])" } { for (i=1; i <= NF; ++i) { if ($i == "") print "cs_split_filler"; else print $i } }'` shift m4_map([_CS_SPLIT], [$2])]) AC_DEFUN([_CS_SPLIT], [AS_IF([test $[@%:@] -eq 0], [$1=''], [AS_IF([test "$[1]" = cs_split_filler], [$1=''], [$1=$[1]]) shift])]) --- NEW FILE: checkprog.m4 --- # checkprog.m4 -*- Autoconf -*- #============================================================================== # Copyright (C)2004 by Eric Sunshine <sun...@su...> # # 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 0... [truncated message content] |
From: Vincent K. <vk...@us...> - 2005-07-14 18:29:47
|
Update of /cvsroot/crystaldoc/crystaldoc/base/mk/autoconf In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv9640/base/mk/autoconf Log Message: Directory /cvsroot/crystaldoc/crystaldoc/base/mk/autoconf added to the repository |
From: Vincent K. <vk...@us...> - 2005-07-14 18:29:23
|
Update of /cvsroot/crystaldoc/crystaldoc/base/mk/jam In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv9537/base/mk/jam Modified Files: docs.jam Log Message: New version of docs.jam Index: docs.jam =================================================================== RCS file: /cvsroot/crystaldoc/crystaldoc/base/mk/jam/docs.jam,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** docs.jam 25 Jun 2004 18:35:02 -0000 1.1 --- docs.jam 14 Jul 2005 18:29:13 -0000 1.2 *************** *** 1,5 **** #============================================================================ # Rules for creating Documentation ! # Copyright (C)2003 by Matze Braun <mat...@us...> # # This library is free software; you can redistribute it and/or modify it --- 1,5 ---- #============================================================================ # Rules for creating Documentation ! # Copyright (C)2005 by Eric Sunshine <sun...@su...> # # This library is free software; you can redistribute it and/or modify it *************** *** 19,27 **** #============================================================================ if $(PERL) { ! PATH.RUNTEXI2HTML = [ ConcatDirs $(TOP) base runtexi2html.sh ] ; ! CMD.RUNTEXI2HTML ?= "$(SHELL) $(PATH.RUNTEXI2HTML)" ; ! PATH.TEXI2HTML = [ ConcatDirs $(TOP) base texi2html ] ; CMD.TEXI2HTML ?= "$(PERL) $(PATH.TEXI2HTML)" ; } --- 19,39 ---- #============================================================================ + # Do-nothing implementations which avoid Jam error messages if client Jamfiles + # attempt to invoke documantation-generation rules despite lack of availability + # of appropriate tools. This simplifies client Jamfiles since the client does + # not need to check for the presence of the various tools. These rules will be + # re-defined later if the necessary tools are available. + rule Texi2Info { } + rule Texi2HTML { } + rule Texi2DVI { } + rule Texi2PS { } + rule Texi2PDF { } + rule Doxygen { } + rule RepairNodes { } + if $(PERL) { ! PATH.TEXI2HTML.HOME ?= [ ConcatDirs $(TOP) base ] ; ! PATH.TEXI2HTML ?= [ ConcatDirs $(PATH.TEXI2HTML.HOME) texi2html.pl ] ; CMD.TEXI2HTML ?= "$(PERL) $(PATH.TEXI2HTML)" ; } *************** *** 29,276 **** if $(CMD.MAKEINFO) { ! PATH.RUNMAKEINFO = [ ConcatDirs $(TOP) base runmakeinfo.sh ] ; ! CMD.RUNMAKEINFO ?= "$(SHELL) $(PATH.RUNMAKEINFO)" ; ! ! ## Texi2Info targetname : texifile : outputformat [ : subdir ] ! ## Creates info out of the texifile rule Texi2Info { ! local dir = [ FDirName $(LOCATE.DOCS) $(4) ] ; ! ! MkDir $(dir) ; ! CleanDir $(<)clean : $(dir) ; ! Depends cleandoc : $(<)clean ; ! Depends $(<) : $(dir) ; ! ! DIR on $(<) = $(dir) ; ! FORMAT on $(<) = $(3) ; ! ! Depends $(<) : $(>) ; ! RunMakeInfo $(<) : $(>) ; ! NotFile $(<) ; ! Always $(<) ; } } ! if $(CMD.TEXI2DVI) { ! PATH.RUNTEXI2DVI = [ ConcatDirs $(TOP) base runtexi2dvi.sh ] ; ! CMD.RUNTEXI2DVI ?= "$(SHELL) $(PATH.RUNTEXI2DVI)" ; ! ## Texi2DVI targetname : texifile [ : subdir ] ! ## Creates dvi out of the texifile rule Texi2DVI { ! local dir = [ FDirName $(LOCATE.DOCS) $(3) ] ; ! local target = $(>:R=$(dir):S=.dvi) ; ! ! Depends $(<) : $(target) ; ! ! MkDir $(dir) ; ! CleanDir $(<)clean : $(dir) ; ! Depends cleandoc : $(<)clean ; ! Depends $(target) : $(dir) ; ! ! FLAGS.TEXI2DVI on $(target) += -I\ $(CRYSTAL)/docs/texinfo ; ! #was $(SUBDIR) ! ! SEARCH on $(>) = $(SUBDIR) ; ! Depends $(target) : $(>) ; ! RunTexi2DVI $(target) : $(>) ; ! NotFile $(<) ; ! Always $(target) ; } if $(CMD.DVIPS) { ! ## Texi2PS targetname : texifile [ : subdir ] ! ## Creates PostScript out of the texifile rule Texi2PS { ! local dir = [ FDirName $(LOCATE.DOCS) $(3) ] ; ! local dvitarget = $(>:R=$(dir):S=.dvi) ; ! local target = $(>:R=$(dir):S=.ps) ; ! ! Depends $(<) : $(target) ; ! Depends $(target) : $(dvitarget) ; ! ! MkDir $(dir) ; ! CleanDir $(<)clean : $(dir) ; ! Depends cleandoc : $(<)clean ; ! Depends $(dvitarget) : $(dir) ; ! ! FLAGS.TEXI2DVI on $(target) += -I $(SUBDIR) ; ! DIR on $(target) = $(dir) ; ! SEARCH on $(>) = $(SUBDIR) ; ! Depends $(dvitarget) : $(>) ; ! RunTexi2DVI $(dvitarget) : $(>) ; ! RunDviPs $(target) : $(dvitarget) ; ! NotFile $(<) ; ! Always $(target) $(dvitarget) ; } - } if $(CMD.DVIPDF) { ! ## Texi2PDF targetname : texifile [ : subdir ] ! ## Creates PDF out of the texifile rule Texi2PDF { ! local dir = [ FDirName $(LOCATE.DOCS) $(3) ] ; ! local dvitarget = $(>:R=$(dir):S=.dvi) ; ! local target = $(>:R=$(dir):S=.pdf) ; ! ! Depends $(<) : $(target) ; ! Depends $(target) : $(dvitarget) ; ! ! MkDir $(dir) ; ! CleanDir cleandoc : $(dir) ; ! Depends $(dvitarget) : $(dir) ; ! FLAGS.TEXI2DVI on $(target) += -I $(SUBDIR) ; ! DIR on $(target) = $(dir) ; ! SEARCH on $(>) = $(SUBDIR) ; ! Depends $(dvitarget) : $(>) ; ! RunTexi2DVI $(dvitarget) : $(>) ; ! RunDviPdf $(target) : $(dvitarget) ; ! NotFile $(<) ; ! Always $(target) $(dvitarget) ; } } ! } # if $(CMD.TEXI2DVI) ! ! if $(CMD.TEXI2HTML) { ! ## Texi2HTML targetname : texifile [ : subdir ] ! ## Generate html documentation from texinfo files. Flags can be specified ! ## with the TEXIFLAGS variable. ! rule Texi2HTML { ! SEARCH on $(>) = $(SUBDIR) ; ! ! # Create Output directory ! local dir = [ FDirName $(LOCATE.DOCS) $(3) ] ; ! Depends $(<) : $(dir) ; ! MkDir $(dir) ; ! CleanDir $(<)clean : $(dir) ; ! Depends cleandoc : $(<)clean ; ! ! OUTDIR on $(<) = $(dir) ; ! NotFile $(<) ; ! Always $(<) ; ! Depends $(<) : $(>) ; ! RunTexi2HTML $(<) : $(>) ; } } ! if $(CMD.TEXI2PDF) ! { ! ## Texi2PDF targetname : texifile [ : subdir ] ! ## Creates pdf out of the texifile ! rule Texi2PDF { ! local dir = [ FDirName $(LOCATE.DOCS) $(3) ] ; ! local target = $(>:R=$(dir):S=.pdf) ; ! Depends $(<) : $(target) ; ! MkDir $(dir) ; ! CleanDir $(<)clean : $(dir) ; ! Depends cleandoc : $(<)clean ; ! Depends $(target) : $(dir) ; ! FLAGS.TEXI2PDF on $(target) += -I $(SUBDIR) ; ! SEARCH on $(>) = $(SUBDIR) ; ! Depends $(target) : $(>) ; ! RunTexi2PDF $(target) : $(>) ; ! } } if $(CMD.DOXYGEN) { ! ## Doxygen targetname : doxyprofile [ : subdir : additionalfiles ] ! ## Create a target named 'targetname' which invoked Doxygen to generate API ! ## documentation based upon 'doxyprofile', which is a Doxygen configuration ! ## file. 'subdir' is an optional subdirectory of $(LOCATE.DOCS) into which ! ## the generated files will be placed. 'additionalfiles' files are ! ## additional files to copy the the output directory. It is assumed that ! ## 'doxyprofile' and 'additional' reside in $(SUBDIR). rule Doxygen { ! local dir = [ FDirName $(LOCATE.DOCS) $(3) ] ; ! local i ; ! for i in $(4) { ! local src = $(i:G=$(<)src) ; ! local dst = $(i:G=$(<)dst) ; SEARCH on $(src) = $(SUBDIR) ; ! MakeLocate $(dst) : $(dir) ; ! Depends $(dst) : $(src) ; ! Depends $(<) : $(dst) ; Copy $(dst) : $(src) ; ! Clean $(<)clean : $(dst) ; } ! SEARCH on $(>) = $(SUBDIR) ; ! ! NotFile $(<) ; ! Always $(<) ; ! Depends $(<) : $(>) ; ! Depends $(<) : $(dir) ; ! MkDir $(dir:G=dir) ; ! CleanDir $(<)clean : $(dir) ; ! Depends cleandoc : $(<)clean ; ! RunDoxygen $(<) : $(>) ; } } #---------------------------------------------------------------------------- ! # private part ! ! actions RunTexi2HTML { ! $(CMD.RUNTEXI2HTML) "$(CMD.TEXI2HTML)" "$(CMD.MKDIRS)" "$(>)" "$(OUTDIR)" \ ! "$(FLAGS.TEXI2HTML)" } ! actions RunTexi2DVI { ! $(CMD.RUNTEXI2DVI) "$(CMD.TEXI2DVI)" "$(CMD.MKDIRS)" "$(<)" "$(>)" \ ! "$(FLAGS.TEXI2DVI)" } ! actions RunTexi2PDF { ! $(CMD.TEXI2PDF) $(FLAGS.TEXI2PDF) --batch --quiet -o $(<) $(>) } ! actions RunDviPs { ! cd $(DIR) && $(CMD.DVIPS) $(FLAGS.DVIPS) -q -o $(<:BS) $(>:BS) } ! actions RunDviPdf { ! cd $(DIR) && $(CMD.DVIPDF) $(FLAGS.DVI2PDF) $(>:BS) $(<:BS) } ! actions RunMakeInfo { ! $(CMD.RUNMAKEINFO) "$(CMD.MAKEINFO)" "$(CMD.MKDIRS)" "$(DIR)" "$(>)" \ ! "$(FORMAT)" "$(FLAGS.MAKEINFO)" } ! actions RunDoxygen { ! TOP=$(TOP) $(CMD.DOXYGEN) $(>) } ! actions CopyImages { ! find $(>) -name "$(WILDCARD)" -exec "cp" "{}" "$(<)" ';' } #---------------------------------------------------------------------------- --- 41,611 ---- if $(CMD.MAKEINFO) { ! ## Texi2Info targetname : texifiles : outputformat [ : subdir : [ outfile : ! ## [ options ]]] ! ## Invoke the makeinfo utility to convert Texinfo source (typically) to Info ! ## format when the pseudo target 'targetname' is invoked. 'texifiles' is a ! ## list of Texinfo files to be converted. The first element of 'texifiles' ! ## should be the top-level Texinfo document which includes the remaining ! ## files. It is okay for 'texifiles' to mention only a single Texinfo source ! ## if the entire document is contained in the one file. 'outputformat' is ! ## one of "info", "html", "xml", or "docbook". If not specified, it ! ## defaults to "info". The optional 'subdir' is a subdirectory of ! ## $(LOCATE.DOCS) into which the generated files should be placed. The ! ## optional 'outfile' is the name of the output file. Some output formats ! ## may generate multiple output files (such as "outfile.info", ! ## "outfile-1.info", "outfile-2.info", etc.). If 'outfile' is omitted, then ! ## the output filename is derived from the first element of 'texifiles' with ! ## the extension changed to reflect 'outputformat' (one of .info, .html, ! ## .xml, or .docbook). 'options' is a set of command-line flags passed ! ## directly to makeinfo. Returns the gristed output file name. rule Texi2Info { ! local target = $(1) ; ! local texifiles = $(2) ; ! local format = $(3) ; ! local subdir = $(4) ; ! local outfile = $(5) ; ! local options = $(6) ; ! ! if ! $(format) { format = info ; } ! ! local fmtoptions ; ! switch $(format) ! { ! case info : fmtoptions = ; ! case html : fmtoptions = --html ; ! case xml : fmtoptions = --xml ; ! case docbook : fmtoptions = --docbook ; ! } ! ! return [ _Texinfo $(target) : $(texifiles) : $(format) : $(outfile) : ! RunMakeInfo : $(fmtoptions) $(options) : $(subdir) ] ; } } ! if $(CMD.TEXI2HTML) { ! ## Texi2HTML targetname : texifiles [ : subdir : [ outfile : [ options ]]] ! ## Invoke the texi2html utility to convert Texinfo source to HTML format ! ## when the pseudo target 'targetname' is invoked. 'texifiles' is a list of ! ## Texinfo files to be converted. The first element of 'texifiles' should ! ## be the top-level Texinfo document which includes the remaining files. It ! ## is okay for 'texifiles' to mention only a single Texinfo source if the ! ## entire document is contained in the one file. The optional 'subdir' is a ! ## subdirectory of $(LOCATE.DOCS) into which the generated files should be ! ## placed. The optional 'outfile' is the name of the root output file ! ## (typically "index.html"). If the input files contain multiple Texinfo ! ## @nodes, then texi2html may generate multiple output files (depending upon ! ## local texi2html configuration) based upon the section numbering, and ! ## 'outfile' will reference the other generated files. If 'outfile' is ! ## omitted, then the output filename is derived from the first element of ! ## 'texifiles' with the extension changed to .html. 'options' is a set of ! ## command-line flags passed directly to texi2html. Returns the gristed ! ## output file name. ! rule Texi2HTML ! { ! local target = $(1) ; ! local texifiles = $(2) ; ! local subdir = $(3) ; ! local outfile = $(4) ; ! local options = $(5) ; ! return [ _Texinfo $(target) : $(texifiles) : html : $(outfile) : ! RunTexi2HTML : $(options) : $(subdir) ] ; ! } ! } ! if $(CMD.TEXI2DVI) ! { ! ## Texi2DVI targetname : texifiles [ : subdir [ : outfile [ : options ]]] ! ## Invoke the texi2dvi utility to convert Texinfo source to DVI format when ! ## the pseudo target 'targetname' is invoked. 'texifiles' is a list of ! ## Texinfo files to be converted. The first element of 'texifiles' should ! ## be the top-level Texinfo document which includes the remaining files. It ! ## is okay for 'texifiles' to mention only a single Texinfo source if the ! ## entire document is contained in the one file. The optional 'subdir' is a ! ## subdirectory of $(LOCATE.DOCS) into which the generated file should be ! ## placed. The optional 'outfile' is the name of the output file. If ! ## 'outfile' is omitted, then the output filename is derived from the first ! ## element of 'texifiles' with the extension changed to .dvi. 'options' is a ! ## set of command-line flags passed directly to texi2dvi. Returns the ! ## gristed output file name. rule Texi2DVI { ! return [ _Texi2DVI $(1) : $(2) : $(3) : $(4) : $(5) : dvi ] ; } if $(CMD.DVIPS) { ! ## Texi2PS targetname : texifile [ : subdir [ : outfile [ : psoptions ! ## [ : dvioptions ]]]] ! ## Invoke the texi2dvi and dvips utilities to convert Texinfo source to ! ## PostScript format when the pseudo target 'targetname' is invoked. ! ## 'texifiles' is a list of Texinfo files to be converted. The first ! ## element of 'texifiles' should be the top-level Texinfo document which ! ## includes the remaining files. It is okay for 'texifiles' to mention only ! ## a single Texinfo source if the entire document is contained in the one ! ## file. The optional 'subdir' is a subdirectory of $(LOCATE.DOCS) into ! ## which the generated file should be placed. The optional 'outfile' is the ! ## name of the output file. If 'outfile' is omitted, then the output ! ## filename is derived from the first element of 'texifiles' with the ! ## extension changed to .ps. 'psoptions' is a set of command-line flags ! ## passed directly to dvips. 'dvioptions' is a set of command-line flags ! ## passed directly to texi2dvi. Returns the gristed output file name. rule Texi2PS { ! local target = $(1) ; ! local texifiles = $(2) ; ! local subdir = $(3) ; ! local outfile = $(4) ; ! local psoptions = $(5) ; ! local dvioptions = $(6) ; ! return [ _Dvi $(target) : $(texifiles) : ps : $(outfile:S=.ps) : RunDVIPS : ! $(psoptions) : $(dvioptions) : $(subdir) ] ; } } if $(CMD.DVIPDF) { ! ## Texi2PDF targetname : texifiles [ : subdir [ : outfile [ : pdfoptions ! ## [ : dvioptions ]]]] ! ## Invoke the texi2dvi and dvipdf utilities to convert Texinfo source to PDF ! ## format when the pseudo target 'targetname' is invoked. 'texifiles' is a ! ## list of Texinfo files to be converted. The first element of 'texifiles' ! ## should be the top-level Texinfo document which includes the remaining ! ## files. It is okay for 'texifiles' to mention only a single Texinfo source ! ## if the entire document is contained in the one file. The optional ! ## 'subdir' is a subdirectory of $(LOCATE.DOCS) into which the generated ! ## file should be placed. The optional 'outfile' is the name of the output ! ## file. If 'outfile' is omitted, then the output filename is derived from ! ## the first element of 'texifiles' with the extension changed to .pdf. ! ## 'pdfoptions' is a set of command-line flags passed directly to ! ## dvipdf. 'dvioptions' is a set of command-line flags passed directly to ! ## texi2dvi. Returns the gristed output file name. rule Texi2PDF { ! local target = $(1) ; ! local texifiles = $(2) ; ! local subdir = $(3) ; ! local outfile = $(4) ; ! local pdfoptions = $(5) ; ! local dvioptions = $(6) ; ! local pdffile = [ _Dvi $(target) : $(texifiles) : pdf : $(outfile:S=.pdf) : ! RunDVIPDF : $(pdfoptions) : $(dvioptions) : $(subdir) ] ; ! CONVERTER on $(pdffile) = $(CMD.DVIPDF) ; ! return pdffile ; } } ! else if $(CMD.TEXI2PDF) { ! ## Texi2PDF targetname : texifiles [ : subdir [ : outfile [ : options ]]] ! ## Invoke the texi2pdf utility to convert Texinfo source to PDF format when ! ## the pseudo target 'targetname' is invoked. 'texifiles' is a list of ! ## Texinfo files to be converted. The first element of 'texifiles' should ! ## be the top-level Texinfo document which includes the remaining files. It ! ## is okay for 'texifiles' to mention only a single Texinfo source if the ! ## entire document is contained in the one file. The optional 'subdir' is a ! ## subdirectory of $(LOCATE.DOCS) into which the generated file should be ! ## placed. The optional 'outfile' is the name of the output file. If ! ## 'outfile' is omitted, then the output filename is derived from the first ! ## element of 'texifiles' with the extension changed to .pdf. 'options' is a ! ## set of command-line flags passed directly to texi2pdf. Returns the ! ## gristed output file name. ! rule Texi2PDF { ! local target = $(1) ; ! local texifiles = $(2) ; ! local subdir = $(3) ; ! local outfile = $(4) ; ! local options = $(5) ; ! local pdffile = [ _Texinfo $(target) : $(texifiles) : pdf : $(outfile) : ! RunTexi2DVI : -I $(SUBDIR) $(options) : $(subdir) ] ; ! CONVERTER on $(pdffile) = $(CMD.TEXI2PDF) ; ! OPTIONS on $(pdffile) += $(FLAGS.TEXI2PDF) ; ! return pdffile ; ! } } } ! if $(PERL) { ! PATH.NODEFIX ?= [ ConcatDirs $(TOP) base nodefix.pl ] ; ! CMD.NODEFIX ?= $(PERL) $(PATH.NODEFIX) ; ! ## RepairNodes targetname : texifile [ : srcdir ] ! ## When 'targetname' is invoked, perform in-place repair of @node and @menu ! ## directives in 'texifile' so that they correctly reflect the documentation ! ## hierarchy defined by @chapter, @section, @subsection, etc. directives. ! ## 'srcdir' is the directory containing 'texifile' as well as any files ! ## included via @include{} or @import{} directives. If 'srcdir' is omitted, ! ## then $(SUBDIR) is assumed. ! rule RepairNodes ! { ! local target = $(1) ; ! local texifile = $(2) ; ! local srcdir = $(3) ; ! if ! $(srcdir) { srcdir = $(SUBDIR) ; } ! SEARCH on $(texifile) = $(srcdir) ; ! TEXINFO.INCDIR on $(target) = $(srcdir) ; ! Depends $(target) : $(texifile) ; ! NotFile $(target) ; ! Always $(target) ; ! } ! actions RepairNodes ! { ! $(CMD.NODEFIX) --include-dir="$(TEXINFO.INCDIR)" "$(>)" ; ! } } if $(CMD.DOXYGEN) { ! ## Doxygen targetname : doxyprofile-and-resources [ : subdir [ : outfile ! ## [ : options ]]] ! ## Invoke the Doxygen utility to generate API documentation based upon ! ## 'doxyprofile' when the pseudo target 'targetname' is invoked. The first ! ## element of 'doxyprofile-and-resources' is the Doxygen configuration file ! ## which controls the API generation. The remaining optional elements are ! ## additional resources which should be copied verbatim to the output ! ## directory. Typical additional resources include CSS and related image ! ## files. It is assumed that the source files mentioned by ! ## 'doxyprofile-and-resources' reside in $(SUBDIR). The optional 'subdir' ! ## is a subdirectory of $(LOCATE.DOCS) into which the generated files should ! ## be placed. The optional 'outfile' is the name of the root output file ! ## (typically "index.html"). This file will reference any other files ! ## generated by Doxygen. If 'outfile' is omitted, then the output filename ! ## defaults to "index.html". 'options' is a set of command-line flags ! ## passed directly to Doxygen. Returns the gristed output file name. rule Doxygen { ! local target = $(1) ; ! local infiles = $(2) ; ! local subdir = $(3) ; ! local outfile = $(4) ; ! local optioins = $(5) ; ! local doxyfile = $(infiles[1]) ; ! local resources = $(infiles[2-]) ; ! local outdir = [ FDirName $(LOCATE.DOCS) $(subdir) ] ; ! local grist = "$(SOURCE_GRIST)!$(target)" ; ! if ! $(outfile) { ! outfile = index.html ; ! } ! outfile = $(outfile:G=$(grist)) ; ! ! local r ; ! for r in $(resources) ! { ! local src = $(r:G=$(grist)!src) ; ! local dst = $(r:G=$(grist)!dst) ; SEARCH on $(src) = $(SUBDIR) ; ! MakeLocate $(dst) : $(outdir) ; Copy $(dst) : $(src) ; ! Depends $(dst) : $(src) ; ! Depends $(outfile) : $(dst) ; ! Clean $(target)clean : $(dst) ; } ! SEARCH on $(doxyfile) = $(SUBDIR) ; ! OPTIONS on $(outfile) = $(options) ; ! MakeLocate $(outfile) : $(outdir) ; ! Depends $(outfile) : $(doxyfile) ; ! Depends $(target) : $(outfile) ; ! RunDoxygen $(target) : $(doxyfile) ; ! NotFile $(target) ; ! Always $(target) ; ! Clean $(target)clean : $(outfile) ; ! if $(subdir) ! { ! CleanDir $(target)clean : $(outdir) ; ! } ! Depends cleandoc : $(target)clean ; ! return outfile ; } } #---------------------------------------------------------------------------- ! # Private helper rules and actions. ! ! ## _Texinfo targetname : texifiles : format : [ outfile ] : converter ! ## [ : options [ : subdir ]] ! ## The workhorse of the various Texinfo conversion rules. This rule sets up ! ## a pseudo-target 'targetname' which takes care of copying image files to ! ## the output directory if needed by the output format, gristing intput and ! ## output files, invoking the specified low-level conversion rule, and ! ## cleaning up temporary files upon completion. 'texifiles' is a list of ! ## Texinfo files to be converted. The first element of 'texifiles' should ! ## be the top-level Texinfo document which @includes the remaining files. It ! ## is okay for 'texifiles' to mention only a single Texinfo source if the ! ## entire document is contained in the one file. 'format' is one of "info", ! ## "html", "xml", "docbook", "dvi", "ps", or "pdf", and is used in the ! ## formulation of the grist, and as the extension of 'outfile' if omitted. ! ## The format also determines which type of image files (if any) should be ! ## copied to the output directory, and whether the copied images should be ! ## cleaned up upon completion. 'outfile' is the name of the root output ! ## file. If 'outfile' is omitted, then the output filename is derived from ! ## the first element of 'texifiles' with the extension changed to reflect ! ## 'format'. 'converter' is the Jam rule which will perform the actual ! ## conversion. It is passed 'outfile' as $(<), and the first element of ! ## 'texifiles' as $(>). The optional 'subdir' is a subdirectory of ! ## $(LOCATE.DOCS) into which the generated files should be placed. ! ## 'options' is a set of command-line flags to be passed directly to the ! ## underlying conversion tool. Returns the gristed output file name. The ! ## following variables may be accessed from within the 'converter' action: ! ## $(SRCDIR) - Value of $(SUBDIR) when this rule was invoked. ! ## $(OUTDIR) - Directory into which output files should be emitted. ! ## $(OUTLOG) - Name of a log file within $(OUTDIR) into which 'converter' ! ## may direct diagnostic output of conversion tool if needed. ! ## $(FORMAT) - Value of 'format'. ! ## $(OPTIONS) - Value of 'options'. ! rule _Texinfo { ! local target = $(1) ; ! local texifiles = $(2) ; ! local format = $(3) ; ! local outfile = $(4) ; ! local converter = $(5) ; ! local options = $(6) ; ! local subdir = $(7) ; ! local outdir = [ FDirName $(LOCATE.DOCS) $(subdir) ] ; ! local grist = "$(SOURCE_GRIST)!$(target)!$(format)" ; ! local outlog ; ! ! local texifile = $(texifiles[1]:G=$(grist)) ; ! local texideps = $(texifiles[2-]) ; ! ! if ! $(outfile) ! { ! outfile = $(texifile:BS=.$(format)) ; ! } ! outfile = $(outfile:G=$(grist)) ; ! outlog = $(outfile:G=:R=$(outdir):S=$(outfile:S)log) ; ! ! local inftypes = .txt ; ! local xmltypes = .jpg .png .gif ; ! local dvitypes = .eps .pdf ; ! local pstypes = .eps ; ! local pdftypes = .eps .pdf ; ! local imagetypes copyimages ; ! switch $(format) ! { ! case info : imagetypes = $(inftypes) ; copyimages = no ; ! case html : imagetypes = $(xmltypes) ; copyimages = yes ; ! case xml : imagetypes = $(xmltypes) ; copyimages = yes ; ! case docbook : imagetypes = $(xmltypes) ; copyimages = yes ; ! case dvi : imagetypes = $(dvitypes) ; copyimages = yes ; ! case ps : imagetypes = $(pstypes) ; copyimages = no ; ! case pdf : imagetypes = $(pdftypes) ; copyimages = no ; ! case * : Error "Texinfo: unrecognized output format" $(format) ; ! } ! ! local images ; ! if $(imagetypes) { images = [ Recurse : $(imagetypes) ] ; } ! ! local image ; ! for image in $(images) ! { ! local imagegrist = "$(grist)!$(image:D)" ; ! local src = $(image:BSG=$(imagegrist)) ; ! local srcdir = [ ConcatDirs $(SUBDIR) $(image:D) ] ; ! SEARCH on $(src) = $(srcdir) ; ! if $(copyimages) = no ! { ! Includes $(texifile) : $(src) ; ! } ! else ! { ! local dst = $(image:BSG=$(imagegrist)built) ; ! local dstdir = [ ConcatDirs $(outdir) $(image:D) ] ; ! MakeLocate $(dst) : $(dstdir) ; ! Copy $(dst) : $(src) ; ! Depends $(dst) : $(src) ; ! Depends $(outfile) : $(dst) ; ! Clean $(target)clean : $(dst) ; ! } ! } ! ! SRCDIR on $(outfile) = $(SUBDIR) ; ! OUTDIR on $(outfile) = $(outdir) ; ! OUTLOG on $(outfile) = $(outlog) ; ! FORMAT on $(outfile) = $(format) ; ! OPTIONS on $(outfile) = $(options) ; ! ! SEARCH on $(texifile) = $(SUBDIR) ; ! SEARCH on $(texideps) = $(SUBDIR) ; ! Includes $(texifile) : $(texideps) ; ! MakeLocate $(outfile) : $(outdir) ; ! Depends $(outfile) : $(texifile) ; ! Depends $(target) : $(outfile) ; ! $(converter) $(outfile) : $(texifile) ; ! NotFile $(target) ; ! Clean $(target)clean : $(outfile) ; ! if $(subdir) ! { ! CleanDir $(target)clean : $(outdir) ; ! } ! Depends cleandoc : $(target)clean ; ! ! return $(outfile) ; } ! ## _Texi2DVI targetname : texifiles [ : subdir [ : outfile [ : options ! ## [ : format ]]]] ! ## A thin wrapper around the _Texinfo rule which invokes TeX-wrapping tools ! ## such as texi2dvi and texi2pdf. The action for this rule captures the ! ## output of TeX into a log file and tells the user to consult the log file ! ## if TeX fails. It also monitors the log file for TeX `hbox' warnings, and ! ## informs the user to consult the log if any are discovered. The log file ! ## is removed silently if no problems are detected. Returns the gristed ! ## output DVI file name. In addition to the variables exported by the ! ## _Texinfo rule, the following variables may be accessed from within the ! ## action: ! ## $(CONVERTER) - The actual command-line tool wrapping TeX. ! rule _Texi2DVI { ! local target = $(1) ; ! local texifiles = $(2) ; ! local subdir = $(3) ; ! local outfile = $(4) ; ! local options = $(5) ; ! local format = $(6) ; ! local dvifile = [ _Texinfo $(target) : $(texifiles) : $(format) : ! $(outfile) : RunTexi2DVI : -I $(SUBDIR) $(options) : $(subdir) ] ; ! CONVERTER on $(dvifile) = $(CMD.TEXI2DVI) ; ! OPTIONS on $(dvifile) += $(FLAGS.TEXI2DVI) ; ! return $(dvifile) ; } ! ## _Dvi targetname : texifiles : format : outfile : converter [ : options ! ## [ : dvioptions [ : subdir ]]] ! ## A wrapper around the _Texi2DVI rule which also runs a secondary ! ## conversion rule/action on the generated DVI file. Examples of secondary ! ## conversions include dvips, dvipdf, etc. The arguments 'targetname', ! ## 'format', 'outfile', and 'subdir' have the same meaning as for the ! ## _Texinfo and _Texi2DVI rules. 'converter' is the rule/action which ! ## converts the generated DVI file to the final output format. 'options' is ! ## a set of command-line flags to be passed directly to the underlying ! ## secondary conversion tool. 'dvioptions' are the command-line options ! ## passed to _Texi2DVI. As with the _Texi2DVI rule, this rule captures the ! ## output of the secondary conversion tool to a log file and instructs the ! ## user to consult it when a problem is detected. Returns the gristed ! ## output file name. ! rule _Dvi { ! local target = $(1) ; ! local texifiles = $(2) ; ! local format = $(3) ; ! local outfile = $(4) ; ! local converter = $(5) ; ! local options = $(6) ; ! local dvioptions = $(7) ; ! local subdir = $(8) ; ! ! local dvifile = [ _Texi2DVI _$(target)_dvi : $(texifiles) : $(subdir) : ! $(outfile:S=.dvi) : $(dvioptions) : $(format) ] ; ! ! if ! $(outfile) ! { ! outfile = $(dvifile:BS=.$(format)) ; ! } ! local outdir = [ FDirName $(LOCATE.DOCS) $(subdir) ] ; ! local outlog = $(outfile:G=:R=$(outdir):S=$(outfile:S)log) ; ! ! SRCDIR on $(outfile) = $(SUBDIR) ; ! OUTLOG on $(outfile) = $(outlog) ; ! FORMAT on $(outfile) = $(format) ; ! OPTIONS on $(outfile) = $(psoptions) ; ! ! MakeLocate $(outfile) : $(outdir) ; ! Depends $(outfile) : $(dvifile) ; ! Depends $(target) : $(outfile) ; ! $(converter) $(outfile) : $(dvifile) ; ! RmTemps $(outfile) : $(dvifile) ; ! Clean $(target)clean : $(outfile) $(dvifile) ; ! NotFile $(target) ; ! NotFile $(target)clean ; ! if $(subdir) ! { ! CleanDir $(target)clean : $(outdir) ; ! } ! ! return $(outfile) ; } ! # Unfortunately, `makeinfo' 4.3, which ships with MSYS, does not respect the ! # search path (-I) for @image{} directives, so we need to `cd' into the source ! # directory to work around this shortcoming. With modern versions of ! # `makeinfo', we could instead just use `-I$(SRCDIR)' instead of the pwd/cd ! # goop. ! actions RunMakeInfo { ! dir=`pwd` ; \ ! cd $(>:D) ; \ ! $(CMD.MAKEINFO) $(OPTIONS) $(FLAGS.MAKEINFO) --output="${dir}/$(<)" $(>:B) } ! actions RunTexi2HTML { ! T2H_HOME="$(PATH.TEXI2HTML.HOME)" \ ! $(CMD.TEXI2HTML) $(OPTIONS) $(FLAGS.TEXI2HTML) -subdir="$(OUTDIR)" \ ! -top-file="$(<:BS)" "$(>)" } ! actions RunTexi2DVI { ! $(CONVERTER) $(OPTIONS) --batch --output=$(<) $(>) > $(OUTLOG) 2>&1 ! if test $? -ne 0; then ! echo "*** ERROR: $(CONVERTER) reported one or more errors." ! echo "*** ERROR: See $(OUTLOG) for details." ! false ! fi ! if test $? -eq 0; then ! grep hbox $(OUTLOG) >/dev/null 2>&1 ! if test $? -eq 0; then ! echo "*** WARNING: $(CONVERTER) reported 'hbox' warnings." && \ ! echo "*** WARNING: See $(OUTLOG) for details." ! else ! $(RM) $(OUTLOG) ! fi ! true ! else ! false ! fi } ! actions RunDVIPS { ! TEXPICTS="$(SRCDIR)" \ ! $(CMD.DVIPS) $(OPTIONS) -o $(<) $(>) > $(OUTLOG) 2>&1 ! if test $? -ne 0; then ! echo "*** ERROR: $(CMD.DVIPS) reported one or more errors." ! echo "*** ERROR: See $(OUTLOG) for details." ! false ! else ! $(RM) $(OUTLOG) ! true ! fi } ! actions RunDVIPDF { ! TEXPICTS="$(SRCDIR)" \ ! $(CMD.DVIPDF) $(OPTIONS) $(>) $(<) > $(OUTLOG) 2>&1 ! if test $? -ne 0; then ! echo "*** ERROR: $(CMD.DVIPDF) reported one or more errors." ! echo "*** ERROR: See $(OUTLOG) for details." ! false ! else ! $(RM) $(OUTLOG) ! true ! fi } + actions RunDoxygen + { + TOP=$(TOP) $(CMD.DOXYGEN) $(OPTIONS) $(FLAGS.DOXYGEN) $(>) + } #---------------------------------------------------------------------------- |
From: Vincent K. <vk...@us...> - 2005-07-14 18:28:22
|
Update of /cvsroot/crystaldoc/crystaldoc/base In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv9343/base Removed Files: runtexi2html.sh runtexi2dvi.sh texi2html Log Message: Removal of unneeded file and old texi2html --- texi2html DELETED --- --- runtexi2dvi.sh DELETED --- --- runtexi2html.sh DELETED --- |
From: Vincent K. <vk...@us...> - 2005-07-14 18:28:22
|
Update of /cvsroot/crystaldoc/crystaldoc In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv9343 Removed Files: Jamfile Jamconfig Log Message: Removal of unneeded file and old texi2html --- Jamconfig DELETED --- --- Jamfile DELETED --- |
From: Vincent K. <vk...@us...> - 2005-07-09 12:00:20
|
Update of /cvsroot/crystaldoc/crystaldoc/de/texinfo/tutorial In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv32584/de/texinfo/tutorial Modified Files: intro.txi Log Message: - Fixed a typo and a @code{} command in Deutsch intro.txi which prevented building dvi output. Index: intro.txi =================================================================== RCS file: /cvsroot/crystaldoc/crystaldoc/de/texinfo/tutorial/intro.txi,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** intro.txi 31 Mar 2005 14:12:43 -0000 1.1 --- intro.txi 9 Jul 2005 12:00:06 -0000 1.2 *************** *** 1,5 **** @c -*-texinfo-*- @node Tutorial Introduction, Tutorial Simple, Tutorials, Tutorials ! @section Entwicklung einer Crystalcpace-Anwendung @cindex Object Registry @cindex Plugin Manager --- 1,5 ---- @c -*-texinfo-*- @node Tutorial Introduction, Tutorial Simple, Tutorials, Tutorials ! @section Entwicklung einer Crystal Space-Anwendung @cindex Object Registry @cindex Plugin Manager *************** *** 63,67 **** es nicht mehr brauchen, dann l@"oschen Sie es bitte nicht mit @samp{delete}, sonderen rufen Sie @code{DecRef()} auf. Wenn Sie einer Schnittstelle einen ! Zeiger zuweisen, dann rufen Sie von dort aus @code(IncRef()} auf, sowie @code{DecRef()}, wenn Sie die Schnittstelle dort nicht weiter ben@"otigen. --- 63,67 ---- es nicht mehr brauchen, dann l@"oschen Sie es bitte nicht mit @samp{delete}, sonderen rufen Sie @code{DecRef()} auf. Wenn Sie einer Schnittstelle einen ! Zeiger zuweisen, dann rufen Sie von dort aus @code{IncRef()} auf, sowie @code{DecRef()}, wenn Sie die Schnittstelle dort nicht weiter ben@"otigen. |