[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
unwanted implicit rule
From: |
Nicholas Leippe |
Subject: |
unwanted implicit rule |
Date: |
Wed, 04 Jul 2001 13:17:12 -0700 |
Hello,
I'm attempting to add rules to a Makefile to handle
QT Designer .ui files. The dependencies are as follows:
foo.ui (the source file created by QT Designer)
foo.ui.h <- foo.ui (my own rule)
foo.ui.cpp <- foo.ui.h (my own rule)
foo.ui.moc.cpp <- foo.ui.h (my own rule)
foo.ui.o <- foo.ui.cpp (implicit %.o:%.cpp)
foo.ui.moc.o <- foo.ui.moc.cpp (implicit %.o:%.cpp)
so, my rules are:
%.moc.cpp: %.h
moc $< -o $@
%.ui.h: %.ui
uic -o %@ $<
%.ui.cpp: %.ui.h
uic -o $@ -impl $< $(patsubst %.ui.h,%.ui,$<)
however, when I run, it creates the following implicit
dependency:
# Not a target:
src/simple.ui: src/simple.ui.o
# Implicit rule search has been done.
# Implicit/static pattern stem: `src/simple.ui'
# Last modified 2001-07-04 01:47:16
# File has not been updated.
# No variables.
# commands to execute (built-in):
$(LINK.o) $^ $(LOADLIBES) $(LDLIBS) -o $@
thus creating a circular dependency:
simple.ui <- simple.ui.o <- simple.ui.cpp <- simple.ui.h <- simple.ui
This wouldn't be a problem if it didn't choose to drop
the wrong one. It drops the
simple.ui.o <- simple.ui.cpp
dependency which fails with:
make: Circular src/simple.ui.o <- src/simple.ui.cpp dependency dropped.
g++ -O3 -march=i686 -I/usr/local/qt/include -Isrc -c -o src/simple.ui.o
g++: No input files
make: *** [src/simple.ui.o] Error 1
rather than dropping the
simple.ui <- simple.ui.o
dependency leaving the graph in a state which is
impossible to find an implicit rule chain to build from.
I have no idea how this is happening, nor what hat it's
pulling the command for the rule from. In an attempt to
get rid of it, I tried adding an empty implicit pattern rule:
%.ui: %.ui.o
which according to the info page should disable any
other implicit rule for the pattern. But, this
doesn't seem to have any affect. Any ideas?
Nick