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[ 10.6 ] [ 10.6.p1 ] [ 10.6.p2 ] [ 10.6.p3 ] [ 10.7 ] [ 10.7.p1 ] [ 10.7.p2 ] [ 10.7.p3 ] [ 10.7.p4 ] [ 11.0 ] [ 11.0.p1 ] [ 11.0.p2 ] [ 11.0.p3, ] [ 11.0.p4 ] [ 11.1 ] [ 11.1.1 ] [ 11.1.2 ] [ 11.1.3 ] [ 11.2 ] [ 11.2.1 ] [ 11.2.2 ] [ 11.3.0 ]

Diff markup

Differences between /config/moc.gmk (Version 11.3.0) and /config/moc.gmk (Version 10.0.p1)


                                                   >>   1 # $Id: moc.gmk 66368 2012-12-18 09:20:17Z gcosmo $
  1 # --------------------------------------------      2 # ----------------------------------------------------------------
  2 # Common part of GNUmakefile for libraries.  J      3 # Common part of GNUmakefile for libraries.  John Allison, 5/7/95.
  3 # --------------------------------------------      4 # ----------------------------------------------------------------
  4 # Libraries are created according to G4SYSTEM.      5 # Libraries are created according to G4SYSTEM. G.Cosmo, 11/6/96.
  5 # Introduced G4LIBDIR and G4TMPDIR. G.Cosmo, 2      6 # Introduced G4LIBDIR and G4TMPDIR. G.Cosmo, 23/6/98.
  6 # Introduced Qt moc rule, L.Garnier 16/2/08.        7 # Introduced Qt moc rule, L.Garnier 16/2/08.
  7                                                     8 
  8 ifndef G4LIBDIR                                     9 ifndef G4LIBDIR
  9   G4LIBDIR := $(G4LIB)/$(G4SYSTEM)                 10   G4LIBDIR := $(G4LIB)/$(G4SYSTEM)
 10 endif                                              11 endif
 11 G4TMPDIR := $(G4TMP)/$(G4SYSTEM)/$(name)           12 G4TMPDIR := $(G4TMP)/$(G4SYSTEM)/$(name)
 12                                                    13 
 13 ifneq ($(G4INTY_BUILD_QT),)                        14 ifneq ($(G4INTY_BUILD_QT),)
 14   moc_inc := $(shell ($(GREP) -l "Q_OBJECT" in     15   moc_inc := $(shell ($(GREP) -l "Q_OBJECT" include/*.hh))
 15   moc_sources := $(patsubst include/%.hh, moc/     16   moc_sources := $(patsubst include/%.hh, moc/%_moc.cc, $(moc_inc))
 16   moc_objects := $(patsubst moc/%_moc.cc,$(G4T     17   moc_objects := $(patsubst moc/%_moc.cc,$(G4TMPDIR)/%_moc.o,$(moc_sources))
 17   moc_dependencies := $(patsubst moc/%_moc.cc,     18   moc_dependencies := $(patsubst moc/%_moc.cc,$(G4TMPDIR)/%_moc.d,$(moc_sources))
 18 endif                                              19 endif
 19                                                    20 
 20                                                    21 
 21 ##############################################     22 ###############################################################################
 22 #                                                  23 #
 23 # Actual moc files for Qt files                    24 # Actual moc files for Qt files
 24 #                                                  25 #
 25 # moc sources and headers: used for Qt signal/     26 # moc sources and headers: used for Qt signal/slot 
 26 # - all headers which use signals/slots have t     27 # - all headers which use signals/slots have the macro "Q_OBJECT" present
 27 #   in the class definitions; these all need t     28 #   in the class definitions; these all need to be processed by the
 28 #   "meta object compiler (moc)" which generat     29 #   "meta object compiler (moc)" which generates extra source code to
 29 #   implement the signal/slots, i.e., if "foo.     30 #   implement the signal/slots, i.e., if "foo.h" contains the token "Q_OBJECT"
 30 #   it will be used by moc to generate the fil     31 #   it will be used by moc to generate the file "foo_moc.cpp" (the _moc. is
 31 #   just an arbitrary extension to make it eas     32 #   just an arbitrary extension to make it easier to identify sources
 32 #   generated by moc).                             33 #   generated by moc).
 33                                                    34 
 34                                                    35 
 35 ifneq ($(G4INTY_BUILD_QT),)                        36 ifneq ($(G4INTY_BUILD_QT),)
 36 $(G4TMPDIR)/%_moc.d: moc/%_moc.cc                  37 $(G4TMPDIR)/%_moc.d: moc/%_moc.cc
 37   @echo Making dependency for moc file $< ...      38   @echo Making dependency for moc file $< ...
 38   @if [ ! -d $(G4TMPDIR) ] ; then mkdir -p $(G     39   @if [ ! -d $(G4TMPDIR) ] ; then mkdir -p $(G4TMPDIR)  ;fi
 39   @set -e;\                                        40   @set -e;\
 40   g++ $(GPPFLAGS) $(CPPFLAGS) -w -xc++ $< |\       41   g++ $(GPPFLAGS) $(CPPFLAGS) -w -xc++ $< |\
 41   sed 's!$*\.o!$(G4TMPDIR)/& $@!' >$@;\            42   sed 's!$*\.o!$(G4TMPDIR)/& $@!' >$@;\
 42   [ -s $@ ] || rm -f $@                            43   [ -s $@ ] || rm -f $@
 43                                                    44 
 44 moc/%_moc.cc: include/%.hh                         45 moc/%_moc.cc: include/%.hh
 45   @echo Making moc file for $< ...                 46   @echo Making moc file for $< ...
 46   @if [ ! -d moc ] ; then mkdir -p moc  ;fi        47   @if [ ! -d moc ] ; then mkdir -p moc  ;fi
 47   @if [ `$(QTMOC) -v 2>&1 | $(GREP) "Qt 3" | w     48   @if [ `$(QTMOC) -v 2>&1 | $(GREP) "Qt 3" | wc -l ` -gt 0 ]; then \
 48   $(QTMOC) -o $@ $<;\                              49   $(QTMOC) -o $@ $<;\
 49   else $(QTMOC) $(MOC_MACRO) -o $@ $<; \           50   else $(QTMOC) $(MOC_MACRO) -o $@ $<; \
 50   fi;                                              51   fi;
 51                                                    52 
 52 # could be better if we not duplicate this rul     53 # could be better if we not duplicate this rule from common.gmk...
 53 $(G4TMPDIR)/%_moc.o: moc/%_moc.cc                  54 $(G4TMPDIR)/%_moc.o: moc/%_moc.cc
 54   @echo Compiling $*.cc ...                        55   @echo Compiling $*.cc ...
 55 ifdef CPPVERBOSE                                   56 ifdef CPPVERBOSE
 56   @echo Compiling moc file $*.cc ...               57   @echo Compiling moc file $*.cc ...
 57   $(CXX) $(CXXFLAGS) $(CPPFLAGS) -c $(OUT_OBJ)     58   $(CXX) $(CXXFLAGS) $(CPPFLAGS) -c $(OUT_OBJ)$(G4TMPDIR)/$(*F)_moc.o moc/$*_moc.cc
 58 else                                               59 else
 59   @$(CXX) $(CXXFLAGS) $(CPPFLAGS) -c $(OUT_OBJ     60   @$(CXX) $(CXXFLAGS) $(CPPFLAGS) -c $(OUT_OBJ)$(G4TMPDIR)/$(*F)_moc.o moc/$*_moc.cc
 60 endif                                              61 endif
 61 endif                                              62 endif