bootstrap 16 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669
  1. #! /bin/sh
  2. # Bootstrap this package from CVS.
  3. # Copyright (C) 2003, 2004, 2005, 2006, 2007 Free Software Foundation, Inc.
  4. # This program is free software; you can redistribute it and/or modify
  5. # it under the terms of the GNU General Public License as published by
  6. # the Free Software Foundation; either version 3, or (at your option)
  7. # any later version.
  8. # This program is distributed in the hope that it will be useful,
  9. # but WITHOUT ANY WARRANTY; without even the implied warranty of
  10. # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  11. # GNU General Public License for more details.
  12. # You should have received a copy of the GNU General Public License
  13. # along with this program; if not, write to the Free Software
  14. # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
  15. # 02110-1301, USA.
  16. # Written by Paul Eggert and Sergey Poznyakoff.
  17. nl='
  18. '
  19. # Ensure file names are sorted consistently across platforms.
  20. # Also, ensure diagnostics are in English, e.g., "wget --help" below.
  21. LC_ALL=C
  22. export LC_ALL
  23. usage() {
  24. echo >&2 "\
  25. Usage: $0 [OPTION]...
  26. Bootstrap this package from the checked-out sources.
  27. Options:
  28. --paxutils-srcdir=DIRNAME Specify the local directory where paxutils
  29. sources reside. Use this if you already
  30. have paxutils sources on your machine, and
  31. do not want to waste your bandwidth dowloading
  32. them again.
  33. --gnulib-srcdir=DIRNAME Specify the local directory where gnulib
  34. sources reside. Use this if you already
  35. have gnulib sources on your machine, and
  36. do not want to waste your bandwidth dowloading
  37. them again.
  38. --copy Copy files instead of creating symbolic links.
  39. --force Attempt to bootstrap even if the sources seem
  40. not to have been checked out.
  41. --skip-po Do not download po files.
  42. --update-po[=LANG] Update po file(s) and exit.
  43. --cvs-user=USERNAME Set the CVS username to be used when accessing
  44. the paxutils repository.
  45. If the file bootstrap.conf exists in the current working directory, its
  46. contents are read as shell variables to configure the bootstrap.
  47. Local defaults can be provided by placing the file \`.bootstrap' in the
  48. current working directory. The file is read after bootstrap.conf, comments
  49. and empty lines are removed, shell variables expanded and the result is
  50. prepended to the command line options.
  51. Running without arguments will suffice in most cases.
  52. "
  53. }
  54. checkout() {
  55. if [ ! -d $1 ]; then
  56. echo "$0: getting $1 files..."
  57. case $1 in
  58. paxutils)
  59. case ${CVS_AUTH-pserver} in
  60. pserver)
  61. CVS_PREFIX=':pserver:anonymous@';;
  62. ssh)
  63. CVS_PREFIX="$CVS_USER${CVS_USER+@}";;
  64. *)
  65. echo "$0: $CVS_AUTH: Unknown CVS access method" >&2
  66. exit 1;;
  67. esac
  68. case $CVS_RSH in
  69. '') CVS_RSH=ssh; export CVS_RSH;;
  70. esac
  71. CVSURL=${CVS_PREFIX}cvs.savannah.gnu.org:/cvsroot/"$1"
  72. ;;
  73. gnulib)
  74. CVSURL=:pserver:anonymous@pserver.git.sv.gnu.org:/gnulib.git
  75. ;;
  76. esac
  77. trap "cleanup $1" 1 2 13 15
  78. cvs -z3 -q -d $CVSURL co $1 || cleanup $1
  79. trap - 1 2 13 15
  80. fi
  81. }
  82. cleanup() {
  83. status=$?
  84. rm -fr $1
  85. exit $status
  86. }
  87. # Configuration.
  88. # List of gnulib modules needed.
  89. gnulib_modules=
  90. # Any gnulib files needed that are not in modules.
  91. gnulib_files=
  92. # Translation Project URL, for the registry of all projects
  93. # and for the translation-team master directory.
  94. tp_url() {
  95. echo "http://translationproject.org/domain/$1.html"
  96. }
  97. extract_package_name='
  98. /^AC_INIT(/{
  99. /.*,.*,.*,/{
  100. s///
  101. s/[][]//g
  102. p
  103. q
  104. }
  105. s/AC_INIT(\[*//
  106. s/]*,.*//
  107. s/^GNU //
  108. y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/
  109. s/[^A-Za-z0-9_]/-/g
  110. p
  111. }
  112. '
  113. package=`sed -n "$extract_package_name" configure.ac` || exit
  114. # Extra files from gnulib, which override files from other sources.
  115. gnulib_extra_files='
  116. build-aux/announce-gen
  117. build-aux/install-sh
  118. build-aux/missing
  119. build-aux/mdate-sh
  120. build-aux/texinfo.tex
  121. build-aux/depcomp
  122. build-aux/config.guess
  123. build-aux/config.sub
  124. doc/INSTALL
  125. '
  126. # Other locale categories that need message catalogs.
  127. EXTRA_LOCALE_CATEGORIES=
  128. # Additional xgettext options to use. Use "\\\newline" to break lines.
  129. XGETTEXT_OPTIONS='\\\
  130. --flag=_:1:pass-c-format\\\
  131. --flag=N_:1:pass-c-format\\\
  132. --flag=error:3:c-format --flag=error_at_line:5:c-format\\\
  133. '
  134. # Files we don't want to import.
  135. excluded_files=
  136. # File that should exist in the top directory of a checked out hierarchy,
  137. # but not in a distribution tarball.
  138. CVS_only_file=README-cvs
  139. # Whether to use copies instead of symlinks.
  140. copy=false
  141. # Override the default configuration, if necessary.
  142. test -r bootstrap.conf && . ./bootstrap.conf
  143. # Read local configuration file
  144. if [ -r .bootstrap ]; then
  145. echo "$0: Reading configuration file .bootstrap"
  146. eval set -- "`sed 's/#.*$//;/^$/d' .bootstrap | tr '\n' ' '` $*"
  147. fi
  148. # Translate configuration into internal form.
  149. # Parse options.
  150. for option
  151. do
  152. case $option in
  153. --help)
  154. usage
  155. exit;;
  156. --paxutils-srcdir=*)
  157. PAXUTILS_SRCDIR=`expr "$option" : '--paxutils-srcdir=\(.*\)'`;;
  158. --gnulib-srcdir=*)
  159. GNULIB_SRCDIR=`expr "$option" : '--gnulib-srcdir=\(.*\)'`;;
  160. --cvs-user=*)
  161. CVS_USER=`expr "$option" : '--cvs-user=\(.*\)'`;;
  162. --skip-po | --no-po) # --no-po is for compatibility with 'tar' tradition.
  163. DOWNLOAD_PO=skip;;
  164. --update-po=*)
  165. DOWNLOAD_PO=`expr "$option" : '--update-po=\(.*\)'`;;
  166. --update-po)
  167. DOWNLOAD_PO=only;;
  168. --force)
  169. CVS_only_file=;;
  170. --copy)
  171. copy=true;;
  172. *)
  173. echo >&2 "$0: $option: unknown option"
  174. exit 1;;
  175. esac
  176. done
  177. if test -n "$CVS_only_file" && test ! -r "$CVS_only_file"; then
  178. echo "$0: Bootstrapping from a non-checked-out distribution is risky." >&2
  179. exit 1
  180. fi
  181. echo "$0: Bootstrapping CVS $package..."
  182. # Get translations.
  183. get_translations() {
  184. subdir=$1
  185. domain=$2
  186. po_file=$3
  187. case $WGET_COMMAND in
  188. '')
  189. echo "$0: wget not available; skipping translations";;
  190. ?*)
  191. url=`tp_url $domain`
  192. baseurl=`expr "$url" : '\(.*\)/.*'`
  193. echo "$0: getting translations into $subdir for $domain..." &&
  194. case $po_file in
  195. '') (cd $subdir && rm -f dummy `ls | sed -n '/\.gmo$/p; /\.po/p'`);;
  196. esac &&
  197. $WGET_COMMAND -O "$subdir/$domain.html" "$url" &&
  198. sed -n 's|.*href="\(.*\)/\([^/][^/]*\)/'"$domain"'-\([^/"]*\)\.[^."]*\.po".*|\2:\3:\1|p' <"$subdir/$domain.html" |
  199. sort -t: -k 1,1 -k 2,2n -k2,2 -k3,3n -k3,3 -k4,4n -k4,4 -k5,5n -k5.5 |
  200. awk -F: '
  201. { if (lang && $1 != lang) print lang, ver, $3 }
  202. { lang = $1; ver = $2 }
  203. END { if (lang) print lang, ver, $3 }
  204. ' | awk -v domain="$domain" -v baseurl="$baseurl" -v subdir="$subdir" \
  205. -v po_file="$po_file" '
  206. {
  207. lang = $1
  208. if (po_file && po_file != (lang ".po")) next
  209. ver = $2
  210. printf "{ $WGET_COMMAND -O %s/%s.po %s/%s/%s/%s-%s.%s.po &&\n", subdir, lang, baseurl, $3, lang, domain, ver, lang
  211. printf " msgfmt -c -o /dev/null %s/%s.po || {\n", subdir, lang
  212. printf " echo >&2 '\'"$0"': omitting translation for %s'\''\n", lang
  213. printf " rm -f %s/%s.po; }; } &&\n", subdir, lang
  214. }
  215. END { print ":" }
  216. ' | WGET_COMMAND="$WGET_COMMAND" sh
  217. ;;
  218. esac &&
  219. ls "$subdir"/*.po 2>/dev/null |
  220. sed 's|.*/||; s|\.po$||' >"$subdir/LINGUAS" &&
  221. rm -f "$subdir/$domain.html"
  222. }
  223. case `wget --help` in
  224. *'--no-cache'*)
  225. WGET_COMMAND='wget -nv --no-cache';;
  226. *'--cache=on/off'*)
  227. WGET_COMMAND='wget -nv --cache=off';;
  228. *'--non-verbose'*)
  229. WGET_COMMAND='wget -nv';;
  230. *)
  231. WGET_COMMAND='';;
  232. esac
  233. case $DOWNLOAD_PO in
  234. 'skip')
  235. ;;
  236. '')
  237. get_translations po $package || exit
  238. ;;
  239. 'only')
  240. get_translations po $package
  241. exit
  242. ;;
  243. *.po)
  244. get_translations po $package "$DOWNLOAD_PO"
  245. exit
  246. ;;
  247. *)
  248. get_translations po $package "${DOWNLOAD_PO}.po"
  249. exit
  250. esac
  251. # Get paxutils files.
  252. case ${PAXUTILS_SRCDIR--} in
  253. -) checkout paxutils
  254. PAXUTILS_SRCDIR=paxutils
  255. esac
  256. if [ -r $PAXUTILS_SRCDIR/gnulib.modules ]; then
  257. gnulib_modules=`
  258. (echo "$gnulib_modules"; grep '^[^#]' $PAXUTILS_SRCDIR/gnulib.modules) |
  259. sort -u
  260. `
  261. fi
  262. ignore_file_list=
  263. cleanup_ifl() {
  264. test -n "$ignore_file_list" && rm -f $ignore_file_list
  265. }
  266. trap 'cleanup_ifl' 1 2 3 15
  267. # ignorefile DIR FILE
  268. # add FILE to the temporary ignorelist in the directory DIR
  269. ignorefile() {
  270. file=$1/.ignore.$$
  271. echo "$2" >> $file
  272. if `echo $ignore_list | grep -qv $file`; then
  273. ignore_file_list="$ignore_file_list
  274. $file"
  275. fi
  276. }
  277. # copy_files srcdir dstdir
  278. copy_files() {
  279. for file in `cat $1/DISTFILES`
  280. do
  281. case $file in
  282. "#*") continue;;
  283. esac
  284. dst=`echo $file | sed 's^.*/^^'`
  285. if [ $# -eq 3 ]; then
  286. case $dst in
  287. ${3}*) ;;
  288. *) dst=${3}$dst;;
  289. esac
  290. fi
  291. echo "$0: Copying file $1/$file to $2/$dst"
  292. cp -p $1/$file $2/$dst
  293. ignorefile $2 $dst
  294. done
  295. }
  296. # Get gnulib files.
  297. case ${GNULIB_SRCDIR--} in
  298. -)
  299. checkout gnulib
  300. GNULIB_SRCDIR=gnulib
  301. esac
  302. gnulib_tool=$GNULIB_SRCDIR/gnulib-tool
  303. <$gnulib_tool || exit
  304. ensure_dir_exists()
  305. {
  306. d=`dirname $dst`
  307. test -d "$d" || mkdir -p -- "$d"
  308. }
  309. symlink_to_gnulib()
  310. {
  311. src=$GNULIB_SRCDIR/$1
  312. dst=${2-$1}
  313. test -f "$src" && {
  314. if $copy; then
  315. {
  316. test ! -h "$dst" || {
  317. echo "$0: rm -f $dst" &&
  318. rm -f "$dst"
  319. }
  320. } &&
  321. test -f "$dst" &&
  322. cmp -s "$src" "$dst" || {
  323. echo "$0: cp -fp $src $dst" &&
  324. ensure_dir_exists $dst &&
  325. cp -fp "$src" "$dst"
  326. }
  327. else
  328. test -h "$dst" &&
  329. src_ls=`ls -diL "$src" 2>/dev/null` && set $src_ls && src_i=$1 &&
  330. dst_ls=`ls -diL "$dst" 2>/dev/null` && set $dst_ls && dst_i=$1 &&
  331. test "$src_i" = "$dst_i" || {
  332. dot_dots=
  333. case $src in
  334. /*) ;;
  335. *)
  336. case /$dst/ in
  337. *//* | */../* | */./* | /*/*/*/*/*/)
  338. echo >&2 "$0: invalid symlink calculation: $src -> $dst"
  339. exit 1;;
  340. /*/*/*/*/) dot_dots=../../../;;
  341. /*/*/*/) dot_dots=../../;;
  342. /*/*/) dot_dots=../;;
  343. esac;;
  344. esac
  345. echo "$0: ln -fs $dot_dots$src $dst" &&
  346. ensure_dir_exists $dst &&
  347. ln -fs "$dot_dots$src" "$dst"
  348. }
  349. fi
  350. }
  351. }
  352. cp_mark_as_generated()
  353. {
  354. cp_src=$1
  355. cp_dst=$2
  356. if cmp -s "$cp_src" "$GNULIB_SRCDIR/$cp_dst"; then
  357. symlink_to_gnulib "$cp_dst"
  358. else
  359. case $cp_dst in
  360. *.[ch]) c1='/* '; c2=' */';;
  361. *.texi) c1='@c '; c2= ;;
  362. *.m4|*/Make*|Make*) c1='# ' ; c2= ;;
  363. *) c1= ; c2= ;;
  364. esac
  365. if test -z "$c1"; then
  366. cmp -s "$cp_src" "$cp_dst" || {
  367. echo "$0: cp -f $cp_src $cp_dst" &&
  368. cp -f "$cp_src" "$cp_dst"
  369. }
  370. else
  371. # Copy the file first to get proper permissions if it
  372. # doesn't already exist. Then overwrite the copy.
  373. cp "$cp_src" "$cp_dst-t" &&
  374. (
  375. echo "$c1-*- buffer-read-only: t -*- vi: set ro:$c2" &&
  376. echo "${c1}DO NOT EDIT! GENERATED AUTOMATICALLY!$c2" &&
  377. cat "$cp_src"
  378. ) > $cp_dst-t &&
  379. if cmp -s "$cp_dst-t" "$cp_dst"; then
  380. rm -f "$cp_dst-t"
  381. else
  382. echo "$0: cp $cp_src $cp_dst # with edits" &&
  383. mv -f "$cp_dst-t" "$cp_dst"
  384. fi
  385. fi
  386. fi
  387. }
  388. version_controlled_file() {
  389. dir=$1
  390. file=$2
  391. found=no
  392. if test -d CVS; then
  393. grep -F "/$file/" $dir/CVS/Entries 2>/dev/null |
  394. grep '^/[^/]*/[0-9]' > /dev/null && found=yes
  395. elif test -d .git; then
  396. git-rm -n "$dir/$file" > /dev/null 2>&1 && found=yes
  397. else
  398. echo "$0: no version control for $dir/$file?" >&2
  399. fi
  400. test $found = yes
  401. }
  402. slurp() {
  403. for dir in . `(cd $1 && find * -type d -print)`; do
  404. copied=
  405. sep=
  406. for file in `ls $1/$dir`; do
  407. test -d $1/$dir/$file && continue
  408. for excluded_file in $excluded_files; do
  409. test "$dir/$file" = "$excluded_file" && continue 2
  410. done
  411. if test $file = Makefile.am; then
  412. copied=$copied${sep}gnulib.mk; sep=$nl
  413. remove_intl='/^[^#].*\/intl/s/^/#/;'"s,/$bt,,g"
  414. sed "$remove_intl" $1/$dir/$file | cmp -s - $dir/gnulib.mk || {
  415. echo "$0: Copying $1/$dir/$file to $dir/gnulib.mk ..." &&
  416. rm -f $dir/gnulib.mk &&
  417. sed "$remove_intl" $1/$dir/$file >$dir/gnulib.mk
  418. }
  419. elif { test "${2+set}" = set && test -r $2/$dir/$file; } ||
  420. version_controlled_file $dir $file; then
  421. echo "$0: $dir/$file overrides $1/$dir/$file"
  422. else
  423. copied=$copied$sep$file; sep=$nl
  424. if test $file = gettext.m4; then
  425. echo "$0: patching m4/gettext.m4 to remove need for intl/* ..."
  426. rm -f $dir/$file
  427. sed '
  428. /^AC_DEFUN(\[AM_INTL_SUBDIR],/,/^]/c\
  429. AC_DEFUN([AM_INTL_SUBDIR], [
  430. /^AC_DEFUN(\[gt_INTL_SUBDIR_CORE],/,/^]/c\
  431. AC_DEFUN([gt_INTL_SUBDIR_CORE], [])
  432. $a\
  433. AC_DEFUN([gl_LOCK_EARLY], [])
  434. ' $1/$dir/$file >$dir/$file
  435. else
  436. cp_mark_as_generated $1/$dir/$file $dir/$file
  437. fi
  438. fi || exit
  439. done
  440. if test -n "$copied"; then
  441. copied="Makefile
  442. Makefile.in
  443. $copied"
  444. if test -d CVS; then
  445. dot_ig=.cvsignore
  446. else
  447. dor_ig=.gitignore
  448. fi
  449. ig=$dir/$dot_ig
  450. if [ -f $dir/.ignore.$$ ]; then
  451. tfile=$dir/.ignore.$$
  452. else
  453. tfile=
  454. fi
  455. if test -f $ig; then
  456. echo "$copied" | sort -u - $ig | cmp -s - $ig ||
  457. echo "$copied" | sort -u - $ig $tfile -o $ig
  458. else
  459. copied="$dot_ig
  460. $copied"
  461. if [ "$dir" = "po" ]; then
  462. copied="LINGUAS
  463. Makevars
  464. POTFILES
  465. *.mo
  466. *.gmo
  467. *.po
  468. remove-potcdate.sed
  469. stamp-po
  470. $package.pot
  471. $copied"
  472. fi
  473. echo "$copied" | sort -u - $tfile -o $ig
  474. fi || exit
  475. fi
  476. done
  477. }
  478. # Create boot temporary directories to import from gnulib and gettext.
  479. bt='.#bootmp'
  480. bt2=${bt}2
  481. rm -fr $bt $bt2 &&
  482. mkdir $bt $bt2 || exit
  483. # Import from gnulib.
  484. test -d build-aux || {
  485. echo "$0: mkdir build-aux ..." &&
  486. mkdir build-aux
  487. } || exit
  488. gnulib_tool_options="\
  489. --import\
  490. --no-changelog\
  491. --aux-dir $bt/build-aux\
  492. --doc-base $bt/doc\
  493. --lib lib$package\
  494. --m4-base $bt/m4/\
  495. --source-base $bt/lib/\
  496. --tests-base $bt/tests\
  497. --local-dir gl\
  498. "
  499. echo "$0: $gnulib_tool $gnulib_tool_options --import ..."
  500. $gnulib_tool $gnulib_tool_options --import $gnulib_modules &&
  501. slurp $bt || exit
  502. for file in $gnulib_files; do
  503. symlink_to_gnulib $file || exit
  504. done
  505. # Import from gettext.
  506. echo "$0: (cd $bt2; autopoint) ..."
  507. cp configure.ac $bt2 &&
  508. (cd $bt2 && autopoint && rm configure.ac) &&
  509. slurp $bt2 $bt || exit
  510. rm -fr $bt $bt2 || exit
  511. # Import from paxutils
  512. copy_files ${PAXUTILS_SRCDIR}/m4 m4
  513. echo "$0: Creating m4/paxutils.m4"
  514. (echo "# This file is generated automatically. Please, do not edit."
  515. echo "#"
  516. echo "AC_DEFUN([${package}_PAXUTILS],["
  517. cat ${PAXUTILS_SRCDIR}/m4/DISTFILES | sed '/^#/d;s/\(.*\)\.m4/pu_\1/' | tr a-z A-Z
  518. echo "])") > ./m4/paxutils.m4
  519. ignorefile m4 paxutils.m4
  520. if [ -d rmt ]; then
  521. :
  522. else
  523. mkdir rmt
  524. fi
  525. for dir in doc rmt lib tests
  526. do
  527. copy_files ${PAXUTILS_SRCDIR}/$dir $dir
  528. done
  529. copy_files ${PAXUTILS_SRCDIR}/paxlib lib pax
  530. # Reconfigure, getting other files.
  531. for command in \
  532. 'aclocal --force -I m4' \
  533. 'autoconf --force' \
  534. 'autoheader --force' \
  535. 'automake --add-missing --copy --force-missing';
  536. do
  537. echo "$0: $command ..."
  538. $command || exit
  539. done
  540. # Get some extra files from gnulib, overriding existing files.
  541. for file in $gnulib_extra_files; do
  542. case $file in
  543. */INSTALL) dst=INSTALL;;
  544. *) dst=$file;;
  545. esac
  546. symlink_to_gnulib $file $dst || exit
  547. done
  548. # Create gettext configuration.
  549. echo "$0: Creating po/Makevars from po/Makevars.template ..."
  550. rm -f po/Makevars
  551. sed '
  552. /^EXTRA_LOCALE_CATEGORIES *=/s/=.*/= '"$EXTRA_LOCALE_CATEGORIES"'/
  553. /^MSGID_BUGS_ADDRESS *=/s/=.*/= bug-'"$package"'@gnu.org/
  554. /^XGETTEXT_OPTIONS *=/{
  555. s/$/ \\/
  556. a\
  557. '"$XGETTEXT_OPTIONS"' $${end_of_xgettext_options+}
  558. }
  559. ' po/Makevars.template >po/Makevars
  560. if test -d runtime-po; then
  561. # Similarly for runtime-po/Makevars, but not quite the same.
  562. rm -f runtime-po/Makevars
  563. sed '
  564. /^DOMAIN *=.*/s/=.*/= '"$package"'-runtime/
  565. /^subdir *=.*/s/=.*/= runtime-po/
  566. /^MSGID_BUGS_ADDRESS *=/s/=.*/= bug-'"$package"'@gnu.org/
  567. /^XGETTEXT_OPTIONS *=/{
  568. s/$/ \\/
  569. a\
  570. '"$XGETTEXT_OPTIONS_RUNTIME"' $${end_of_xgettext_options+}
  571. }
  572. ' <po/Makevars.template >runtime-po/Makevars
  573. # Copy identical files from po to runtime-po.
  574. (cd po && cp -p Makefile.in.in *-quot *.header *.sed *.sin ../runtime-po)
  575. fi
  576. cleanup_ifl
  577. echo "$0: done. Now you can run './configure'."