make-w32
[Top][All Lists]
Advanced

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

How can I do this?


From: ma
Subject: How can I do this?
Date: Sun, 9 Jul 2006 10:29:41 +0100

Hello,

    I am building a make file for a development and I have a problem that I
couldn't find any solution for it:



I am writing a make file that will be used on several development. in each
development, there are a huge amount of file that needed to be built but
only a small part of them is changing and others are  not changing. I put
all of these files into a library. The idea is that when the user run make
file for the first time, it will create all of the source files and then
create library and copy somewhere in the system. On any other call to this
make file (maybe from some other directory that doesn't have  *.obj files
related to library in it), it checks if the lib exist, use it and if not
create it.



The problem is that I can create such makefile. Here are some tests that I
did:



1- If I write such as this:



c:\libplace\mylib.lib: $(mymodules)

    $(libcmd)  $(mymodules)



It will compile all modules when they can't find them (for example when make
is running from a subdirectory which doesn't have a copy of *.obj files in
it)



2- If I write something such as this:



c:\libplace\mylib.lib:

    $(libcmd) $(mymodules)



It is working well, but when the library doesn't exit, it doesn't make
modules and hence it can't create a library.



3- I even tried to do this:



c:\libplace\mylib.lib:

LIB_NOT_FOUND=true



ifeq ($(LIB_NOT_FOUND),true)

c:\libplace\mylib.lib: $(mymodules)

    $(libcmd)  $(mymodules)

endif





But it is working very similar to case one.



4-If I can write something such as this:



if  notexist(c:\mylibplace\mylib.lib)



c:\libplace\mylib.lib: $(mymodules)

    $(libcmd)  $(mymodules)

endif



Then it will solve my problem, but it seems there is no such function as
exist ( or notexist).



Is there any way that I can write this make file?

A sample is much appreciated.



Best regards









reply via email to

[Prev in Thread] Current Thread [Next in Thread]