Unix Programming - simple Makefile problem

This is Interesting: Free IT Magazines  
Home > Archive > Unix Programming > March 2005 > simple Makefile problem





You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

Author simple Makefile problem
Billy Patton

2005-03-22, 6:08 pm

I have the following 3 files that I need to make dependant
$(LIB)
$(LAFFPERL)/Laff.xs
$(PREFIX)/lib/arch/auto/Laff/Laff.so

What I need makefile to do is
is Laff.xs is newer than the .so then do
perl Makefile.PL
make PREFIX=$(PREFIX)

if $(LIB) is newer the Laff.xs then
perl Makefile.PL
make PREFIX=$(PREFIX)

I'm confused about the setup.

___ _ ____ ___ __ __
/ _ )(_) / /_ __ / _ \___ _/ /_/ /____ ___
/ _ / / / / // / / ___/ _ `/ __/ __/ _ \/ _ \
/____/_/_/_/\_, / /_/ \_,_/\__/\__/\___/_//_/
/___/
Texas Instruments ASIC Circuit Design Methodology Group
Dallas, Texas, 214-480-4455, b-patton@ti.com
Måns Rullgård

2005-03-22, 6:08 pm

Billy Patton <bpatton@ti.com> writes:

> I have the following 3 files that I need to make dependant
> $(LIB)
> $(LAFFPERL)/Laff.xs
> $(PREFIX)/lib/arch/auto/Laff/Laff.so
>
> What I need makefile to do is
> is Laff.xs is newer than the .so then do
> PERL Makefile.PL
> make PREFIX=$(PREFIX)
>
> if $(LIB) is newer the Laff.xs then
> PERL Makefile.PL
> make PREFIX=$(PREFIX)
>
> I'm confused about the setup.


Try something like this:

$(LAFFPERL)/Laff.xs $(PREFIX)/lib/arch/auto/Laff/Laff.so: $(LIB)
perl Makefile.PL
make PREFIX=$(PREFIX)

$(PREFIX)/lib/arch/auto/Laff/Laff.so: $(LAFFPERL)/Laff.xs

--
Måns Rullgård
mru@inprovide.com
Sponsored Links






Free braindumps | Software forum | Database administration forum

Copyright 2003 - 2008 webservertalk.com