Trolltech Home | Qt-interest Home | Recent Threads | All Threads | Author | Date
All threads index page 1

Qt-interest Archive, May 2008
Autotools and qt a major annoyance


Message 1 in thread

All I want to do is get my *.ui files to compile. The problem is that I
can't list sources generated from the *.ui files in my automake scripts
because they don't exist yet. BUILT_SOURCES does not help solve this
problem. Here is the my Makefile.am for the qt project.
METASOURCES = AUTO

bin_PROGRAMS = pkgmaker

%.h: %.ui
    $(UIC) -o $@ $<
%.cpp: %.ui
    $(UIC) -o $@ -impl $*.h $<
# This rule lets GNU make create any moc_*.cpp from the equivalent *.h
# You have one .h file, it's called myapp.h. Therefore, here I list
# its mocced name, moc_myapp.cpp.
moc_%.cpp: %.h
    moc $< -o $@

pkgmaker_UI =
    sigcreatedlg.h
    sigcreatedlg.cpp

sigcreatedlg.h: sigcreatedlg.ui
sigcreatedlg.cpp: sigcreatedlg.ui sigcreatedlg.h

pkgmaker_SOURCES = pkgmaker.cpp $(pkgmaker_UI)
# The pkgmaker_UI target should be build first, but it isn't
BUILT_SOURCES = $(pkgmaker_UI)

# set the include path found by configure
INCLUDES= $(all_includes)

# the library search path.
pkgmaker_LDFLAGS = $(all_libraries)
pkgmaker_LDADD = $(QT_LDADD) ../dirlist/libdirlist.la

The commands I use to compile the app are autoreconf, configure and make. I
do not understand why automake does not generate my *.h and *.cpp files from
my *.ui file first when it seems very clear that pkgmaker.cpp depends on
these. Is there a way around this?

Message 2 in thread

Bobby Dill wrote:
>METASOURCES = AUTO
[snip]
> The commands I use to compile the app are autoreconf, configure and
> make. I do not understand why automake does not generate my *.h and
> *.cpp files from my *.ui file first when it seems very clear that
> pkgmaker.cpp depends on these. Is there a way around this?

That first line in your Makefile.am indicates that it's not pure 
Autoconf/Automake. That line indicates your target is post-processed by 
am_edit.pl from the KDE sources.

So, don't use autoreconf. Use the following command:
	make -f Makefile.cvs

The Makefile.cvs and the admin/ dir you can get in any KDE package as well 
as from the Subversion server.

In time: please upgrade to Qt4. When doing that, dump autotools for qmake 
or CMake.

-- 
 [ signature omitted ] 

Attachment: signature.asc
Description: This is a digitally signed message part.


Message 3 in thread

On Sunday 04 May 2008 01:09:16 pm Thiago Macieira wrote:
> Bobby Dill wrote:
> >METASOURCES = AUTO
>
> [snip]
>
> > The commands I use to compile the app are autoreconf, configure and
> > make. I do not understand why automake does not generate my *.h and
> > *.cpp files from my *.ui file first when it seems very clear that
> > pkgmaker.cpp depends on these. Is there a way around this?
>
> That first line in your Makefile.am indicates that it's not pure
> Autoconf/Automake. That line indicates your target is post-processed by
> am_edit.pl from the KDE sources.
>
> So, don't use autoreconf. Use the following command:
> 	make -f Makefile.cvs
>
> The Makefile.cvs and the admin/ dir you can get in any KDE package as well
> as from the Subversion server.
>
> In time: please upgrade to Qt4. When doing that, dump autotools for qmake
> or CMake.


Thank you, I tried removing the METASOURCES = AUTO from my Makefile.am, but it 
still does not generate my source files from my forms first and then 
complains about their non existence. At this point, I'm just trying to get 
autotools to work as advertised, but it seems very difficult to do. Is there 
perhaps another reason why autotools is not generating my source files first. 
Here is the Makefile.am once again.
bin_PROGRAMS = pkgmaker

%.h: %.ui
	$(UIC) -o $@ $<
%.cpp: %.ui
	$(UIC) -o $@ -impl $*.h $<
# This rule lets GNU make create any moc_*.cpp from the equivalent *.h
# You have one .h file, it's called myapp.h. Therefore, here I list
# its mocced name, moc_myapp.cpp.
moc_%.cpp: %.h
	moc $< -o $@

pkgmaker_UI =
	sigcreatedlg.h
	sigcreatedlg.cpp

sigcreatedlg.h: sigcreatedlg.ui
sigcreatedlg.cpp: sigcreatedlg.ui sigcreatedlg.h

pkgmaker_SOURCES = pkgmaker.cpp $(pkgmaker_UI)
BUILT_SOURCES = $(pkgmaker_UI)

# set the include path found by configure
INCLUDES= $(all_includes)

# the library search path.
pkgmaker_LDFLAGS = $(all_libraries) 
pkgmaker_LDADD =  ../dirlist/libdirlist.la

--
 [ signature omitted ] 

Message 4 in thread

Hi,

It seems to me that this question would have a better chance of getting a 
usefull answer on the autotools lists. I don't think autotools are supported 
by Trolltech; they did not make qmake for nothing. Of course it is possible 
to build qt programs with autotools though.

André

"Bobby Dill" <binarybob0010@xxxxxxxxx> schreef in bericht 
news:200805101008.33215.binarybob0010@xxxxxxxxxxxx
> On Sunday 04 May 2008 01:09:16 pm Thiago Macieira wrote:
>> Bobby Dill wrote:
>> >METASOURCES = AUTO
>>
>> [snip]
>>
>> > The commands I use to compile the app are autoreconf, configure and
>> > make. I do not understand why automake does not generate my *.h and
>> > *.cpp files from my *.ui file first when it seems very clear that
>> > pkgmaker.cpp depends on these. Is there a way around this?
>>
>> That first line in your Makefile.am indicates that it's not pure
>> Autoconf/Automake. That line indicates your target is post-processed by
>> am_edit.pl from the KDE sources.
>>
>> So, don't use autoreconf. Use the following command:
>> make -f Makefile.cvs
>>
>> The Makefile.cvs and the admin/ dir you can get in any KDE package as 
>> well
>> as from the Subversion server.
>>
>> In time: please upgrade to Qt4. When doing that, dump autotools for qmake
>> or CMake.
>
>
> Thank you, I tried removing the METASOURCES = AUTO from my Makefile.am, 
> but it
> still does not generate my source files from my forms first and then
> complains about their non existence. At this point, I'm just trying to get
> autotools to work as advertised, but it seems very difficult to do. Is 
> there
> perhaps another reason why autotools is not generating my source files 
> first.
> Here is the Makefile.am once again.
> bin_PROGRAMS = pkgmaker
>
> %.h: %.ui
> $(UIC) -o $@ $<
> %.cpp: %.ui
> $(UIC) -o $@ -impl $*.h $<
> # This rule lets GNU make create any moc_*.cpp from the equivalent *.h
> # You have one .h file, it's called myapp.h. Therefore, here I list
> # its mocced name, moc_myapp.cpp.
> moc_%.cpp: %.h
> moc $< -o $@
>
> pkgmaker_UI =
> sigcreatedlg.h
> sigcreatedlg.cpp
>
> sigcreatedlg.h: sigcreatedlg.ui
> sigcreatedlg.cpp: sigcreatedlg.ui sigcreatedlg.h
>
> pkgmaker_SOURCES = pkgmaker.cpp $(pkgmaker_UI)
> BUILT_SOURCES = $(pkgmaker_UI)
>
> # set the include path found by configure
> INCLUDES= $(all_includes)
>
> # the library search path.
> pkgmaker_LDFLAGS = $(all_libraries)
> pkgmaker_LDADD =  ../dirlist/libdirlist.la
>
> --
> To unsubscribe - send a mail to qt-interest-request@xxxxxxxxxxxxx with 
> "unsubscribe" in the subject or the body.
> List archive and information: http://lists.trolltech.com/qt-interest/ 

--
 [ signature omitted ] 

Message 5 in thread

On Saturday 10 May 2008 02:45:50 pm André Somers wrote:
> Hi,
>
> It seems to me that this question would have a better chance of getting a
> usefull answer on the autotools lists. I don't think autotools are
> supported by Trolltech; they did not make qmake for nothing. Of course it
> is possible to build qt programs with autotools though.
>
> André
>
> "Bobby Dill" <binarybob0010@xxxxxxxxx> schreef in bericht
> news:200805101008.33215.binarybob0010@xxxxxxxxxxxx
>
> > On Sunday 04 May 2008 01:09:16 pm Thiago Macieira wrote:
> >> Bobby Dill wrote:
> >> >METASOURCES = AUTO
> >>
> >> [snip]
> >>
> >> > The commands I use to compile the app are autoreconf, configure and
> >> > make. I do not understand why automake does not generate my *.h and
> >> > *.cpp files from my *.ui file first when it seems very clear that
> >> > pkgmaker.cpp depends on these. Is there a way around this?
> >>
> >> That first line in your Makefile.am indicates that it's not pure
> >> Autoconf/Automake. That line indicates your target is post-processed by
> >> am_edit.pl from the KDE sources.
> >>
> >> So, don't use autoreconf. Use the following command:
> >> make -f Makefile.cvs
> >>
> >> The Makefile.cvs and the admin/ dir you can get in any KDE package as
> >> well
> >> as from the Subversion server.
> >>
> >> In time: please upgrade to Qt4. When doing that, dump autotools for
> >> qmake or CMake.
> >
> > Thank you, I tried removing the METASOURCES = AUTO from my Makefile.am,
> > but it
> > still does not generate my source files from my forms first and then
> > complains about their non existence. At this point, I'm just trying to
> > get autotools to work as advertised, but it seems very difficult to do.
> > Is there
> > perhaps another reason why autotools is not generating my source files
> > first.
> > Here is the Makefile.am once again.
> > bin_PROGRAMS = pkgmaker
> >
> > %.h: %.ui
> > $(UIC) -o $@ $<
> > %.cpp: %.ui
> > $(UIC) -o $@ -impl $*.h $<
> > # This rule lets GNU make create any moc_*.cpp from the equivalent *.h
> > # You have one .h file, it's called myapp.h. Therefore, here I list
> > # its mocced name, moc_myapp.cpp.
> > moc_%.cpp: %.h
> > moc $< -o $@
> >
> > pkgmaker_UI =
> > sigcreatedlg.h
> > sigcreatedlg.cpp
> >
> > sigcreatedlg.h: sigcreatedlg.ui
> > sigcreatedlg.cpp: sigcreatedlg.ui sigcreatedlg.h
> >
> > pkgmaker_SOURCES = pkgmaker.cpp $(pkgmaker_UI)
> > BUILT_SOURCES = $(pkgmaker_UI)
> >
> > # set the include path found by configure
> > INCLUDES= $(all_includes)
> >
> > # the library search path.
> > pkgmaker_LDFLAGS = $(all_libraries)
> > pkgmaker_LDADD =  ../dirlist/libdirlist.la
> >
> > --
> > To unsubscribe - send a mail to qt-interest-request@xxxxxxxxxxxxx with
> > "unsubscribe" in the subject or the body.
> > List archive and information: http://lists.trolltech.com/qt-interest/
>
> --
> To unsubscribe - send a mail to qt-interest-request@xxxxxxxxxxxxx with
> "unsubscribe" in the subject or the body. List archive and information:
> http://lists.trolltech.com/qt-interest/

I joined the autotools list, but there were people who directed me here, 
because I may come in contact with someone who uses autotools.  Anyways, the 
problem is that I did not put a "/" in front of the "pkgmaker_UI =" and after 
the sigcreatedlg.h line directly below it. Thank you for trying.

--
 [ signature omitted ]