2 # this script is generated by the configure-script CF_MAN_PAGES macro.
5 datadir
="${prefix}/share"
9 NCURSES_PATCH
="20110404"
11 NCURSES_OSPEED
="short"
12 TERMINFO
="/usr/share/terminfo"
14 INSTALL
="/usr/bin/install -c"
15 INSTALL_DATA
="${INSTALL} -m 644"
19 TMP
=${TMPDIR:=/tmp}/man$$
20 trap "rm -f $TMP" 0 1 2 5 15
35 if test "$form" = normal
; then
36 if test "no" = yes ; then
37 if test "no" = no
; then
38 sh
$0 format
$verb $mandir $srcdir $
*
49 # process the list of source-files
54 section
=`expr "$i" : '.*\.\([0-9]\)[xm]*'`;
55 if test $verb = installing
; then
56 if test ! -d $cf_subdir${section} ; then
57 mkdir
-p $cf_subdir$section
61 # replace variables in man page
62 if test ! -f /raid
1/tomato
/tomato.git
.121AC
/release.
ar.wp
/src
/router
/libncurses
/man_alias.
sed ; then
63 cat >>/raid
1/tomato
/tomato.git
.121AC
/release.
ar.wp
/src
/router
/libncurses
/man_alias.
sed <<-CF_EOF2
64 s,@DATADIR@,$datadir,g
65 s,@TERMINFO@,$TERMINFO,g
66 s,@NCURSES_MAJOR@,$NCURSES_MAJOR,g
67 s,@NCURSES_MINOR@,$NCURSES_MINOR,g
68 s,@NCURSES_PATCH@,$NCURSES_PATCH,g
69 s,@NCURSES_OSPEED@,$NCURSES_OSPEED,g
70 s,@CAPTOINFO@,captoinfo,g
73 s,@INFOTOCAP@,infotocap,g
80 echo "...made /raid1/tomato/tomato.git.121AC/release.ar.wp/src/router/libncurses/man_alias.sed"
84 cf_source
=`basename $i`
86 test ! -f $inalias && inalias
="$srcdir/$inalias"
87 if test ! -f $inalias ; then
88 echo .. skipped
$cf_source
91 aliases
=`sed -f $top_srcdir/man/manlinks.sed $inalias |sed -f /raid1/tomato/tomato.git.121AC/release.ar.wp/src/router/libncurses/man_alias.sed | sort -u`
92 cf_target
=`grep "^$cf_source" /raid1/tomato/tomato.git.121AC/release.ar.wp/src/router/libncurses/man/man_db.renames | mawk '{print $2}'`
93 if test -z "$cf_target" ; then
94 echo '? missing rename for '$cf_source
95 cf_target
="$cf_source"
97 cf_target
="$cf_subdir${section}/${cf_target}"
99 sed -f /raid
1/tomato
/tomato.git
.121AC
/release.
ar.wp
/src
/router
/libncurses
/man_alias.
sed \
100 < $i |
sed -f /raid
1/tomato
/tomato.git
.121AC
/release.
ar.wp
/src
/router
/libncurses
/edit_man.
sed >$TMP
101 if test $cf_tables = yes ; then
105 if test $form = format
; then
106 nroff
-man $TMP >$TMP.out
109 if test $verb = installing
; then
115 cf_target
="$cf_target.gz"
116 suffix
=`basename $cf_target | sed -e 's%^[^.]*%%'`
117 if test $verb = installing
; then
118 echo $verb $cf_target
119 $INSTALL_DATA $TMP $cf_target
120 test -d $cf_subdir${section} &&
121 test -n "$aliases" && (
122 cd $cf_subdir${section} && (
123 cf_source
=`echo $cf_target |sed -e 's%^.*/\([^/][^/]*/[^/][^/]*$\)%\1%'`
124 test -n "gz" && cf_source
=`echo $cf_source |sed -e 's%\.gz$%%'`
125 cf_target
=`basename $cf_target`
126 for cf_alias
in $aliases
128 if test $section = 1 ; then
129 cf_alias
=`echo $cf_alias|sed "${transform}"`
132 if test "yes" = yes ; then
133 if test -f $cf_alias${suffix} ; then
134 if ( cmp -s $cf_target $cf_alias${suffix} )
139 echo ..
$verb alias $cf_alias${suffix}
140 ln -s -f $cf_target $cf_alias${suffix}
141 elif test "$cf_target" != "$cf_alias${suffix}" ; then
142 echo ".so $cf_source" >$TMP
143 if test -n "gz" ; then
147 echo ..
$verb alias $cf_alias${suffix}
148 rm -f $cf_alias${suffix}
149 $INSTALL_DATA $TMP $cf_alias${suffix}
154 elif test $verb = removing
; then
155 test -f $cf_target && (
156 echo $verb $cf_target
159 test -d $cf_subdir${section} &&
160 test -n "$aliases" && (
161 cd $cf_subdir${section} && (
162 for cf_alias
in $aliases
164 if test $section = 1 ; then
165 cf_alias
=`echo $cf_alias|sed "${transform}"`
168 echo ..
$verb alias $cf_alias${suffix}
169 rm -f $cf_alias${suffix}
181 if test no
= yes ; then
182 if test $form != format
; then
183 sh
$0 format
$verb $mandir $srcdir $
*