[Box Backup-dev] Makefile.extra?

James O'Gorman boxbackup-dev at fluffy.co.uk
Sun Feb 26 18:05:08 GMT 2006


Martin Ebourne wrote:
> On Sun, 2006-02-26 at 12:14 +0000, James O'Gorman wrote:
>> I take it you still wouldn't want #define @PERL@ in the .cpp file - 
>> which means there'd need to be something in infrastructure/m4? In which 
>> case, I think Martin may have to look at that, if possible. I really 
>> have no idea what's going on there!
> 
> Have a look at BoxConfig.h. Your define is probably already there. If
> not, then AC_SUBST it.

It wasn't in BoxConfig.h. Adding these lines into configure.ac does it, 
but is this OK, and should these stay in configure.ac or in the 
infrastructure/m4 directory?

AC_PROG_PATH([PERL], [perl], [no])
if test "x$PERL" != "xno"; then
   AC_SUBST([PERL])
   AC_DEFINE_UNQUOTED([PERL_EXECUTABLE], ["$PERL"], [Location of the 
perl executable])
fi

>>> 2) There are lots of scripts which need parsing. Maybe it would be nicer 
>>> to modify makebuildenv.pl to go through and modify the first line of 
>>> every perl script?
>> This bit is certainly doable. My Perl-foo is at least half-decent! (I hope.)
>>
>> To make sure the path to perl is right though, should I move 
>> makebuildenv.pl to makebuildenv.pl.in, set the first line to #!@PERL@, 
>> and then set something like: my $perl_executable = @PERL@; ?
> 
> Sounds like a reasonable plan. I have to say that I don't see why Ben
> prefers having a perl script that modifies all the files compared to
> autoconf doing it. Am I missing something?

I'm happy to do it either way (and I've already got the patches to do it 
the autoconf way).

James



More information about the Boxbackup-dev mailing list