[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Combining perl and makefile I seem to remember asking this before bu
From: |
Sam Yates |
Subject: |
Re: Combining perl and makefile I seem to remember asking this before but can't find it. |
Date: |
Wed, 14 Feb 2007 09:46:04 +1030 |
I think this will work in principle, the only problem being
the way the shell command has been set up within the
backquotes.
As it stands, it is missing the tags for a here document.
For example, the following perl script behaves as expected.
#!/usr/bin/perl -w
$make=<<'MAKE';
foo:
touch $@
@echo made foo
MAKE
$result=`make -f - <<'END'\n$make\nEND`;
print "output:\n$result\n";
On the first run (presuming there is no file foo), it prints:
output:
touch foo
made foo
On the second run:
output:
make: `foo' is up to date.
Cheers,
Sam Yates