1# 2# $Id: UseMakeDissectorReg.cmake 33616 2010-07-22 12:18:36Z stig $ 3# 4MACRO(REGISTER_DISSECTOR_FILES _outputfile _registertype ) 5 # FIXME: Only the Python stuff has been implemented 6 # Make this into a MACRO, to avoid duplication with plugins/.../ 7 #register.c: $(plugin_src) $(ALL_DISSECTORS_SRC) $(top_srcdir)/tools/make-dissector-reg \ 8 # $(top_srcdir)/tools/make-dissector-reg.py 9 # @if test -n "$(PYTHON)"; then \ 10 # echo Making register.c with python ; \ 11 # $(PYTHON) $(top_srcdir)/tools/make-dissector-reg.py $(srcdir) \ 12 # dissectors $(ALL_DISSECTORS_SRC) ; \ 13 # else \ 14 # echo Making register.c with shell script ; \ 15 # $(top_srcdir)/tools/make-dissector-reg $(srcdir) \ 16 # dissectors $(plugin_src) $(ALL_DISSECTORS_SRC) ; \ 17 # fi 18 set( _sources ${ARGN} ) 19 ADD_CUSTOM_COMMAND( 20 OUTPUT 21 ${_outputfile} 22 COMMAND ${PYTHON_EXECUTABLE} 23 ${CMAKE_SOURCE_DIR}/tools/make-dissector-reg.py 24 ${CMAKE_CURRENT_SOURCE_DIR} 25 ${_registertype} 26 ${_sources} 27 DEPENDS 28 ${_sources} 29 ${CMAKE_SOURCE_DIR}/tools/make-dissector-reg 30 ${CMAKE_SOURCE_DIR}/tools/make-dissector-reg.py 31 ) 32ENDMACRO(REGISTER_DISSECTOR_FILES) 33 34