File: prepare_perl_module_files.sh

package info (click to toggle)
texinfo 6.5.0.dfsg.1-4
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 85,304 kB
  • sloc: perl: 905,694; ansic: 53,356; sh: 17,766; xml: 5,697; awk: 1,844; makefile: 1,467; lisp: 213; pascal: 127; sed: 78
file content (67 lines) | stat: -rwxr-xr-x 2,320 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
#! /bin/sh
# $Id: prepare_perl_module_files.sh 6543 2015-08-18 06:50:34Z pertusus $
# Regenerate lists of t/ files, used for make dist(check)
# and the Perl modules.
#
# Copyright 2011, 2012, 2013, 2014, 2015 Free Software Foundation, Inc.
#
# This file is free software; as a special exception the author gives
# unlimited permission to copy and/or distribute it, with or without
# modifications, as long as this notice is preserved.
#
# This program is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY, to the extent permitted by law; without even the
# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
#
# Originally written by Patrice Dumas.

set -e

# to get a reproducible locales independent sort.
LC_ALL=C; export LC_ALL

# Regenerate files required for perl

./maintain/change_perl_modules_version.sh auto

# This regenerate files in t/include_dir/
make
# regenerate the list of XSParagraph files
sed 's;^;Texinfo/Convert/XSParagraph/;' < Texinfo/Convert/XSParagraph/MANIFEST > maintain/MANIFEST_XSParagraph_files

PACKAGE=`grep '^PACKAGE = ' Makefile | sed 's/^PACKAGE = //'`
if test z"$PACKAGE" = 'z' ; then 
  exit 1
fi
# LocaleData are also generated through Makefile.docstr.  Here we want
# them to be generated by the Makefile in po*/ to test that it works.
rm -rf LocaleData

for dir in po po_document; do
  rm -rf $dir
  mkdir $dir
  cp maintain/Makefile_perl_po $dir/Makefile
  grep '^tp\/' ../$dir/POTFILES.in | sed -e 's/^tp/../' > $dir/POTFILES.in
  echo "# File automatically generated from texinfo files"
  echo "PACKAGE = $PACKAGE" > $dir/PACKAGE
  cat ../$dir/Makevars >> $dir/PACKAGE
  linguas_str=
  for lingua in `cat ../$dir/LINGUAS`; do
    linguas_str="$linguas_str $lingua"
    cp -p ../$dir/$lingua.po $dir
  done
  echo "LINGUAS = $linguas_str" >> $dir/PACKAGE

  (cd $dir && make all && make clean)
done

find LocaleData po_document po t/include_dir -type f | sort \
  > maintain/MANIFEST_generated_files
make MANIFEST
cp -p ../COPYING .
sed 's/\(my \$hardcoded_version = \).*/\1 undef;/' texi2any.pl > texi2any
chmod a+x texi2any
touch -r texi2any.pl texi2any
# We could imagine using an even more stripped down version, as
# the default paths should be ok in a standalone module.
cp -p Texinfo/ModulePath.pm.in Texinfo/ModulePath.pm