I recently sent out some experimental code whose install script tries
to unpack, build, and install a (shipped) copy of YAML.pm, as:
:
...
# Install YAML, if need be.
YDIR='YAML-0.39'
if [ "`bin/module_chk YAML`" = '' ]; then
echo "Installing YAML"
( cd supp; tar xf $YDIR.tar
cd $YDIR; perl Makefile.PL; make; make install
cd ..; rm -rf $YDIR
)
fi
...
The module_chk command simply reports the first instance of a
"YAML" directory it finds in a directory in @INC:
#!/usr/bin/env perl
...
use strict;
use warnings;
{
my ($inc, $module);
$module = $ARGV[0];
foreach $inc (@INC) {
if (-d "$inc/$module") {
print "$inc/$module\n";
exit
} } }
On my machine, this prints:
/Library/Perl/5.8.6/YAML
The installation code works fine on the local machines I tried out
here, but make(1) didn't work on some recipients' machines, as:
make: *** No rule to make target
`/System/Library/Perl/5.8.6/darwin-thread-multi-2level/CORE/config.h',
needed by `Makefile'. Stop.
Again, looking at local machines, the specified file (config.h) exists.
Help?
-r

Signature
email: rdm@cfcl.com; phone: +1 650-873-7841
http://www.cfcl.com - Canta Forda Computer Laboratory
http://www.cfcl.com/Meta - The FreeBSD Browser, Meta Project, etc.
Sherm Pendley - 01 Jun 2005 03:28 GMT
> The installation code works fine on the local machines I tried out
> here, but make(1) didn't work on some recipients' machines, as:
[quoted text clipped - 6 lines]
> Again, looking at local machines, the specified file (config.h)
> exists.
config.h is included in Xcode - do your users have that installed?
(Project Builder for <= Jaguar, of course...)
sherm--
Cocoa programming in Perl: http://camelbones.sourceforge.net
Hire me! My resume: http://www.dot-app.org
Rich Morin - 01 Jun 2005 05:32 GMT
>config.h is included in Xcode - do your users have that installed?
>(Project Builder for <= Jaguar, of course...)
In at least one of the cases, that was the problem.
I've put a test into my install script, checking for
the presence of "/Developer/Applications/Xcode.app".
Thanks!
-r

Signature
email: rdm@cfcl.com; phone: +1 650-873-7841
http://www.cfcl.com - Canta Forda Computer Laboratory
http://www.cfcl.com/Meta - The FreeBSD Browser, Meta Project, etc.