[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Gnu make-isms
From: |
Angus Leeming |
Subject: |
Gnu make-isms |
Date: |
Wed, 03 Dec 2003 12:21:18 +0000 |
User-agent: |
KNode/0.7.1 |
Hello all,
this might sound like a strange thing to ask on this list, but I'd
like to remove some gnu make-isms from the Makefiles I'm maintaining.
Usual reason I guess: not everybody uses gnu make. The changes I'd
like to make are to the build rules for 'unusual' sources.
For example, this
%.C: %.fd
$(SHELL) $(SCRIPT) $<
gets written in standard make syntax as
.SUFFIXES: .fd .C
.fd.C:
$(SHELL) $(SCRIPT) $<
and in Makefile.am as
SUFFIX = .C .fd
.fd.C:
$(SHELL) $(SCRIPT) $<
All well and good. However, I am stumped with what to do with this:
%.h: %.ui
$(UIC) $(UICFLAGS) $< -o $@
%.C: %.h %.ui
$(UIC) $(UICFLAGS) -impl $^ -o $@
Fixing the top line is easy --- same as above. However, the second
rule is more complex and I'm stuck. It seems that there are three
issues here:
1. The .C file depends on the .ui file '%.C: %.ui' -> '.ui.C:'
2. The .C file also depends on the .h file -> '.ui.C: $*.h' ???
3. '$^' in the build rule. The line above expands to:
/usr/local/kde/qt/bin/uic -tr qt_ -impl QMathDialogBase.h
../../../../../src/frontends/qt2/ui/QMathDialogBase.ui -o
QMathDialogBase.C
so, somehow '$^' is expanded to 'QMathDialogBase.h
../../../../../src/frontends/qt2/ui/QMathDialogBase.ui'
Ie, it is probably equivalent to somethng like '$*.h $<' but I haven't
got this to work yet.
Any pointers?
Many thanks,
Angus
- Gnu make-isms,
Angus Leeming <=