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

--
--------
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
--------------------------------------------
[email protected]
[email protected]
(819) 821-8000 #63043 (jour)
(819) 823-1913 (soirs et fins de semaine)




_______________________________________________
Help-make mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/help-make

Reply via email to