in reply to Re^2: how to create makefile?
in thread how to create makefile?
This sounds like a great job for make, but this is Perlmonks, not makemonks. I suggest that you learn about make and then use that knowledge to create the appropriate Makefile. If you want to implement this in Perl, there is Algorithm::Depends, which allows you to list file dependencies and then perform actions based on the dependencies.
The Makefile for your case would likely be something like the following. You will need to preserve the tabs, because tabs are special characters in make:
.PHONY all all: resultfile1 resultfile2 resultfile1: perl -I -Mmod1 -Mmod2 pgm.pl paramFile resultfile2: resultfile1 perl -I -Mmod3 -Mmod4 pgm2.pl paramFile2
As you haven't told us the names of the resulting files of the program runs, I've substituted resultfile1 and resultfile2 for them.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^4: how to create makefile?
by carolw (Sexton) on Jan 09, 2015 at 09:33 UTC | |
by Corion (Patriarch) on Jan 09, 2015 at 09:41 UTC | |
by carolw (Sexton) on Jan 09, 2015 at 09:49 UTC | |
by RonW (Parson) on Jan 09, 2015 at 17:20 UTC |