You are not logged in.

jjdenboer

Beginner

  • "jjdenboer" is male
  • "jjdenboer" started this thread

Posts: 11

Location: Netherlands

Occupation: Information Analist

  • Send private message

1

Tuesday, September 6th 2005, 8:38am

makefile is looping for generating makefile

Hi,

I have some problems generating the Makefile from demo.pro. Everytime I change someting in my project the makefile is looping to generate the Makefile.

I am using qt 3.3.4 on redhat linux 8.0

qmake -o Makefile demo.pro
qmake -o Makefile demo.pro
qmake -o Makefile demo.pro
qmake -o Makefile demo.pro

this will loop forever. I see in the makefile that by rule all

all: Makefile $(TARGET).

How to solve this problem

Thanks

Johan

2

Tuesday, September 6th 2005, 9:23am

Can you give us the demo.pro code ?

It should help!

Guilugi.

jjdenboer

Beginner

  • "jjdenboer" is male
  • "jjdenboer" started this thread

Posts: 11

Location: Netherlands

Occupation: Information Analist

  • Send private message

3

Tuesday, September 6th 2005, 9:38am

Here is my demo.pro


TEMPLATE = app
LANGUAGE = C++

CONFIG += qt warn_on release

LIBS += -L/opt/omniORB/lib -L/home/jdb/ticketing/Components/lib -lomniORB4 -lsalescorbaclient -lomnithread -lpthread -lbusinessobjects -ldomainobjects -lserializerobjects -lnsutil -ltinyxml

DEFINES += TIXML_USE_STL

INCLUDEPATH += /opt/omniORB/include /home/jdb/ticketing/Components/include

HEADERS += kaart.h

SOURCES += main.cpp \
kaart.cpp

FORMS = mainform.ui

unix {
UI_DIR = .ui
MOC_DIR = .moc
OBJECTS_DIR = .obj
}


regards

Johan

4

Tuesday, September 6th 2005, 10:24am

Strange,
I don't see anything wrong in this file...
Maybe add a line like this:
TARGET = demo

You know, if you're in the directory that contains demo.pro, you just have to type 'qmake'

Guilugi.

jjdenboer

Beginner

  • "jjdenboer" is male
  • "jjdenboer" started this thread

Posts: 11

Location: Netherlands

Occupation: Information Analist

  • Send private message

5

Tuesday, September 6th 2005, 10:42am

Hi,

typing qmake fixes the problem. Thanks

Johan

jjdenboer

Beginner

  • "jjdenboer" is male
  • "jjdenboer" started this thread

Posts: 11

Location: Netherlands

Occupation: Information Analist

  • Send private message

6

Tuesday, September 6th 2005, 12:49pm

Sorry,

still not working

jacek

Master

  • "jacek" is male

Posts: 2,729

Location: Warsaw, Poland

  • Send private message

7

Tuesday, September 6th 2005, 12:55pm

Maybe make can't modify Makefile? Also check the modification time of the .pro file.

jjdenboer

Beginner

  • "jjdenboer" is male
  • "jjdenboer" started this thread

Posts: 11

Location: Netherlands

Occupation: Information Analist

  • Send private message

8

Tuesday, September 6th 2005, 1:15pm

No, I have write permissions on all files. Every time I change something the makefile is trying to generate the new makefile because of the rule :

all : Makefile $(TARGET)

I do not understand why this rule is created with Makefile as one of the targets. I think this is a bug in qmake. Anyone know of this bug, or feature :)

Johan

jacek

Master

  • "jacek" is male

Posts: 2,729

Location: Warsaw, Poland

  • Send private message

9

Tuesday, September 6th 2005, 1:30pm

Quoted

Originally posted by jjdenboer
I do not understand why this rule is created with Makefile as one of the targets.

You need this rule, because you need a new Makefile every time you change your .pro file.

Quoted

I think this is a bug in qmake. Anyone know of this bug, or feature.

On my system qmake adds the same rule and everything works OK. There must be something wrong with your make or file modification times.

jjdenboer

Beginner

  • "jjdenboer" is male
  • "jjdenboer" started this thread

Posts: 11

Location: Netherlands

Occupation: Information Analist

  • Send private message

10

Tuesday, September 6th 2005, 1:48pm

Yes you are right. Something strange is going on. The file changed has the same date/time as my system date/time but the makefile generated by qmake is different (about 4 minutes before current time). Seems that qmake writes a Makefile with the wrong date/time.

Johan

dimitri

Professional

  • "dimitri" is male

Posts: 1,311

Occupation: Engineer

  • Send private message

11

Tuesday, September 6th 2005, 1:50pm

If the *.pro file has been modified, the Makefile indeed attempts to rebuild itself. That's by design and not a bug.

Now the question is why make is looping endlessly? Have you checked the modification time of the *.pro file?

Which Linux distribution is this? Red Hat 8.0?

jjdenboer

Beginner

  • "jjdenboer" is male
  • "jjdenboer" started this thread

Posts: 11

Location: Netherlands

Occupation: Information Analist

  • Send private message

12

Tuesday, September 6th 2005, 1:53pm

Yes I use redhat 8.0 and qt 3.3.4. The modification time of the generated Makefile is about 4 minutes before the system date/time. The changed sources have the same date/time as the system time. I am wondering why the Makefile has an old date/time stamp.

Johan

dimitri

Professional

  • "dimitri" is male

Posts: 1,311

Occupation: Engineer

  • Send private message

13

Tuesday, September 6th 2005, 2:07pm

Is this an NFS-mounted disk?

  • "wysota" is male

Posts: 4,276

Location: Warsaw, POLAND

  • Send private message

14

Tuesday, September 6th 2005, 2:42pm

What if you call touch on the Makefile? Does its modification time get updated correctly?

jjdenboer

Beginner

  • "jjdenboer" is male
  • "jjdenboer" started this thread

Posts: 11

Location: Netherlands

Occupation: Information Analist

  • Send private message

15

Tuesday, September 6th 2005, 3:53pm

yes

jjdenboer

Beginner

  • "jjdenboer" is male
  • "jjdenboer" started this thread

Posts: 11

Location: Netherlands

Occupation: Information Analist

  • Send private message

16

Tuesday, September 6th 2005, 3:54pm

yes the files are on a nfs mount point

dimitri

Professional

  • "dimitri" is male

Posts: 1,311

Occupation: Engineer

  • Send private message

17

Tuesday, September 6th 2005, 4:35pm

It looks like NFS is not properly configured - the server is probably lagging 4 minutes behind.
Talk to your sysadmin.

jjdenboer

Beginner

  • "jjdenboer" is male
  • "jjdenboer" started this thread

Posts: 11

Location: Netherlands

Occupation: Information Analist

  • Send private message

18

Wednesday, September 7th 2005, 5:41am

Hi,

Yes you are right. We fix the date/time on the server. Hope this will help. Thanks a lot

Johan