Skip to content

Commit

Permalink
Let gen-genconfig.scm generate bilingual manual entry
Browse files Browse the repository at this point in the history
  • Loading branch information
shirok committed Oct 15, 2024
1 parent 0e0095d commit 87099c5
Showing 1 changed file with 69 additions and 32 deletions.
101 changes: 69 additions & 32 deletions src/gen-genconfig.scm
Original file line number Diff line number Diff line change
Expand Up @@ -50,91 +50,119 @@
((("-I" "-I$gauche_incdir"))
"Include path options required to compile programs using Gauche\n\
(Note: This doesn't work if Gauche installation directory\n\
path contains whitespaces. See --incdirs below.)")
path contains whitespaces. See --incdirs below.)"
#f)
((("-L" "-L$gauche_archdir $local_lib"))
"Library path options required to link programs using Gauche\n\
(Note: This doesn't work if Gauche installation directory\n\
path contains whitespaces. See --archdirs below.)")
path contains whitespaces. See --archdirs below.)"
#f)
((("-l" "-l$garchabi $gauche_libs"))
"Link library options required to link programs using Gauche.")
"Link library options required to link programs using Gauche."
#f)
((("--cc" "$cc"))
"The name of the compiler used to compile this Gacuhe.")
"The name of the compiler used to compile this Gacuhe."
#f)
((("--cpp" "$cpp"))
"The command to run the C preprocessor.")
"The command to run the C preprocessor."
#f)
((("--ac" "$gauche_aclocaldir"))
"The directory that contains Gauche-specific autoconf macros.")
"The directory that contains Gauche-specific autoconf macros."
#f)
((("--reconfigure" "./configure $gauche_configure_args"))
"The command line used to configure the current installation.")
"The command line used to configure the current installation."
#f)
((("--arch" "$arch"))
"The autoconf-style architecture signature (cpu-vendor-kernel-os).")
"The autoconf-style architecture signature (cpu-vendor-kernel-os)."
#f)
((("--incdirs" "$incdirs")
("--archdirs" "$archdirs"))
"The list of directory names to be looked for include files and\n\
libraries, respectively. Each directory name may be quoted if\n\
it contains whitespaces, and separated by ':' on Unix platforms, or\n\
by ';' on Windows platforms.")
by ';' on Windows platforms."
#f)
((("--local-incdir" "$local_inc")
("--local-libdir" "$local_lib"))
"These are '-I' and '-L' flags for additional local headers/libraries\n\
to search, given by '--with-local' configure flags. Note that those\n\
are also included in '-I', '-L', '--incdirs', and '--archdirs'.")
are also included in '-I', '-L', '--incdirs', and '--archdirs'."
#f)

(section
"Parameters to install files"
"ファイルをインストールするためのパラメータ")
((("--prefix" "$prefix"))
"The directory prefix set by configure.")
"The directory prefix set by configure."
#f)
((("--sysincdir" "$gauche_incdir")
("--siteincdir" "$gauche_siteincdir")
("--pkgincdir" "$gauche_pkgincdir"))
"Directories where system|site|package header files of extensions go.")
"Directories where system|site|package header files of extensions go."
#f)
((("--syslibdir" "$gauche_libdir")
("--sitelibdir" "$gauche_sitelibdir")
("--pkglibdir" "$gauche_pkglibdir"))
"Directories where system|site|package scheme files go.")
"Directories where system|site|package scheme files go."
#f)
((("--sysarchdir" "$gauche_archdir")
("--sitearchdir" "$gauche_sitearchdir")
("--pkgarchdir" "$gauche_pkgarchdir"))
"Directories where system|site|package DSO files go.")
"Directories where system|site|package DSO files go."
#f)
((("--mandir" "$mandir")
("--infodir" "$infodir"))
"Directories where gauche manpage and info docs are installed.")
"Directories where gauche manpage and info docs are installed."
#f)

(section
"Parameters to help building extensions"
"拡張モジュールをビルドするためのパラメータ")
((("--object-suffix" "$object_suffix"))
"The extension of the compiled objects (e.g. 'o' or 'obj).")
"The extension of the compiled objects (e.g. 'o' or 'obj)."
#f)
((("--executable-suffix" "$executable_suffix"))
"The extension of the executable including a period (empty on Unix systems,\n\
'.exe' on Windows.")
'.exe' on Windows."
#f)
((("--so-suffix" "$shlib_so_suffix"))
"The extension for dynamically loadable (dlopen-able) modules (e.g. 'so').")
"The extension for dynamically loadable (dlopen-able) modules (e.g. 'so')."
#f)
((("--so-cflags" "$shlib_so_cflags"))
"Additional CFLAGS to create dynamically loadable modules.")
"Additional CFLAGS to create dynamically loadable modules."
#f)
((("--so-ldflags" "$shlib_so_ldflags"))
"Additional LDFLAGS to create dynamically loadable modules.")
"Additional LDFLAGS to create dynamically loadable modules."
#f)
((("--so-libs" "$shlib_so_libs"))
"Additional libraries required to create dynamically loadable modules.")
"Additional libraries required to create dynamically loadable modules."
#f)
((("--dylib-suffix" "$shlib_dylib_suffix"))
"The extension for dynamically linked libraries (as opposed to dlopen()ed)\n\
Usually the same as --so-suffix, but OSX wants 'dylib'.")
Usually the same as --so-suffix, but OSX wants 'dylib'."
#f)
((("--dylib-ldflags" "$shlib_dylib_ldflags"))
"LDFLAGS to create dynamically linked libraries.")
"LDFLAGS to create dynamically linked libraries."
#f)
((("--rpath-flag" "$rpath_flag"))
"Compiler flag(s) to embed RPATH")
"Compiler flag(s) to embed RPATH"
#f)
((("--default-cflags" "$default_cflags"))
"This is the CFLAGS used to compile Gauche, and to be used to compile\n\
extensions as well.")
extensions as well."
#f)
((("--cppflags" "$cppflags"))
"Compiler flag(s) passed to C preprocessor")
"Compiler flag(s) passed to C preprocessor"
#f)
((("--static-libs" "$static_libs"))
"List of library link flags ('-llib') required to link Gauche statically.\n\
Similar to '-l', but this includes the libraries that are used\n\
for extension modules, and also the static library itself,\n\
that is -lgauche-static-X.X.")
that is -lgauche-static-X.X."
#f)
((("--libgauche-so" "$libgauche_so"))
"The base name of dynamically linked libgauche.")
"The base name of dynamically linked libgauche."
#f)

)) ; end of *config-parameters*

Expand Down Expand Up @@ -193,16 +221,25 @@
(print "@c Generated by gen-genconfig.scm. DO NOT EDIT.")
(fold (^[e state]
(match e
[('section section-e . _)
[('section section-en section-ja)
(unless (eq? state 'beginning)
(print "@end table") (print))
(format #t "~a:\n\n@table @option\n" section-e)
(print "@c EN")
(print section-en ":")
(print "@c JP")
(print section-ja ":")
(print "@c COMMON")
(print "@table @option")
'cont]
[(((opt src) ...) help . _)
[(((opt src) ...) help-en help-ja)
(format #t "@item ~a\n" (car opt))
(dolist [o (cdr opt)]
(format #t "@itemx ~a\n" o))
(print (regexp-replace #/@/ help "@@"))
(print "@c EN")
(print (regexp-replace #/@/ help-en "@@"))
(print "@c JP")
(print (regexp-replace #/@/ (or help-ja help-en) "@@"))
(print "@c COMMON")
'cont]))
'beginning *config-parameters*)
(print "@end table"))
Expand Down

0 comments on commit 87099c5

Please sign in to comment.