make say 'mymakefile' is up to date, but it is not true.what to do? - Unix

This is a discussion on make say 'mymakefile' is up to date, but it is not true.what to do? - Unix ; hi all, i am working with eclipse 3.4 and in my workspace there some projects.recently i created a project with files from a local svn repository.Things seems to be good unless if i build the project, it wont compile and ...

+ Reply to Thread
Results 1 to 12 of 12

Thread: make say 'mymakefile' is up to date, but it is not true.what to do?

  1. make say 'mymakefile' is up to date, but it is not true.what to do?

    hi all,

    i am working with eclipse 3.4 and in my workspace there some
    projects.recently i created a project with files from a local svn
    repository.Things seems to be good unless if i build the project, it
    wont compile and in console i get the message " Nothing to be done for
    `all'.".
    I tried to make the makefile inside the project directory by executing
    the make command by hand :

    /home/me/workspace/myprj/make

    but what i got was the same result:

    make: 'myso.so' is up to date. after some try i reach the point if i
    remove 'myso.so' file from the project directory make will compile my
    project else it wont compile it and we have the above history!!!

    please help me in order to solve the problem.

    thanks in advance,
    Behzad

  2. Re: make say 'mymakefile' is up to date, but it is not true.what to do?

    Behzad wrote:
    > i am working with eclipse 3.4 and in my workspace there some
    > projects.recently i created a project with files from a local svn
    > repository.Things seems to be good unless if i build the project, it
    > wont compile and in console i get the message " Nothing to be done for
    > `all'.".
    > I tried to make the makefile inside the project directory by executing
    > the make command by hand :


    > /home/me/workspace/myprj/make


    > but what i got was the same result:


    > make: 'myso.so' is up to date. after some try i reach the point if i
    > remove 'myso.so' file from the project directory make will compile my
    > project else it wont compile it and we have the above history!!!


    > please help me in order to solve the problem.


    I don't see the actual problem yet. One of the main points of
    using make is to avoid recompiling etc. stuff that already has
    been compiled. And thus getting a "Nothing to be done for `all'."
    message is just make's way of telling you that everything is
    fine. When you write that e.g. 'myso.so' gets re-made once you
    deleted the file (or moved it somewhere else) that looks like
    the correct behaviour of make - the 'myso.so' file was already
    up to date, so there was nothing to be done, but when you
    removed it make noticed that it's not there anymore and re-
    created it.

    Now, if make doesn't compile stuff even though you know that you
    made changed that require a re-compile than you have a broken
    Makefile (i.e. the dependencies aren't set up correctly). If
    that's the case you need to post a lot more of details about
    your project and the Makefile you're using.

    Regards, Jens
    --
    \ Jens Thoms Toerring ___ jt@toerring.de
    \__________________________ http://toerring.de

  3. Re: make say 'mymakefile' is up to date, but it is not true.what todo?

    > Now, if make doesn't compile stuff even though you know that you
    > made changed that require a re-compile than you have a broken
    > Makefile (i.e. the dependencies aren't set up correctly). If
    > that's the case you need to post a lot more of details about
    > your project and the Makefile you're using.

    Yes.event if i change my source code it does not re-compiles it which
    for me seems to be strange.My newly made project depends on two other
    projects.
    There is a bash scrip which at first recompiles 2 of the projects.They
    have no dependency at all.
    then there are makefiles for projects which have dependency on that 2
    projects.they all have the same structure in their makefiles except
    the source files names and directories are different.Of those, one re-
    compiles but one not and says " make: 'myso.so' is up to date.". Can
    you guess what happens and what is the problem?

    regards,
    Behzad


  4. Re: make say 'mymakefile' is up to date, but it is not true.what to ?do?

    Behzad wrote:
    > > Now, if make doesn't compile stuff even though you know that you
    > > made changed that require a re-compile than you have a broken
    > > Makefile (i.e. the dependencies aren't set up correctly). If
    > > that's the case you need to post a lot more of details about
    > > your project and the Makefile you're using.

    >
    > Yes.event if i change my source code it does not re-compiles it which
    > for me seems to be strange.My newly made project depends on two other
    > projects.
    > There is a bash scrip which at first recompiles 2 of the projects.They
    > have no dependency at all.
    > then there are makefiles for projects which have dependency on that 2
    > projects.they all have the same structure in their makefiles except
    > the source files names and directories are different.Of those, one re-
    > compiles but one not and says " make: 'myso.so' is up to date.". Can
    > you guess what happens and what is the problem?


    Sorry, but you lost me completely. I have no idea what exactly
    the term "project" is supposed to mean. I don't understand why
    you would use a bash script to compile something when you are
    using makefiles. What means "a project has no dependencies"?
    I also don't know what a "structure" in a makefile is etc.
    So, unfortunately, I am not in a position to make any guesses
    at all...
    Regards, Jens
    --
    \ Jens Thoms Toerring ___ jt@toerring.de
    \__________________________ http://toerring.de

  5. Re: make say 'mymakefile' is up to date, but it is not true.what to do?

    Behzad writes:
    >> Now, if make doesn't compile stuff even though you know that you
    >> made changed that require a re-compile than you have a broken
    >> Makefile (i.e. the dependencies aren't set up correctly). If
    >> that's the case you need to post a lot more of details about
    >> your project and the Makefile you're using.

    > Yes.event if i change my source code it does not re-compiles it which
    > for me seems to be strange.My newly made project depends on two other
    > projects.
    > There is a bash scrip which at first recompiles 2 of the projects.They
    > have no dependency at all.
    > then there are makefiles for projects which have dependency on that 2
    > projects.they all have the same structure in their makefiles except
    > the source files names and directories are different.Of those, one re-
    > compiles but one not and says " make: 'myso.so' is up to date.". Can
    > you guess what happens and what is the problem?


    You need to tell make that myso.so depends on some set of source
    files, which you apparently haven't.

  6. Re: make say 'mymakefile' is up to date, but it is not true.what to?do?

    sorry for confusion!

    this is a bash script i use to compile some projects.each project is a
    typical set of source files that have a separate makefile.


    make -f /home/myhome/workspace/myprj_1/Makefile
    make -f /home/myhome/workspace/myprj_2/Makefile
    make -f /home/myhome/workspace/myprj_3/Makefile
    make -f /home/myhome/workspace/myprj_4/Makefile

    myprj_1 & myprj_2 create 2 archive libraries ( e.g. something1.a &&
    something2.a ) which will be used in myprj_3 & myprj_4.(they )

    myprj_3 & myprj_4 have the same structures i.e. have the same
    dependencies.This is a brief overview of it.


    CXXFLAGS = -Wall -fpic -shared
    CC = gcc
    OBJS = utility.o queue.o LinkedList.o buzzer.o
    DIR = myprj_3
    WS = myhome
    FULLPATH = /home/$(WS)/workspace
    MYPRJ_1PATH = -I/home/$(WS)/workspace/myprj_1
    MYPRJ_2PATH= -I/home/$(WS)/workspace/myprj_2
    FILES= $(FULLPATH)/$(DIR)/file1.c $(FULLPATH)/$(DIR)/file2.c
    LIBS = $(FULLPATH)/myprj_1.a

    TARGET = myprj3.so

    $(TARGET):
    $(CC) $(MYPRJ_1PATH) $(MYPRJ_2PATH) $(CXXFLAGS) $(FILES) $(LIBS) -o $
    (FULLPATH)/$(DIR)/myprj3.so
    rm /home/$(WS)/workspace/finalpath/myprj3.so
    cp $(FULLPATH)/myprj3.so /home/$(WS)/workspace/finalpath/myprj3.so
    all: $(TARGET)

    clean:
    rm -f $(OBJS) $(TARGET)

    ************************************************** ************************************

    CXXFLAGS = -Wall -fpic -shared
    CC = gcc
    OBJS = utility.o queue.o LinkedList.o buzzer.o
    DIR = myprj_4
    WS = myhome
    FULLPATH = /home/$(WS)/workspace
    MYPRJ_1PATH = -I/home/$(WS)/workspace/myprj_1
    MYPRJ_2PATH= -I/home/$(WS)/workspace/myprj_2
    FILES= $(FULLPATH)/$(DIR)/file3.c $(FULLPATH)/$(DIR)/file4.c
    LIBS = $(FULLPATH)/myprj_1.a

    TARGET = myprj3.so

    $(TARGET):
    $(CC) $(MYPRJ_1PATH) $(MYPRJ_2PATH) $(CXXFLAGS) $(FILES) $(LIBS) -o $
    (FULLPATH)/$(DIR)/myprj4.so
    rm /home/$(WS)/workspace/finalpath/myprj4.so
    cp $(FULLPATH)/myprj4.so /home/$(WS)/workspace/finalpath/myprj4.so
    all: $(TARGET)

    clean:
    rm -f $(OBJS) $(TARGET)

    The bash script listed above compiles the prj1 & prj2 & prj4 but fail
    on prj3 i.e. event i change one file1.c or file2.c it does not
    recognize it.
    That's all!
    Any question?answer me please.

    regards,
    behzad

  7. Re: make say 'mymakefile' is up to date, but it is not true.what to ?do?

    Behzad writes:

    [...]

    > FILES= $(FULLPATH)/$(DIR)/file1.c $(FULLPATH)/$(DIR)/file2.c
    > LIBS = $(FULLPATH)/myprj_1.a
    >
    > TARGET = myprj3.so
    >
    > $(TARGET):
    > $(CC) $(MYPRJ_1PATH) $(MYPRJ_2PATH) $(CXXFLAGS) $(FILES) $(LIBS) -o $



    You need to tell make that myso.so depends on some set of source
    files, which you haven't.




  8. Re: make say 'mymakefile' is up to date, but it is not true.what to?do?

    maybe i am missing something.would you please tell what i am missing?
    i think by $(FILES) i have done it !!

  9. Re: make say 'mymakefile' is up to date, but it is not true.what to?do?

    maybe i am missing something.would you please tell what i am missing?
    i think by $(FILES) i have done it !!

  10. Re: make say 'mymakefile' is up to date, but it is not true.what to?do?

    maybe i am missing something.would you please tell what i am missing?
    i think by $(FILES) i have done it !!

  11. Re: make say 'mymakefile' is up to date, but it is not true.what to ??do?

    Behzad wrote:
    > maybe i am missing something.would you please tell what i am missing?
    > i think by $(FILES) i have done it !!


    You have

    > FILES= $(FULLPATH)/$(DIR)/file1.c $(FULLPATH)/$(DIR)/file2.c
    > LIBS = $(FULLPATH)/myprj_1.a
    >
    > TARGET = myprj3.so
    >
    > $(TARGET):
    > $(CC) $(MYPRJ_1PATH) $(MYPRJ_2PATH) $(CXXFLAGS) $(FILES) $(LIBS) -o $


    So you tell make that $(TARGET) doesn't depend on anything. But then
    it obviously depends on $(FILES) and also $(LIBS) since they are needed
    when you make it. So you might change that to

    $(TARGET): $(FILES) $(LIBS)

    That should force a re-make of $(TARGET) if either file1.c, file2.c
    or myprj_1.a are newer than the existing version of $(TARGET).

    Regards, Jens
    --
    \ Jens Thoms Toerring ___ jt@toerring.de
    \__________________________ http://toerring.de

  12. Re: make say 'mymakefile' is up to date, but it is not true.what to??do?

    On Aug 20, 7:48 pm, j...@toerring.de (Jens Thoms Toerring) wrote:
    > Behzad wrote:
    > > maybe i am missing something.would you please tell what i am missing?
    > > i think by $(FILES) i have done it !!

    >
    > You have
    >
    > > FILES= $(FULLPATH)/$(DIR)/file1.c $(FULLPATH)/$(DIR)/file2.c
    > > LIBS = $(FULLPATH)/myprj_1.a

    >
    > > TARGET = myprj3.so

    >
    > > $(TARGET):
    > > $(CC) $(MYPRJ_1PATH) $(MYPRJ_2PATH) $(CXXFLAGS) $(FILES) $(LIBS) -o $

    >
    > So you tell make that $(TARGET) doesn't depend on anything. But then
    > it obviously depends on $(FILES) and also $(LIBS) since they are needed
    > when you make it. So you might change that to
    >
    > $(TARGET): $(FILES) $(LIBS)
    >
    > That should force a re-make of $(TARGET) if either file1.c, file2.c
    > or myprj_1.a are newer than the existing version of $(TARGET).
    >
    > Regards, Jens
    > --
    > \ Jens Thoms Toerring ___ j...@toerring.de
    > \__________________________ http://toerring.de


    Thanks!
    it worked!

    best regards,
    Behzad

+ Reply to Thread