Sync some CMake and Autotools install behaviors.

Adjust the following CMake and Autotools behaviors in order to
synchronize their respective install behaviors:

- Disable tfshark by default in CMakeOptions.txt
- Add profiles/Bluetooth/preferences to Makefile.am
- Add missing captype and ciscodump entries to doc/Makefile.am
- Install help/faq.txt on all platforms in CMakeLists.txt
- Add BUILD_corbaidl2wrs, BUILD_dcerpcidl2wrs, and BUILD_xxx2deb
  options to CMake and use them to adjust the corresponding parts
  of the build.
- Pull the DCERPC idl2wrs build steps into the top-level
  CMakeLists.txt.

This change doesn't sync everything. Some installed content still
diverges, including the following:

- CMake installs a bunch of modules into lib/wireshark:
    FindGLIB2.cmake
    FindWireshark.cmake
    FindWSWinLibs.cmake
    LocatePythonModule.cmake
    UseAsn2Wrs.cmake
    UseMakeDissectorReg.cmake
    WiresharkConfig.cmake
    WiresharkConfigVersion.cmake

  Do we need any or all of these? If so, should the Autotools behavior
  be synced accordingly?

- Autotools installs libtool .la files. It also installs
  wireshark-gtk.desktop unconditionally.

Change-Id: I7846efe08f7139c31b6ceca6f08a1fa5168b3e22
Reviewed-on: https://code.wireshark.org/review/23041
Reviewed-by: Gerald Combs <gerald@wireshark.org>
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Michael Mann <mmann78@netscape.net>
This commit is contained in:
Gerald Combs 2017-08-10 10:20:30 -07:00 committed by Michael Mann
parent dc2a2424b4
commit 537b083e02
7 changed files with 83 additions and 42 deletions

View File

@ -1626,7 +1626,7 @@ set(TSHARK_TAP_SRC
set(INSTALL_DIRS
diameter
dtds
help
${DATAFILE_DIR}/help
profiles
radius
tpncp
@ -1646,7 +1646,6 @@ set(INSTALL_FILES
wka
docbook/ws.css
${CMAKE_BINARY_DIR}/doc/AUTHORS-SHORT
${CMAKE_BINARY_DIR}/doc/asn2deb.html
${CMAKE_BINARY_DIR}/doc/androiddump.html
${CMAKE_BINARY_DIR}/doc/udpdump.html
${CMAKE_BINARY_DIR}/doc/capinfos.html
@ -1656,8 +1655,6 @@ set(INSTALL_FILES
${CMAKE_BINARY_DIR}/doc/dumpcap.html
${CMAKE_BINARY_DIR}/doc/editcap.html
${CMAKE_BINARY_DIR}/doc/extcap.html
${CMAKE_BINARY_DIR}/doc/idl2deb.html
${CMAKE_BINARY_DIR}/doc/idl2wrs.html
${CMAKE_BINARY_DIR}/doc/mergecap.html
${CMAKE_BINARY_DIR}/doc/randpkt.html
${CMAKE_BINARY_DIR}/doc/randpktdump.html
@ -1670,6 +1667,16 @@ set(INSTALL_FILES
${CMAKE_BINARY_DIR}/doc/wireshark-filter.html
)
if (BUILD_corbaidl2wrs)
list(APPEND INSTALL_FILES ${CMAKE_BINARY_DIR}/doc/idl2wrs.html)
endif()
if (BUILD_xxx2deb)
list(APPEND INSTALL_FILES
${CMAKE_BINARY_DIR}/doc/asn2deb.html
${CMAKE_BINARY_DIR}/doc/idl2deb.html
)
endif()
if(WIN32)
set(TEXTIFY_FILES COPYING NEWS README README.windows)
foreach(_text_file ${TEXTIFY_FILES})
@ -1968,16 +1975,19 @@ if(ENABLE_EXTCAP)
)
list(APPEND copy_data_files_depends "${DATAFILE_DIR}/extcap")
endif()
set(_help_files
# faq.txt is handled separately below.
set(_help_source_files
help/capture_filters.txt
help/capturing.txt
help/display_filters.txt
help/getting_started.txt
help/overview.txt
)
if(WIN32)
file(TO_NATIVE_PATH "${DATAFILE_DIR}/help" _help_dest_dir)
foreach(_help_file IN LISTS _help_files)
foreach(_help_file IN LISTS _help_source_files)
add_custom_command(OUTPUT "${DATAFILE_DIR}/${_help_file}"
COMMAND ${CMAKE_COMMAND} -E make_directory "${DATAFILE_DIR}/help"
COMMAND ${POWERSHELL_COMMAND} "${CMAKE_SOURCE_DIR}/tools/textify.ps1"
@ -1989,7 +1999,7 @@ if(WIN32)
list(APPEND copy_data_files_depends "${DATAFILE_DIR}/${_help_file}")
endforeach()
else()
list(APPEND DATA_FILES_SRC ${_help_files})
list(APPEND DATA_FILES_SRC ${_help_source_files})
endif(WIN32)
# Create help/faq.txt when missing
@ -2724,6 +2734,24 @@ if(BUILD_dumpcap AND PCAP_FOUND)
endif()
endif()
# We have two idl2wrs utilities: this and the CORBA version in tools.
# We probably shouldn't do that.
if(BUILD_dcerpcidl2wrs)
set(idl2wrs_LIBS
${GLIB2_LIBRARIES}
wsutil
)
set(idl2wrs_FILES
epan/dissectors/dcerpc/idl2wrs.c
)
add_executable(idl2wrs ${idl2wrs_FILES})
set_target_properties(idl2wrs PROPERTIES FOLDER "Executables")
set_extra_executable_properties(idl2wrs "Executables")
target_link_libraries(idl2wrs ${idl2wrs_LIBS})
install(TARGETS idl2wrs RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR})
endif()
if (WIN32)
find_package( MSVC_REDIST )
@ -2937,6 +2965,7 @@ set(CLEAN_C_FILES
${capinfos_FILES}
${captype_FILES}
${editcap_FILES}
${idl2wrs_FILES}
${dumpcap_FILES}
${androiddump_FILES}
${sshdump_FILES}
@ -3015,7 +3044,6 @@ install(
PATTERN ".git" EXCLUDE
PATTERN ".svn" EXCLUDE
PATTERN "Makefile.*" EXCLUDE
PATTERN "faq.py" EXCLUDE
)
set(CMAKE_INSTALL_MODULES_DIR ${CMAKE_INSTALL_LIBDIR}/${CPACK_PACKAGE_NAME})

View File

@ -3,7 +3,7 @@
option(BUILD_wireshark "Build Wireshark" ON)
option(BUILD_wireshark_gtk "Build Wireshark (GTK+ UI)" OFF)
option(BUILD_tshark "Build tshark" ON)
option(BUILD_tfshark "Build tfshark" ON)
option(BUILD_tfshark "Build tfshark" OFF)
option(BUILD_rawshark "Build rawshark" ON)
option(BUILD_dumpcap "Build dumpcap" ON)
option(BUILD_text2pcap "Build text2pcap" ON)
@ -14,6 +14,9 @@ option(BUILD_capinfos "Build capinfos" ON)
option(BUILD_captype "Build captype" ON)
option(BUILD_randpkt "Build randpkt" ON)
option(BUILD_dftest "Build dftest" ON)
option(BUILD_corbaidl2wrs "Build corbaidl2wrs" OFF)
option(BUILD_dcerpcidl2wrs "Build dcerpcidl2wrs" ON)
option(BUILD_xxx2deb "Build xxx2deb" OFF)
option(BUILD_androiddump "Build androiddump" ON)
option(BUILD_sshdump "Build sshdump" ON)
option(BUILD_ciscodump "Build ciscodump" ON)

View File

@ -66,6 +66,7 @@ pkgconfig_DATA = wireshark.pc
profilesdir = $(pkgdatadir)
nobase_dist_profiles_DATA = \
profiles/Bluetooth/colorfilters \
profiles/Bluetooth/preferences \
profiles/Classic/colorfilters
#

2
debian/rules vendored
View File

@ -27,7 +27,7 @@ export docdir = /usr/share/doc/wireshark-doc
dh $@ --with python2 --buildsystem cmake --with quilt --parallel
override_dh_auto_configure:
dh_auto_configure -- -DENABLE_HTML_GUIDES=ON -DCMAKE_INSTALL_LIBDIR=/usr/lib/$(DEB_HOST_MULTIARCH) \
dh_auto_configure -- -DBIULD_xxx2deb=ON -DENABLE_HTML_GUIDES=ON -DCMAKE_INSTALL_LIBDIR=/usr/lib/$(DEB_HOST_MULTIARCH) \
-DBUILD_wireshark_gtk=ON \
# -DENABLE_QT5=OFF

View File

@ -70,15 +70,12 @@ else()
endif()
pod2manhtml(${CMAKE_CURRENT_SOURCE_DIR}/androiddump 1)
pod2manhtml(${CMAKE_CURRENT_SOURCE_DIR}/asn2deb 1)
pod2manhtml(${CMAKE_CURRENT_SOURCE_DIR}/udpdump 1)
pod2manhtml(${CMAKE_CURRENT_SOURCE_DIR}/capinfos 1)
pod2manhtml(${CMAKE_CURRENT_SOURCE_DIR}/captype 1)
pod2manhtml(${CMAKE_CURRENT_SOURCE_DIR}/dftest 1)
pod2manhtml(${CMAKE_CURRENT_SOURCE_DIR}/dumpcap 1)
pod2manhtml(${CMAKE_CURRENT_SOURCE_DIR}/editcap 1)
pod2manhtml(${CMAKE_CURRENT_SOURCE_DIR}/idl2deb 1)
pod2manhtml(${CMAKE_CURRENT_SOURCE_DIR}/idl2wrs 1)
pod2manhtml(${CMAKE_CURRENT_SOURCE_DIR}/mergecap 1)
pod2manhtml(${CMAKE_CURRENT_SOURCE_DIR}/randpkt 1)
pod2manhtml(${CMAKE_CURRENT_SOURCE_DIR}/randpktdump 1)
@ -93,8 +90,15 @@ pod2manhtml(${CMAKE_CURRENT_BINARY_DIR}/wireshark 1)
pod2manhtml(${CMAKE_CURRENT_SOURCE_DIR}/extcap 4)
pod2manhtml(${CMAKE_CURRENT_SOURCE_DIR}/wireshark-filter 4)
if (BUILD_corbaidl2wrs)
pod2manhtml(${CMAKE_CURRENT_SOURCE_DIR}/idl2wrs 1)
endif()
if (BUILD_xxx2deb)
pod2manhtml(${CMAKE_CURRENT_SOURCE_DIR}/asn2deb 1)
pod2manhtml(${CMAKE_CURRENT_SOURCE_DIR}/idl2deb 1)
endif()
set(MAN1_INSTALL_FILES
${CMAKE_CURRENT_BINARY_DIR}/asn2deb.1
${CMAKE_CURRENT_BINARY_DIR}/androiddump.1
${CMAKE_CURRENT_BINARY_DIR}/udpdump.1
${CMAKE_CURRENT_BINARY_DIR}/capinfos.1
@ -103,8 +107,6 @@ set(MAN1_INSTALL_FILES
${CMAKE_CURRENT_BINARY_DIR}/dftest.1
${CMAKE_CURRENT_BINARY_DIR}/dumpcap.1
${CMAKE_CURRENT_BINARY_DIR}/editcap.1
${CMAKE_CURRENT_BINARY_DIR}/idl2deb.1
${CMAKE_CURRENT_BINARY_DIR}/idl2wrs.1
${CMAKE_CURRENT_BINARY_DIR}/mergecap.1
${CMAKE_CURRENT_BINARY_DIR}/randpkt.1
${CMAKE_CURRENT_BINARY_DIR}/randpktdump.1
@ -117,6 +119,16 @@ set(MAN1_INSTALL_FILES
${CMAKE_CURRENT_BINARY_DIR}/wireshark.1
)
if (BUILD_corbaidl2wrs)
list(APPEND MAN1_INSTALL_FILES ${CMAKE_CURRENT_BINARY_DIR}/idl2wrs.1)
endif()
if (BUILD_xxx2deb)
list(APPEND MAN1_INSTALL_FILES
${CMAKE_CURRENT_BINARY_DIR}/asn2deb.1
${CMAKE_CURRENT_BINARY_DIR}/idl2deb.1
)
endif()
set(MAN4_INSTALL_FILES
${CMAKE_CURRENT_BINARY_DIR}/extcap.4
${CMAKE_CURRENT_BINARY_DIR}/wireshark-filter.4
@ -131,7 +143,6 @@ add_custom_target(manpages DEPENDS
)
set(HTML_INSTALL_FILES
${CMAKE_CURRENT_BINARY_DIR}/asn2deb.html
${CMAKE_CURRENT_BINARY_DIR}/androiddump.html
${CMAKE_CURRENT_BINARY_DIR}/udpdump.html
${CMAKE_CURRENT_BINARY_DIR}/capinfos.html
@ -141,8 +152,6 @@ set(HTML_INSTALL_FILES
${CMAKE_CURRENT_BINARY_DIR}/dumpcap.html
${CMAKE_CURRENT_BINARY_DIR}/editcap.html
${CMAKE_CURRENT_BINARY_DIR}/extcap.html
${CMAKE_CURRENT_BINARY_DIR}/idl2deb.html
${CMAKE_CURRENT_BINARY_DIR}/idl2wrs.html
${CMAKE_CURRENT_BINARY_DIR}/mergecap.html
${CMAKE_CURRENT_BINARY_DIR}/randpkt.html
${CMAKE_CURRENT_BINARY_DIR}/randpktdump.html
@ -156,6 +165,16 @@ set(HTML_INSTALL_FILES
${CMAKE_CURRENT_BINARY_DIR}/wireshark-filter.html
)
if (BUILD_corbaidl2wrs)
list(APPEND HTML_INSTALL_FILES ${CMAKE_CURRENT_BINARY_DIR}/idl2wrs.html)
endif()
if (BUILD_xxx2deb)
list(APPEND HTML_INSTALL_FILES
${CMAKE_CURRENT_BINARY_DIR}/asn2deb.html
${CMAKE_CURRENT_BINARY_DIR}/idl2deb.html
)
endif()
add_custom_target(
docs ALL
DEPENDS

View File

@ -66,12 +66,14 @@ man1_MANS = \
@mergecap_man@ \
@reordercap_man@ \
@capinfos_man@ \
@captype_man@ \
@editcap_man@ \
@dumpcap_man@ \
@rawshark_man@ \
@dftest_man@ \
@randpkt_man@ \
@androiddump_man@ \
@ciscodump_man@ \
@sshdump_man@ \
@randpktdump_man@ \
@udpdump_man@
@ -87,10 +89,10 @@ man_MANS =
noinst_DATA = asn2deb.1 asn2deb.html idl2deb.1 idl2deb.html idl2wrs.1 idl2wrs.html
pkgdata_DATA = AUTHORS-SHORT $(top_srcdir)/docbook/ws.css wireshark.html \
tshark.html wireshark-filter.html capinfos.html ciscodump.html editcap.html \
mergecap.html reordercap.html text2pcap.html dumpcap.html androiddump.html \
sshdump.html randpktdump.html rawshark.html dftest.html randpkt.html \
extcap.html udpdump.html
tshark.html wireshark-filter.html capinfos.html captype.html ciscodump.html \
editcap.html mergecap.html reordercap.html text2pcap.html dumpcap.html \
androiddump.html sshdump.html randpktdump.html rawshark.html dftest.html \
randpkt.html extcap.html udpdump.html
#
# Build the short version of the authors file for the about dialog
@ -182,6 +184,13 @@ capinfos.html: capinfos.pod ../config.h $(top_srcdir)/docbook/ws.css
--noindex \
$(srcdir)/capinfos.pod > capinfos.html
captype.html: captype.pod ../config.h $(top_srcdir)/docbook/ws.css
$(AM_V_POD2HTML)$(POD2HTML) \
--title="captype - The Wireshark Network Analyzer $(VERSION)" \
--css=$(POD_CSS_URL) \
--noindex \
$(srcdir)/captype.pod > captype.html
editcap.html: editcap.pod ../config.h $(top_srcdir)/docbook/ws.css
$(AM_V_POD2HTML)$(POD2HTML) \
--title="editcap - The Wireshark Network Analyzer $(VERSION)" \

View File

@ -25,25 +25,6 @@ set(PIDL_DISSECTOR_NAMES
drsuapi
)
set(IDL2WRS_FILES
idl2wrs.c
)
set(CLEAN_FILES
${IDL2WRS_FILES}
)
set_source_files_properties(
${CLEAN_FILES}
PROPERTIES
COMPILE_FLAGS "${WERROR_COMMON_FLAGS}"
)
add_executable(idl2wrs ${IDL2WRS_FILES})
set_target_properties(idl2wrs PROPERTIES FOLDER "Executables")
target_link_libraries(idl2wrs ${GLIB2_LIBRARIES} wsutil)
foreach(PROTOCOL_NAME IN LISTS PIDL_DISSECTOR_NAMES)
# Use a stamp file instead of OUTPUT to packet-dcerpc-X.c to
# avoid removing the .c file on clean.