[Top][All Lists]

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

My rule doesn't seem to work

From: Bobby Dill
Subject: My rule doesn't seem to work
Date: Wed, 30 Jul 2008 14:02:25 -0700
User-agent: KMail/1.9.7

I have figured out how to compile qt-3.x programs using autotools with one 
exception. qmake makes a file called image_collection which takes .png files 
and combines them into one cpp file. It uses the command:

uic -embed appname image1.png image2.png -o image_collection

I tried writing the rule as follows:

%.cpp: %.png
        uic -embed $(bin_PROGRAMS) $< -o $@
images_PNG = designer_iconview.png
image_collection.cpp: $(images_PNG)

When I compile, I get this message
make[2]: *** No rule to make target `designer_iconview.png', needed by `all'.  
I'm using the example application colortool for testing. Here's the entire 
bin_PROGRAMS = colortool
%.cpp: %.png
        uic -embed $(bin_PROGRAMS) $< -o $@
%.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 $@

mainform_UI = \
        mainform.h \

mainform.h: mainform.ui
mainform.cpp: mainform.ui mainform.h

images_PNG = designer_iconview.png
image_collection.cpp: $(images_PNG)

colortool_SOURCES = main.cpp mainform.ui.h image_collection.cpp
nodist_colortool_SOURCES = moc_mainform.cpp $(mainform_UI)
BUILT_SOURCES = $(images_PNG) $(mainform_UI)

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

# the library search path.
colortool_LDFLAGS = $(all_libraries) -L$(QTDIR)/lib

CLEANFILES = $(nodist_colortool_SOURCES)

What have I down wrong and how can I fix it?

reply via email to

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