Subj : Re: Some makefile questions To : borland.public.cpp.borlandcpp From : Ed Mulroy Date : Wed Jun 15 2005 01:37 pm > 1) Is it possible to use a directory as target or source? No, but what you can do is create a tag file in the directory and test for that. c:\mydir\foodir\tag.txt : - mkdir c:\mydir\foodir @echo abc >c:\mydir\foodir\tag.txt > 2) Is it possible to have make exit gracefully if some source > does not exist? It already does that, issuing a message something like name.ext does not exist, do not know how to make it and exits with a return value of non-zero > 3) Can macros be defined within a description block? > i.e. something like: > > foo.obj : foo.cpp > cl foo.cpp > MACRO = bar There is no block limitation on the macro. If it is defined, then it is known from then on in the make file. .. Ed > Matthias Reuss wrote in message > news:42b034a2$1@newsgroups.borland.com... > > having to use Borland's make for a specific project, I > stumbled upon some questions: > > 1) Is it possible to use a directory as target or source? > > e.g. something like > > c:\mydir\foodir: c:\mydir > mkdir c:\mydir\foodir > > 2) Is it possible to have make exit gracefully if some source > does not exist? > My project needs a special compiler which is only present on > some computers here; on those computers that do not have > this compiler, make should only issue a message but the > driver script should not abort (it aborts when make > raises an error). > I have not found an "!exit" directive, and !error does raise an error. > > 3) Can macros be defined within a description block? > i.e. something like: > > foo.obj : foo.cpp > cl foo.cpp > MACRO = bar > > This did not work, however I did not find this topic in the documentation. > What I wanted to do is save to a variable whether foo.obj had to be made > or > had been up-to-date. .