Dynamic make target

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]


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.

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

       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

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

thank you,

To unsubscribe from this list: send the line "unsubscribe linux-c-programming" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Assembler]     [Git]     [Kernel List]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [C Programming]     [Yosemite Campsites]     [Yosemite News]     [GCC Help]

  Powered by Linux