Re: [libosinfo v2] Improve Perl-related routines

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



  Roman Bogorodskiy wrote:

>  * Add a check for the 'perl' program to configure.ac as
>    $(PERL) is used in various places
>  * Do not hardcode '/usr/bin/perl' in check-symsorting.pl
>    because on FreeBSD and maybe some other systems it's installed
>    in a different prefix, so use '/usr/bin/env perl' instead.
> ---
>  configure.ac               | 4 ++++
>  osinfo/check-symsorting.pl | 2 +-
>  2 files changed, 5 insertions(+), 1 deletion(-)
> 
> diff --git a/configure.ac b/configure.ac
> index 7f29df8..eb37f41 100644
> --- a/configure.ac
> +++ b/configure.ac
> @@ -160,6 +160,10 @@ case $host in
>  esac
>  AM_CONDITIONAL([WITH_LINUX], [test "$with_linux" = "yes"])
>  
> +AC_PATH_PROG([PERL], [perl])
> +if test -z "$PERL"; then
> +  AC_MSG_ERROR([Failed to find perl.])
> +fi
>  
>  GOBJECT_INTROSPECTION_CHECK([0.9.7])
>  
> diff --git a/osinfo/check-symsorting.pl b/osinfo/check-symsorting.pl
> index 470247c..cc7b8d6 100755
> --- a/osinfo/check-symsorting.pl
> +++ b/osinfo/check-symsorting.pl
> @@ -1,4 +1,4 @@
> -#!/usr/bin/perl
> +#!/usr/bin/env perl
>  
>  # Copyright (C) 2012-2013 Red Hat, Inc.
>  #

I've just noticed that there are two more files with the same shebang:

./build-aux/bracket-spacing.pl
./osinfo/check-symfile.pl

The second one is used on Linux only, and the first one works as is with
the configure check added for perl. So I guess we either should change
shebang line for all the three files or keep everything as is for
consistency. While the former approach looks more portable in general,
I'm not sure if it makes any practical difference as all the scripts are
being called using $(PERL) (unless someone decides to run that by hand).

Roman Bogorodskiy

Attachment: signature.asc
Description: PGP signature

_______________________________________________
Libosinfo mailing list
Libosinfo@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libosinfo

[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Fedora Users]     [Fedora Maintainers]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]

  Powered by Linux