3 # Copyright (C) 2002, 2003 Free Software Foundation, Inc.
5 # This program is free software; you can redistribute it and/or modify
6 # it under the terms of the GNU General Public License as published by
7 # the Free Software Foundation; either version 2, or (at your option)
10 # This program is distributed in the hope that it will be useful,
11 # but WITHOUT ANY WARRANTY; without even the implied warranty of
12 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 # GNU General Public License for more details.
15 # You should have received a copy of the GNU General Public License
16 # along with this program; if not, write to the Free Software
17 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
20 # Usage: MODULES.html.sh > MODULES.html
24 sed_escape_dot='s,\.,\\.,g'
25 sed_escape_slash='s,/,\\/,g'
29 missed_modules=`gnulib-tool --list`
30 missed_files=`ls -d lib/* m4/* | sed -e /CVS/d -e /README/d -e /ChangeLog/d -e /Makefile/d -e /TODO/d`
33 # outputs line with indentation.
40 # increases the indentation.
47 # decreases the indentation.
50 indent=`echo "$indent" | sed -e 's/ $//'`
53 # func_begin tag [attribute...]
69 # func_wrap tag [attribute...]
70 # encloses $element in a HTML tag, without line breaks.
73 element="<$*>${element}</$1>"
81 func_echo "<TH ALIGN=LEFT>lib/"
82 func_echo "<TH ALIGN=LEFT>lib/"
83 func_echo "<TH ALIGN=LEFT>m4/"
84 func_echo "<TH ALIGN=LEFT> "
87 func_echo "<TH ALIGN=LEFT>Header"
88 func_echo "<TH ALIGN=LEFT>Implementation"
89 func_echo "<TH ALIGN=LEFT>Autoconf macro"
90 func_echo "<TH ALIGN=LEFT>Depends on"
99 sed_remove_trailing_empty_line='${
103 element=`gnulib-tool --extract-include-directive $1 | sed -e "$sed_lt" -e "$sed_gt" -e "$sed_remove_trailing_empty_line" | sed -e 's/$/<BR>/' | tr -d "$trnl" | sed -e 's/<BR>$//'`
104 test -n "$element" || element='---'
105 func_echo "<TD ALIGN=LEFT VALIGN=TOP>$element"
107 sed_choose_unconditional_nonstandard_include='s,^#include "\(.*\)"$,\1,p'
108 includefile=`gnulib-tool --extract-include-directive $1 | sed -n -e "$sed_choose_unconditional_nonstandard_include" | sed -e "$sed_escape_dot" | tr -d "$trnl"`
109 sed_choose_lib_files='s,^lib/\(.*\)$,\1,p'
110 element=`gnulib-tool --extract-filelist $1 | sed -e '/^$/d' | sed -n -e "$sed_choose_lib_files" | sed -e '/^'"${includefile}"'$/d' | sed -e 's/$/<BR>/' | tr -d "$trnl" | sed -e 's/<BR>$//'`
111 test -n "$element" || element='---'
112 func_echo "<TD ALIGN=LEFT VALIGN=TOP>$element"
114 sed_choose_m4_files='s,^m4/\(.*\)$,\1,p'
115 element=`(gnulib-tool --extract-filelist $1 | sed -e "$sed_remove_trailing_empty_line" | sed -n -e "$sed_choose_m4_files" | sed -e '/^onceonly/d'; gnulib-tool --extract-autoconf-snippet $1 | sed -e "$sed_remove_trailing_empty_line") | sed -e 's/$/<BR>/' | tr -d "$trnl" | sed -e 's/<BR>$//'`
116 test -n "$element" || element='---'
117 func_echo "<TD ALIGN=LEFT VALIGN=TOP>$element"
119 element=`gnulib-tool --extract-dependencies $1 | sed -e "$sed_remove_trailing_empty_line" | sed -e 's/$/<BR>/' | tr -d "$trnl" | sed -e 's/<BR>$//'`
120 test -n "$element" || element='---'
121 func_echo "<TD ALIGN=LEFT VALIGN=TOP>$element"
125 missed_modules=`echo "$missed_modules" | sed -e '/^'"$1"'$/d'`
127 files=`gnulib-tool --extract-filelist $1`
128 sed_removal_prefix='s,^,/^,'
129 sed_removal_suffix='s,$,\$/d,'
130 sed_remove_files=`echo '{'; for file in $files; do echo $file | sed -e "$sed_escape_dot" -e "$sed_escape_slash" | sed -e "$sed_removal_prefix" -e "$sed_removal_suffix"; done; echo '}'`
131 missed_files=`echo "$missed_files" | sed -e "$sed_remove_files"`
141 echo '<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">'
146 element="Gnulib Module List"
150 modules=`gnulib-tool --list`
151 modules=`for m in $modules; do printf "%s, " $m; done | sed -e 's/, $//'`
152 func_echo '<META NAME="keywords" CONTENT="'"${modules}"'">'
160 element="Gnulib Module List"
164 func_echo 'This is a list of the modules which make up gnulib, with dependencies.'
166 element="Support for systems lacking ANSI C 89"
189 func_echo 'These modules are not listed among dependencies below, for simplicity.'
191 element="Enhancements for ANSI C 89 functions"
195 element="Memory management functions <stdlib.h>"
196 element=`printf "%s" "$element" | sed -e "$sed_lt" -e "$sed_gt"`
205 element="Date and time <time.h>"
206 element=`printf "%s" "$element" | sed -e "$sed_lt" -e "$sed_gt"`
214 element="Extra functions based on ANSI C 89"
218 element="Memory management functions <stdlib.h>"
219 element=`printf "%s" "$element" | sed -e "$sed_lt" -e "$sed_gt"`
226 func_module bumpalloc
229 element="Integer arithmetic functions <stdlib.h>"
230 element=`printf "%s" "$element" | sed -e "$sed_lt" -e "$sed_gt"`
238 element="Environment variables <stdlib.h>"
239 element=`printf "%s" "$element" | sed -e "$sed_lt" -e "$sed_gt"`
248 element="Character handling <ctype.h>"
249 element=`printf "%s" "$element" | sed -e "$sed_lt" -e "$sed_gt"`
253 element="String handling <string.h>"
254 element=`printf "%s" "$element" | sed -e "$sed_lt" -e "$sed_gt"`
268 element="Numeric conversion functions <stdlib.h>"
269 element=`printf "%s" "$element" | sed -e "$sed_lt" -e "$sed_gt"`
278 element="Date and time <time.h>"
279 element=`printf "%s" "$element" | sed -e "$sed_lt" -e "$sed_gt"`
287 element="Input/Output <stdio.h>"
288 element=`printf "%s" "$element" | sed -e "$sed_lt" -e "$sed_gt"`
293 func_module unlocked-io
296 element="Command-line arguments"
297 element=`printf "%s" "$element" | sed -e "$sed_lt" -e "$sed_gt"`
303 func_module version-etc
304 func_module long-options
307 element="Cryptographic computations"
308 element=`printf "%s" "$element" | sed -e "$sed_lt" -e "$sed_gt"`
318 element=`printf "%s" "$element" | sed -e "$sed_lt" -e "$sed_gt"`
326 func_module linebuffer
330 func_module readtokens
331 func_module strverscmp
334 element="Support for systems lacking ISO C 99"
338 element="Boolean type and values <stdbool.h>"
339 element=`printf "%s" "$element" | sed -e "$sed_lt" -e "$sed_gt"`
347 element="Numeric conversion functions <stdlib.h>"
348 element=`printf "%s" "$element" | sed -e "$sed_lt" -e "$sed_gt"`
357 element="Functions for greatest-width integer types <inttypes.h>"
358 element=`printf "%s" "$element" | sed -e "$sed_lt" -e "$sed_gt"`
363 func_module strtoimax
364 func_module strtoumax
367 element="Enhancements for ISO C 99 functions"
374 element="Extra functions based on ISO C 99"
378 element="Numeric conversion functions <stdlib.h>"
379 element=`printf "%s" "$element" | sed -e "$sed_lt" -e "$sed_gt"`
384 func_module xstrtoimax
385 func_module xstrtoumax
388 element="Support for systems lacking POSIX:2001"
395 func_module ftruncate
396 func_module getgroups
397 func_module gettimeofday
403 func_module nanosleep
410 element="Enhancements for POSIX:2001 functions"
417 func_module unistd-safer
419 func_module fnmatch-posix
420 func_module fnmatch-gnu
424 element="Extra functions based on POSIX:2001"
428 element="Numeric conversion functions"
429 element=`printf "%s" "$element" | sed -e "$sed_lt" -e "$sed_gt"`
437 element="File system functions"
438 element=`printf "%s" "$element" | sed -e "$sed_lt" -e "$sed_gt"`
444 func_module backupfile
447 func_module euidaccess
448 func_module file-type
449 func_module fileblocks
454 func_module modechange
455 func_module mountlist
456 func_module path-concat
462 func_module xreadlink
465 element="File descriptor based Input/Output"
466 element=`printf "%s" "$element" | sed -e "$sed_lt" -e "$sed_gt"`
471 func_module safe-read
472 func_module safe-write
473 func_module full-read
474 func_module full-write
477 element="File stream based Input/Output"
478 element=`printf "%s" "$element" | sed -e "$sed_lt" -e "$sed_gt"`
485 func_module stdio-safer
489 element="Users and groups"
490 element=`printf "%s" "$element" | sed -e "$sed_lt" -e "$sed_gt"`
495 func_module getugroups
496 func_module group-member
501 element="Date and time"
502 element=`printf "%s" "$element" | sed -e "$sed_lt" -e "$sed_gt"`
512 element="Networking functions"
513 element=`printf "%s" "$element" | sed -e "$sed_lt" -e "$sed_gt"`
518 func_module gethostname
519 func_module xgethostname
520 func_module canon-host
523 element="Internationalization functions"
524 element=`printf "%s" "$element" | sed -e "$sed_lt" -e "$sed_gt"`
531 func_module localcharset
532 func_module hard-locale
534 func_module memcasecmp
537 func_module unicodeio
542 element="Executing programs"
543 element=`printf "%s" "$element" | sed -e "$sed_lt" -e "$sed_gt"`
548 element=`printf "%s" "$element" | sed -e "$sed_lt" -e "$sed_gt"`
553 element=`printf "%s" "$element" | sed -e "$sed_lt" -e "$sed_gt"`
562 func_module getloadavg
563 func_module getpagesize
564 func_module getusershell
573 if test -n "$missed_modules"; then
575 element="Unclassified modules - please update MODULES.html.sh"
576 element=`printf "%s" "$element" | sed -e "$sed_lt" -e "$sed_gt"`
581 for module in $missed_modules; do
588 if test -n "$missed_files"; then
590 element="Lone files - please create new modules containing them"
591 element=`printf "%s" "$element" | sed -e "$sed_lt" -e "$sed_gt"`
601 element="Future developments"
602 element=`printf "%s" "$element" | sed -e "$sed_lt" -e "$sed_gt"`
606 func_echo 'Ideally a module could consist of:'
608 func_echo '<LI>A header file: lib/<VAR>module</VAR>.h'
609 func_echo '<LI>One or more implementation files: lib/<VAR>module</VAR>.c et al.'
610 func_echo '<LI>One or more autoconf macro files: m4/<VAR>module</VAR>.m4 et al.'
611 func_echo '<LI>A configure.ac fragment, Makefile.am fragment, dependency list: modules/<VAR>module</VAR>'
612 func_echo '<LI>Some documentation'
613 func_echo '<LI>A POT file and some PO files'
614 func_echo '<LI>A testsuite'
618 func_echo 'Generated from <CODE>MODULES.html.sh</CODE> on '`LC_ALL=C date +"%e %B %Y"`.