linux-c-programming.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Dynamic make target
@ 2009-12-02 17:49 Toan Pham
  2009-12-02 18:20 ` Manish Katiyar
  2009-12-03  5:30 ` Glynn Clements
  0 siblings, 2 replies; 3+ messages in thread
From: Toan Pham @ 2009-12-02 17:49 UTC (permalink / raw)
  To: linux-c-programming

hi all,

I do not know where to ask this question perhaps this mailing list is
best because it had to do with c complilation.

I would like to set up a make target dynamicly.  for example

when one issue command:  make sda1
it auto compile and install to a mount point @ /mnt/sda1

similiarly: make sda2 would compile and install to /mnt/sda2


i know that in a makefile one can accomplish this by setting up two targets, ie.

sda1:
       make all
       mount /dev/sda1 /mnt/sda1
       cp releases/* /mnt/sda1
       umount /mnt/sda1

sda2:
       make all
       mount /dev/sda1 /mnt/sda2
       cp releases/* /mnt/sda2
       umount /mnt/sda2


i am curious if we can simplify everything by having a make target
like this when no matches found

$param1:
       make all
       mount /dev/sda1 /mnt/$param1
       cp releases/* /mnt/$param1
       umount /mnt/$param1

thank you,

Toan

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2009-12-03  5:30 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-12-02 17:49 Dynamic make target Toan Pham
2009-12-02 18:20 ` Manish Katiyar
2009-12-03  5:30 ` Glynn Clements

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).