Ignore:
Timestamp:
Apr 8, 2008, 7:30:23 PM (16 years ago)
Author:
garnier
Message:

modif depuis que mon mac a plante : mise a jour des moc en mieux

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/geant4/config/common.gmk

    r758 r761  
    1 # $Id: common.gmk,v 1.50 2008/03/19 10:55:47 lgarnier Exp $
     1# $Id: common.gmk,v 1.51 2008/04/04 10:35:20 gcosmo Exp $
    22# ----------------------------------------------------------------
    33# Common part of GNUmakefile for libraries.  John Allison, 5/7/95.
     
    55# Libraries are created according to G4SYSTEM. G.Cosmo, 11/6/96.
    66# Introduced G4LIBDIR and G4TMPDIR. G.Cosmo, 23/6/98.
    7 # Introduced Qt moc rule, L.Garnier 15/2/08.
    87
    98ifndef G4LIBDIR
     
    1211G4TMPDIR := $(G4TMP)/$(G4SYSTEM)/$(name)
    1312
    14 moc_inc = $(shell grep -l "Q_OBJECT" include/*.hh )
    15 moc_files := $(patsubst include/%.hh, src/%_moc.cc, $(moc_inc))
    16 
    17 
    18 ifeq ($(G4INTY_BUILD_QT),)
    19   # not so beautiful. In therory we should only remove theses files from sources
    20   sources := $(shell rm -f $(moc_files))
    21   sources := $(wildcard src/*.cc)
    22 endif
     13sources := $(wildcard src/*.cc)
    2314
    2415ifneq ($(G4INTY_BUILD_QT),)
    25   sources := $(wildcard src/*.cc)
    26   sources += $(moc_files)
     16  sources += $(moc_sources)
    2717endif
    28 
    2918
    3019objects := $(patsubst src/%.cc,$(G4TMPDIR)/%.o,$(sources))
     
    7665endif
    7766
    78 ###############################################################################
    79 #
    80 # Actual moc files for Qt files
    81 #
    82 # moc sources and headers: used for Qt signal/slot
    83 # - all headers which use signals/slots have the macro "Q_OBJECT" present
    84 #   in the class definitions; these all need to be processed by the
    85 #   "meta object compiler (moc)" which generates extra source code to
    86 #   implement the signal/slots, i.e., if "foo.h" contains the token "Q_OBJECT"
    87 #   it will be used by moc to generate the file "foo_moc.cpp" (the _moc. is
    88 #   just an arbitrary extension to make it easier to identify sources
    89 #   generated by moc).
    90 
    91 ifneq ($(G4INTY_BUILD_QT),)
    92 src/%_moc.cc: include/%.hh
    93         @echo Making moc file for $< ...
    94         @if [ `$(QTHOME)/bin/moc -v 2>&1 | grep "Qt 3" | wc -l ` -gt 0 ]; then \
    95         $(QTMOC) -o $@ $<;\
    96         else $(QTMOC) $(MOC_MACRO) -o $@ $<; \
    97         fi;
    98 endif
    99 
    10067
    10168###############################################################################
     
    11481# .PHONY targets are executed regardless of time-stamp of any file of
    11582# same name.
    116 .PHONY: all moc_inc obj lib clean clean_libs includes
     83.PHONY: all obj lib clean clean_libs includes
    11784
    11885obj: $(G4TMPDIR)/obj.last
Note: See TracChangeset for help on using the changeset viewer.