Commit d28edb0be59ae8b9bfb65b129766dcb561afce6a

Authored by Jürgen Knödlseder
1 parent 092b8ce0

Add pkg and pkgcheck make targets

Makefile.am
1 ############################################################################# 1 #############################################################################
2 # Makefile for ctools package # 2 # Makefile for ctools package #
3 # ------------------------------------------------------------------------- # 3 # ------------------------------------------------------------------------- #
4 -# Copyright (C) 2016 Juergen Knoedlseder # 4 +# Copyright (C) 2016-2017 Juergen Knoedlseder #
5 # ------------------------------------------------------------------------- # 5 # ------------------------------------------------------------------------- #
6 # # 6 # #
7 # This program is free software: you can redistribute it and/or modify # 7 # This program is free software: you can redistribute it and/or modify #
@@ -65,20 +65,73 @@ uninstall-local: $(DOXYGEN_UNINSTALL_DATA_TARGETS) @@ -65,20 +65,73 @@ uninstall-local: $(DOXYGEN_UNINSTALL_DATA_TARGETS)
65 # Print out all rules 65 # Print out all rules
66 help: 66 help:
67 @echo "make targets:"; \ 67 @echo "make targets:"; \
68 - echo " all - build all"; \  
69 - echo " check - unit test"; \  
70 - echo " clean - clean build"; \  
71 - echo " install - install build (may required admin privileges)"; \  
72 - echo " doxygen - generate Doxygen documentation"; \  
73 - echo " sphinx - generate Sphinx documentation"; \  
74 - echo " cppcheck - perform cppcheck"; \  
75 - echo " sloccount - perform Source Lines of Code count"; \  
76 - echo " cppncss - perform cppncss complexity check"; \  
77 - echo " coverage - determine code coverage"; \  
78 - echo " valgrind - search for memory leaks"; \  
79 - echo " doc: doxygen sphinx"; \  
80 - echo " static-analysis: cppcheck sloccount cppncss"; \  
81 - echo " dynamic-analysis: coverage valgrind" 68 + echo " all - build all"; \
  69 + echo " check - unit test"; \
  70 + echo " clean - clean build"; \
  71 + echo " install - install build (may require admin privileges)"; \
  72 + echo " installcheck - check installation"; \
  73 + echo " dist - generate tarball"; \
  74 + echo " distcheck - check tarball"; \
  75 + echo " pkg - generate binary package"; \
  76 + echo " pkgcheck - check binary package"; \
  77 + echo " doc - generate all documentation"; \
  78 + echo " doxygen - generate Doxygen documentation"; \
  79 + echo " sphinx - generate Sphinx documentation"; \
  80 + echo " science-verification - perform Science Verification"; \
  81 + echo " cppcheck - perform cppcheck"; \
  82 + echo " sloccount - perform Source Lines of Code count"; \
  83 + echo " cppncss - perform cppncss complexity check"; \
  84 + echo " coverage - determine code coverage"; \
  85 + echo " valgrind - search for memory leaks"; \
  86 + echo " static-analysis - perform static code analysis"; \
  87 + echo " dynamic-analysis - perform dynamic code analysis"
  88 +
  89 +# Generate binary package
  90 +pkg:
  91 + @case `uname -s` in \
  92 + Darwin*) \
  93 + echo "Darwin supported"; \
  94 + dev/pkgbuild-macosx.sh $(PACKAGE_VERSION); \
  95 + ;; \
  96 + Linux*) \
  97 + if type lsb_release >/dev/null 2>&1; then \
  98 + case `lsb_release -irs` in \
  99 + CentOS*) \
  100 + echo "CentOS supported"; \
  101 + ;; \
  102 + *) \
  103 + echo "Linux OS not supported"; \
  104 + ;; \
  105 + esac \
  106 + fi \
  107 + ;; \
  108 + *) \
  109 + echo "OS not supported"; \
  110 + ;; \
  111 + esac
  112 +
  113 +# Check binary package
  114 +pkgcheck:
  115 + @case `uname -s` in \
  116 + Darwin*) \
  117 + echo "Darwin supported"; \
  118 + ;; \
  119 + Linux*) \
  120 + if type lsb_release >/dev/null 2>&1; then \
  121 + case `lsb_release -irs` in \
  122 + CentOS*) \
  123 + echo "CentOS supported"; \
  124 + ;; \
  125 + *) \
  126 + echo "Linux OS not supported"; \
  127 + ;; \
  128 + esac \
  129 + fi \
  130 + ;; \
  131 + *) \
  132 + echo "OS not supported"; \
  133 + ;; \
  134 + esac
82 135
83 # Add static-analysis rule: 136 # Add static-analysis rule:
84 static-analysis: cppcheck sloccount cppncss 137 static-analysis: cppcheck sloccount cppncss
dev/macosx-package.sh renamed to dev/pkgbuild-macosx.sh