SEARCH_SOURCE = $(DDODBC_LIB_DIR) ;
InstallBin [ FDirName $(TOP) $(BUILDDIR) lib ] : $(DDODBC_LIBS) ;
InstallBin [ FDirName $(TOP) $(BUILDDIR) datadirect V7 lib ] : $(DDODBC_LIBS) ;
Only in the second directory can I find the copied files from $(DDODBC_LIBS). Why they are not copied to the first directory by InstallBin?
The issue is that
InstallBinrespectivelyInstallIntoneed to define a target (per source file) which represents the installed file and which is made a dependency of theinstallpseudo target. They do that by simply using the source target name with the grist set to$(INSTALLGRIST). So the secondInstallBininvocation defines the same target, resetting the target's location (LOCATEvariable on the target). Hence the file is only installed to the second location.A simple, if not particularly elegant, work-around is to redefine
INSTALLGRISTfor one of the invocations ofInstallBin.In case you need to do that more often, a more elegant solution would be to create a wrapper rule that derives an
INSTALLGRISTvalue from the installation directory:And then simply use that rule instead of
InstallBin.