ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/App-Staticperl/make-install-make.sh
Revision: 1.5
Committed: Tue Aug 22 08:38:28 2023 UTC (9 months, 1 week ago) by root
Content type: application/x-sh
Branch: MAIN
CVS Tags: HEAD
Changes since 1.4: +31 -4 lines
Log Message:
*** empty log message ***

File Contents

# Content
1 #! sh
2
3 "$MAKE" || exit
4
5 make_install() {
6 "$MAKE" install UNINST=1 \
7 && "$PERL_PREFIX"/bin/SP-patch-postinstall
8 }
9
10 install_success=
11
12 if find blib/arch/auto -type f \( -name "*.a" -o -name "*.obj" -o -name "*.lib" \) | grep -q .; then
13 echo "Probably a static XS module, rebuilding perl"
14
15 # perl seems to try to link against both installed and blib files at
16 # the same time, at least in the case of Encode.
17 #
18 # To work aorund this, we try to install the module first, which, due
19 # to the UNINST=1, should get rid of any duplicates first. We remember
20 # whether the installw as successful so we don't re-run it later, but
21 # if it fails, we install later again.
22 #
23 # Uninstall using packlists won't work, as modules embedded in perl
24 # (e.g. Encode) do not have a (Separate) .packlist file
25
26 if make_install; then
27 install_success=+
28 fi
29
30 rm -f Makefile.aperl
31
32 if "$MAKE" all perl; then
33 mv perl "$PERL_PREFIX"/bin/perl~ \
34 && rm -f "$PERL_PREFIX"/bin/perl \
35 && mv "$PERL_PREFIX"/bin/perl~ "$PERL_PREFIX"/bin/perl
36 "$MAKE" -f Makefile.aperl map_clean
37 else
38 "$MAKE" -f Makefile.aperl map_clean
39 exit 1
40 fi
41 fi
42
43 if [ "$install_success" ]; then
44 true
45 else
46 make_install
47 fi
48