# $Id$ # # common rules for compilation of Qt's uic-generated cpp files generated from header files. # # this file is automatically included if UIC is set # # Variables: # # srcdir ... source directory. # UIC ... The path of the uic binary. use uic-qt4 to be save when qt3-dev is installed, too. # UICFILES ... list of .ui files to preproces using uic. # MOC ... The path of the moc binary. use moc-qt4 to be save when qt3-dev is installed, too. # UICTRFUNC ... optional, an alternate tr(anslation) function for uic's -tr option. # # UICTRFUNC hints: # # 1. the aprorpriate header must be included in the .ui files like this: # # myi18n.h # # Do not use , because this is disabled in debian's qt3-dev-tools, # see http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=410642 # # 2. to be recognized by common-gettext.mk your function must look like one of these: # QString qs_$(I18N_PFX)_i18n(const char *msg) # QString qs_$(I18N_PFX)_i18n_c(const char *msg) # UICHEADERS=$(addprefix ui_,$(addsuffix .h,$(basename $(UICFILES)))) UICDEPENDS=$(addsuffix .d,$(basename $(UICHEADERS))) #OBJS:=$(UICHEADERS) #DEPENDS:=$(DEPENDS) $(UICDEPENDS) ifeq ($(UICTRFUNC),) UICOPTIONS= else UICOPTIONS=-tr $(UICTRFUNC) endif ui_%.h: $(srcdir)/%.ui $(UIC4) $< -o $@ ifneq ($(UICHEADERS),) install-dev:: $(UICHEADERS) mkdir -p $(HEADERDESTDIR) install -m 644 -p $(UICHEADERS) $(HEADERDESTDIR) endif clean:: rm -f $(UICHEADERS)