source: grub-pc/trunk/fuentes/autogen.sh @ 22

Last change on this file since 22 was 22, checked in by mabarracus, 4 years ago

updated version and apply net.ifnames=0 into debian/rules

  • Property svn:executable set to *
File size: 2.8 KB
Line 
1#! /usr/bin/env bash
2
3set -e
4
5export LC_COLLATE=C
6unset LC_ALL
7
8find . -iname '*.[ch]' ! -ipath './grub-core/lib/libgcrypt-grub/*' ! -ipath './build-aux/*' ! -ipath './grub-core/lib/libgcrypt/src/misc.c' ! -ipath './grub-core/lib/libgcrypt/src/global.c' ! -ipath './grub-core/lib/libgcrypt/src/secmem.c'  ! -ipath './util/grub-gen-widthspec.c' ! -ipath './util/grub-gen-asciih.c' |sort > po/POTFILES.in
9find util -iname '*.in' ! -name Makefile.in  |sort > po/POTFILES-shell.in
10
11echo "Importing unicode..."
12python util/import_unicode.py unicode/UnicodeData.txt unicode/BidiMirroring.txt unicode/ArabicShaping.txt grub-core/unidata.c
13
14echo "Importing libgcrypt..."
15python util/import_gcry.py grub-core/lib/libgcrypt/ grub-core
16sed -n -f util/import_gcrypth.sed < grub-core/lib/libgcrypt/src/gcrypt.h.in > include/grub/gcrypt/gcrypt.h
17if [ -f include/grub/gcrypt/g10lib.h ]; then
18    rm include/grub/gcrypt/g10lib.h
19fi
20if [ -d grub-core/lib/libgcrypt-grub/mpi/generic ]; then 
21    rm -rf grub-core/lib/libgcrypt-grub/mpi/generic
22fi
23ln -s ../../../grub-core/lib/libgcrypt-grub/src/g10lib.h include/grub/gcrypt/g10lib.h
24cp -R grub-core/lib/libgcrypt/mpi/generic grub-core/lib/libgcrypt-grub/mpi/generic
25
26for x in mpi-asm-defs.h mpih-add1.c mpih-sub1.c mpih-mul1.c mpih-mul2.c mpih-mul3.c mpih-lshift.c mpih-rshift.c; do
27    if [ -h grub-core/lib/libgcrypt-grub/mpi/"$x" ] || [ -f grub-core/lib/libgcrypt-grub/mpi/"$x" ]; then
28        rm grub-core/lib/libgcrypt-grub/mpi/"$x"
29    fi
30    ln -s generic/"$x" grub-core/lib/libgcrypt-grub/mpi/"$x"
31done
32
33echo "Generating Automake input..."
34
35# Automake doesn't like including files from a path outside the project.
36rm -f contrib grub-core/contrib
37if [ "x${GRUB_CONTRIB}" != x ]; then
38  [ "${GRUB_CONTRIB}" = contrib ] || ln -s "${GRUB_CONTRIB}" contrib
39  [ "${GRUB_CONTRIB}" = grub-core/contrib ] || ln -s ../contrib grub-core/contrib
40fi
41
42UTIL_DEFS='Makefile.util.def Makefile.utilgcry.def'
43CORE_DEFS='grub-core/Makefile.core.def grub-core/Makefile.gcry.def'
44
45for extra in contrib/*/Makefile.util.def; do
46  if test -e "$extra"; then
47    UTIL_DEFS="$UTIL_DEFS $extra"
48  fi
49done
50
51for extra in contrib/*/Makefile.core.def; do
52  if test -e "$extra"; then
53    CORE_DEFS="$CORE_DEFS $extra"
54  fi
55done
56
57python gentpl.py $UTIL_DEFS > Makefile.util.am
58python gentpl.py $CORE_DEFS > grub-core/Makefile.core.am
59
60for extra in contrib/*/Makefile.common; do
61  if test -e "$extra"; then
62    echo "include $extra" >> Makefile.util.am
63    echo "include $extra" >> grub-core/Makefile.core.am
64  fi
65done
66
67for extra in contrib/*/Makefile.util.common; do
68  if test -e "$extra"; then
69    echo "include $extra" >> Makefile.util.am
70  fi
71done
72
73for extra in contrib/*/Makefile.core.common; do
74  if test -e "$extra"; then
75    echo "include $extra" >> grub-core/Makefile.core.am
76  fi
77done
78
79echo "Saving timestamps..."
80echo timestamp > stamp-h.in
81
82echo "Running autoreconf..."
83autoreconf -vi
84exit 0
Note: See TracBrowser for help on using the repository browser.