[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Filtering dependencies
From: |
Maxime Boissonneault |
Subject: |
Re: Filtering dependencies |
Date: |
Fri, 19 Jun 2009 10:03:24 -0400 |
User-agent: |
Mozilla/5.0 (Macintosh; U; Intel Mac OS X; fr; rv:1.8.1.21) Gecko/20090302 Thunderbird/2.0.0.21 Mnenhy/0.7.6.0 |
For the record, I found how to do it. I needed
.SECONDARYEXPANSION:
and some double $.
--------
Put a ladder if there's a wall, don't be afraid to slip and fall, speak for
yourself or they'll speak for you.
--------
Si l'on savait ce que l'on fait, on n'appellerait pas ça de la recherche.
(Albert Einstein)
--------
Maxime Boissonneault
Étudiant chercheur au doctorat en physique
Président de l'AGLEBUS
--------------------------------------------
address@hidden
address@hidden
(819) 821-8000 #63043 (jour)
(819) 823-1913 (soirs et fins de semaine)
Maxime Boissonneault a écrit :
Hello,
I have a directory structure of this form :
user_exes/
user_exes/exe1/
user_exes/exe1/somefiles.h and .cpp
user_exes/exe2/
user_exes/exe2/somefiles.h and .cpp
I have the following rules :
$(USER_EXES_SUBDIRS_EXES): %$(EXE_EXTENSION) : %.cpp $(filter
$(@D)%,$(USER_EXES_SUBDIRS_OBJECTS)) $(GSL_OPENMP_OBJECTS)
$(CPP) $(DIRECTIVES) $(CPPFLAGS) $(INCLUDEDIRS) $(LIBDIRS)
$*.cpp $(filter $(@D)%,$(USER_EXES_SUBDIRS_OBJECTS))
$(GSL_OPENMP_OBJECTS) $(LIBRARIES) -o $*$(EXE_EXTENSION) $(LIBS)
$(USER_EXES_SUBDIRS): $(filter $*%,$(USER_EXES_SUBDIRS_EXES))
$(USER_EXES_SUBDIRS) contains user_exes/exe1/ and user_exes/exe2/
while
$(USER_EXES_SUBDIRS_EXES) contains the name of the executables that
are to be made.
My problem is that it always builds the 2 executables. How can I make
a rule such that the dependencies is filtered to contain only those
which are required, so that only the required stuff is built ?
By the way, I don't want to explicitely list the
dependencies/directories, since the number of directories will grow.
Thanks