how to automatically update archive file in another directory

This is a discussion on how to automatically update archive file in another directory within the Tech Board forums, part of the Community Boards category; dear there, I have two directories: Common and Sub. In Common I have files to generate common.a and in Sub, ...

  1. #1
    Registered User
    Join Date
    Dec 2008
    Posts
    48

    how to automatically update archive file in another directory

    dear there,

    I have two directories: Common and Sub. In Common I have files to generate common.a
    and in Sub, I need to generate executables which all depends on common.a

    how can I ask make to automatically update common.a, if files for its members are changed? I tried VPATH and GPATH, but didn't make it work yet. Looking for help! Thanks!

  2. #2
    and the hat of wrongness Salem's Avatar
    Join Date
    Aug 2001
    Location
    The edge of the known universe
    Posts
    32,590
    Add the makefile to the top-level makefile as a dependency which always happens.
    If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
    If at first you don't succeed, try writing your phone number on the exam paper.
    I support http://www.ukip.org/ as the first necessary step to a free Europe.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Newbie homework help
    By fossage in forum C Programming
    Replies: 3
    Last Post: 04-30-2009, 04:27 PM
  2. gcc link external library
    By spank in forum C Programming
    Replies: 6
    Last Post: 08-08-2007, 03:44 PM
  3. help with text input
    By Alphawaves in forum C Programming
    Replies: 8
    Last Post: 04-08-2007, 04:54 PM
  4. C++ std routines
    By siavoshkc in forum C++ Programming
    Replies: 33
    Last Post: 07-28-2006, 12:13 AM
  5. Possible circular definition with singleton objects
    By techrolla in forum C++ Programming
    Replies: 3
    Last Post: 12-26-2004, 09:46 AM

Tags for this Thread


1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21