Dear developers,

   I'm not quite sure whether the problem I have encountered is a bug,
so maybe it's just a suggestion on how to extend the functionality of
"make".

Let's take the following makefile:

----------------------------------------------------------------------

APP = myapp

file.$(APP):
        touch file.$(APP)

----------------------------------------------------------------------

Running make once will crate a file named file.myapp. A second call
gives

   make: `file.myapp' is up to date.

as expected.

Now let's replace the macro definition by something very similar:

----------------------------------------------------------------------

APP = `echo "myapp"`

file.$(APP):
        touch file.$(APP)

----------------------------------------------------------------------

Repeated calls to make will touch "file.myapp" again and again.

The reason why I would like to have that functionality is the
following: My source files reside in a directory which is exported via
NFS to different machines. I would now like to create, in that
directory, different executables for each host, i.e. sub.c would give
sub.host1.o, sub.host2.o, etc., and main.c would give main.host1,
main.host2, etc. The "host1", "host2" strings would depend on the host
which the files are compiled on. The strings would be given by shell
scripts which would also supply the compiler options for the specific
host. The "echo" command in the above makefile would be replaced by the
name of such a script.


Jörg Reuter

-- 

.......................................................................

 Jörg Reuter
  Institut für Aerodynamik und Gasdynamik
   Universität Stuttgart
    Pfaffenwaldring 21            Phone:  +49 711 685-3406
     70569 Stuttgart               Fax:   +49 711 685-3438
      Germany                       e-mail: [EMAIL PROTECTED]

.......................................................................

Reply via email to