"Fossies" - the Fresh Open Source Software Archive

Member "opensaf-5.21.09/Makefile.am" (14 Sep 2021, 18018 Bytes) of package /linux/misc/opensaf-5.21.09.tar.gz:


As a special service "Fossies" has tried to format the requested text file into HTML format (style: standard) with prefixed line numbers. Alternatively you can here view or download the uninterpreted source code file. See also the latest Fossies "Diffs" side-by-side code changes report for "Makefile.am": 5.21.06_vs_5.21.09.

    1 #      -*- OpenSAF  -*-
    2 #
    3 # (C) Copyright 2008 The OpenSAF Foundation
    4 # Copyright Ericsson AB 2009, 2017 - All Rights Reserved.
    5 #
    6 # This program is distributed in the hope that it will be useful, but
    7 # WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
    8 # or FITNESS FOR A PARTICULAR PURPOSE. This file and program are licensed
    9 # under the GNU Lesser General Public License Version 2.1, February 1999.
   10 # The complete license can be accessed from the following location:
   11 # http://opensource.org/licenses/lgpl-license.php
   12 # See the Copying file included with the OpenSAF distribution for full
   13 # licensing terms.
   14 #
   15 # Author(s): Wind River Systems
   16 #	     Ericsson AB
   17 #
   18 
   19 MAINTAINERCLEANFILES = \
   20 	Makefile.in \
   21 	aclocal.m4 \
   22 	compile \
   23 	config.guess \
   24 	config.sub \
   25 	configure \
   26 	depcomp \
   27 	install-sh \
   28 	ltmain.sh \
   29 	m4/libtool.m4 \
   30 	m4/ltoptions.m4 \
   31 	m4/ltsugar.m4 \
   32 	m4/ltversion.m4 \
   33 	m4/lt~obsolete.m4 \
   34 	missing \
   35 	py-compile \
   36 	src/osaf/config.h.in \
   37 	test-driver
   38 
   39 CLEANFILES = \
   40 	cppcheck.xml \
   41 	cppcheck_includes.txt \
   42 	lib/$(PACKAGE_NAME)-$(host_cpu).conf \
   43 	osafdir.conf \
   44 	osafdir.conf-t \
   45 	src/osaf/configmake.h \
   46 	src/osaf/ssl_libs.cc
   47 
   48 CORE_INCLUDES = \
   49 	-I$(top_builddir)/src -I$(top_srcdir)/src
   50 
   51 AM_CPPFLAGS = \
   52 	-pthread \
   53 	-D_GNU_SOURCE -DINTERNAL_VERSION_ID='"@INTERNAL_VERSION_ID@"' \
   54 	$(CORE_INCLUDES) \
   55 	$(all_includes)
   56 
   57 AM_CFLAGS = -pipe -std=gnu11 @OSAF_HARDEN_FLAGS@ -Wall -Wformat=2 -Werror
   58 AM_CXXFLAGS = -pipe -std=gnu++11 @OSAF_HARDEN_FLAGS@ -Wall -Wformat=2 -Werror
   59 
   60 if ENABLE_GCOV
   61 AM_CFLAGS += --coverage
   62 AM_CXXFLAGS += --coverage
   63 endif
   64 
   65 AM_LDFLAGS = @OSAF_HARDEN_FLAGS@ -Wl,--as-needed -ldl -lrt -pthread -rdynamic
   66 ACLOCAL_AMFLAGS = -I m4
   67 OSAF_LIB_FLAGS =
   68 
   69 FORMAT = "text"
   70 
   71 systemdversion = $(systemdmodversion)
   72 #
   73 # Define some useful directory prefixes/suffixes
   74 #
   75 pkgsysconfdir = $(sysconfdir)/$(PACKAGE_NAME)
   76 pkglocalstatedir = $(localstatedir)/lib/$(PACKAGE_NAME)
   77 pkgpiddir = $(localstatedir)/run/$(PACKAGE_NAME)
   78 pkglogdir = $(localstatedir)/log/$(PACKAGE_NAME)
   79 pkgconfigdir = $(libdir)/pkgconfig
   80 pkgimmxmldir = $(pkgdatadir)/immxml
   81 pkgimmxml_svcdir = $(pkgimmxmldir)/services
   82 pkgclcclidir = $(pkglibdir)/clc-cli
   83 pkgclmscriptsdir = $(pkglibdir)/clm-scripts
   84 docdir = $(datadir)/doc/$(PACKAGE_NAME)-$(PACKAGE_VERSION)
   85 javadir = $(datadir)/java
   86 javadocdir = $(datadir)/javadoc
   87 lsbinitdir = $(initscriptdir)
   88 systemddir = $(systemdsystemunitdir)
   89 lockdir = $(localstatedir)/lock/subsys
   90 pkgpyosafdir = $(pythondir)/pyosaf
   91 pkgpyosafutilsdir = $(pythondir)/pyosaf/utils
   92 pkgpyosafutilsimmomdir = $(pythondir)/pyosaf/utils/immom
   93 pkgpyosafutilsclmdir = $(pythondir)/pyosaf/utils/clm
   94 pkgpyosafutilslogdir = $(pythondir)/pyosaf/utils/log
   95 pkgpyosafutilsimmoidir = $(pythondir)/pyosaf/utils/immoi
   96 pkgpyosafutilsntfdir = $(pythondir)/pyosaf/utils/ntf
   97 osaf_execbindir = $(pkglibdir)
   98 osaf_libdir = $(pkglibdir)
   99 
  100 BUILT_SOURCES =
  101 DEFAULT_INCLUDES =
  102 EXTRA_DIST =
  103 SUBDIRS =
  104 TESTS =
  105 bin_PROGRAMS =
  106 dist_bin_SCRIPTS =
  107 dist_doc_DATA =
  108 dist_lsbinit_SCRIPTS =
  109 nodist_lsbinit_SCRIPTS =
  110 dist_osaf_execbin_SCRIPTS =
  111 dist_pkgimmxml_svc_DATA =
  112 dist_pkgsysconf_DATA =
  113 dist_sysconf_DATA =
  114 dist_systemd_DATA =
  115 include_HEADERS =
  116 lib_LTLIBRARIES =
  117 lib_libopensaf_core_la_CPPFLAGS =
  118 lib_libopensaf_core_la_LDFLAGS =
  119 lib_libopensaf_core_la_LIBADD =
  120 lib_libopensaf_core_la_SOURCES =
  121 nodist_java_DATA =
  122 nodist_osaf_execbin_SCRIPTS =
  123 nodist_pkgclccli_SCRIPTS =
  124 dist_pkgclmscripts_SCRIPTS =
  125 nodist_pkgsysconf_DATA =
  126 noinst_HEADERS =
  127 noinst_LTLIBRARIES =
  128 osaf_execbin_PROGRAMS =
  129 osaf_lib_LTLIBRARIES =
  130 pkgconfig_DATA =
  131 pkginclude_HEADERS =
  132 pkglib_LTLIBRARIES =
  133 sbin_PROGRAMS =
  134 
  135 nodist_pkgsysconf_DATA += \
  136 	$(top_builddir)/osafdir.conf
  137 
  138 pkgconfig_DATA += pkgconfig/opensaf.pc
  139 
  140 BUILT_SOURCES += src/osaf/configmake.h osafdir.conf src/osaf/ssl_libs.cc
  141 
  142 EXTRA_DIST += samples scripts/create_empty_library
  143 
  144 dist_doc_DATA += \
  145 	$(top_srcdir)/00-README.conf \
  146 	$(top_srcdir)/00-README.debug \
  147 	$(top_srcdir)/00-README.samples \
  148 	$(top_srcdir)/00-README.uml \
  149 	$(top_srcdir)/00-README.unittest \
  150 	$(top_srcdir)/AUTHORS \
  151 	$(top_srcdir)/COPYING.LIB \
  152 	$(top_srcdir)/ChangeLog \
  153 	$(top_srcdir)/INSTALL \
  154 	$(top_srcdir)/NEWS \
  155 	$(top_srcdir)/README \
  156 	$(top_srcdir)/THANKS
  157 
  158 dist_osaf_execbin_SCRIPTS += \
  159 	$(top_srcdir)/scripts/opensaf_reboot \
  160 	$(top_srcdir)/scripts/opensaf_sc_active \
  161 	$(top_srcdir)/scripts/opensaf_scale_out \
  162 	$(top_srcdir)/scripts/plm_scale_out \
  163 	$(top_srcdir)/scripts/tipc-config
  164 
  165 include $(top_srcdir)/src/ais/Makefile.am
  166 include $(top_srcdir)/src/base/Makefile.am
  167 include $(top_srcdir)/src/osaf/Makefile.am
  168 include $(top_srcdir)/src/experimental/Makefile.am
  169 include $(top_srcdir)/src/amf/Makefile.am
  170 include $(top_srcdir)/src/ckpt/Makefile.am
  171 include $(top_srcdir)/src/clm/Makefile.am
  172 include $(top_srcdir)/src/dtm/Makefile.am
  173 include $(top_srcdir)/src/evt/Makefile.am
  174 include $(top_srcdir)/src/fm/Makefile.am
  175 include $(top_srcdir)/src/imm/Makefile.am
  176 include $(top_srcdir)/src/lck/Makefile.am
  177 include $(top_srcdir)/src/libjava/Makefile.am
  178 include $(top_srcdir)/src/log/Makefile.am
  179 include $(top_srcdir)/src/mbc/Makefile.am
  180 include $(top_srcdir)/src/mds/Makefile.am
  181 include $(top_srcdir)/src/msg/Makefile.am
  182 include $(top_srcdir)/src/nid/Makefile.am
  183 include $(top_srcdir)/src/ntf/Makefile.am
  184 include $(top_srcdir)/src/plm/Makefile.am
  185 include $(top_srcdir)/src/rde/Makefile.am
  186 include $(top_srcdir)/src/smf/Makefile.am
  187 include $(top_srcdir)/java/Makefile.am
  188 include $(top_srcdir)/python/Makefile.am
  189 
  190 check_PROGRAMS = $(TESTS)
  191 
  192 # Retrieve values of the variables through 'configure' followed by
  193 # 'make', not directly through 'configure', so that a user who
  194 # sets some of these variables consistently on the 'make' command
  195 # line gets correct results.
  196 #
  197 # One advantage of this approach, compared to the classical
  198 # approach of adding -DLIBDIR=\"$(libdir)\" etc. to AM_CPPFLAGS,
  199 # is that it protects against the use of undefined variables.
  200 # If, say, $(libdir) is not set in the Makefile, LIBDIR is not
  201 # defined by this module, and code using LIBDIR gives a
  202 # compilation error.
  203 #
  204 # Another advantage is that 'make' output is shorter.
  205 #
  206 # Listed in the same order as the GNU makefile conventions.
  207 # The Automake-defined pkg* macros are appended, in the order
  208 # listed in the Automake 1.10a+ documentation.
  209 src/osaf/configmake.h: Makefile
  210 	@rm -f $@-t $@
  211 	{ echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \
  212 	echo '#define PREFIX "$(prefix)"'; \
  213 	echo '#define EXEC_PREFIX "$(exec_prefix)"'; \
  214 	echo '#define BINDIR "$(bindir)"'; \
  215 	echo '#define SBINDIR "$(sbindir)"'; \
  216 	echo '#define LIBEXECDIR "$(libexecdir)"'; \
  217 	echo '#define DATAROOTDIR "$(datarootdir)"'; \
  218 	echo '#define DATADIR "$(datadir)"'; \
  219 	echo '#define SYSCONFDIR "$(sysconfdir)"'; \
  220 	echo '#define SHAREDSTATEDIR "$(sharedstatedir)"'; \
  221 	echo '#define LOCALSTATEDIR "$(localstatedir)"'; \
  222 	echo '#define INCLUDEDIR "$(includedir)"'; \
  223 	echo '#define OLDINCLUDEDIR "$(oldincludedir)"'; \
  224 	echo '#define DOCDIR "$(docdir)"'; \
  225 	echo '#define INFODIR "$(infodir)"'; \
  226 	echo '#define HTMLDIR "$(htmldir)"'; \
  227 	echo '#define DVIDIR "$(dvidir)"'; \
  228 	echo '#define PDFDIR "$(pdfdir)"'; \
  229 	echo '#define PSDIR "$(psdir)"'; \
  230 	echo '#define LIBDIR "$(libdir)"'; \
  231 	echo '#define LISPDIR "$(lispdir)"'; \
  232 	echo '#define LOCALEDIR "$(localedir)"'; \
  233 	echo '#define MANDIR "$(mandir)"'; \
  234 	echo '#define MANEXT "$(manext)"'; \
  235 	echo '#define PKGDATADIR "$(pkgdatadir)"'; \
  236 	echo '#define PKGINCLUDEDIR "$(pkgincludedir)"'; \
  237 	echo '#define PKGLIBDIR "$(pkglibdir)"'; \
  238 	echo '#define PKGLIBEXECDIR "$(pkglibexecdir)"'; \
  239 	echo '#define PKGSYSCONFDIR "$(pkgsysconfdir)"'; \
  240 	echo '#define PKGLOCALSTATEDIR "$(pkglocalstatedir)"'; \
  241 	echo '#define PKGPIDDIR "$(pkgpiddir)"'; \
  242 	echo '#define PKGLOGDIR "$(pkglogdir)"'; \
  243 	echo '#define PKGCONFDIR "$(pkgconfigdir)"'; \
  244 	echo '#define PKGIMMXMLDIR "$(pkgimmxmldir)"'; \
  245 	echo '#define PKGIMMXMLSVCDIR "$(pkgimmxml_svcdir)"'; \
  246 	echo '#define PKGCLCCLIDIR "$(pkgclcclidir)"'; \
  247 	echo '#define PKGCLMSCRIPTDIR "$(pkgclmscriptsdir)"'; \
  248 	echo '#define JAVADIR "$(javadir)"'; \
  249 	echo '#define JAVADOCDIR "$(javadocdir)"'; \
  250 	echo '#define LSBINITDIR "$(lsbinitdir)"'; \
  251 	echo '#define LOCKDIR "$(lockdir)"'; \
  252 	} | sed '/""/d' > $@-t
  253 	mv $@-t $@
  254 
  255 
  256 osafdir.conf: src/osaf/configmake.h
  257 	@rm -f $@-t $@
  258 	@cp src/osaf/configmake.h $@-t
  259 	@sed -i 's|\#define ||g' $@-t
  260 	@sed -i 's| \"|=\"|g' $@-t
  261 	@sed -i -e 's|\/\* |\# |g' -e 's| \*\/||g' $@-t
  262 	@sed -i 1i"#!/bin/sh" $@-t
  263 	sed -e 's/\(.*\)/\L\1/' $@-t > $@
  264 
  265 src/osaf/ssl_libs.cc: Makefile
  266 	@rm -f $@-t $@
  267 	@{ echo "  \"$$(ldd $$(which openssl) | cut -d= -f1 | grep libcrypto.so | tr -d '\t ')\","; \
  268 	echo "  \"libcrypto.so\","; \
  269 	echo "  \"libcrypto.so.1.1.0\","; \
  270 	echo "  \"libcrypto.so.1.0.0\","; \
  271 	echo "  \"libcrypto.so.0.9.8\","; \
  272 	} | sort -Vr | uniq > $@-t
  273 	mv $@-t $@
  274 
  275 if ENABLE_RPM_TARGET
  276 
  277 RPMTOPDIR = `pwd`/rpms
  278 RPMSOURCEDIR = $(RPMTOPDIR)/SOURCES
  279 RPMSPECDIR = $(RPMTOPDIR)/SPECS
  280 SRPMDIR = $(RPMTOPDIR)/SRPMS
  281 RPMDIR = $(RPMTOPDIR)/RPMS
  282 
  283 prep-rpm-dir: dist
  284 	mkdir -p $(RPMTOPDIR)
  285 	mkdir -p $(RPMTOPDIR)/{BUILD,RPMS,SOURCES,SPECS,SRPMS,tmp}
  286 	cp $(top_builddir)/$(PACKAGE_NAME).spec $(RPMSPECDIR)
  287 	cp $(top_builddir)/$(PACKAGE_NAME)-$(VERSION).tar.gz $(RPMSOURCEDIR)
  288 
  289 srpm: prep-rpm-dir
  290 	rpmbuild -bs --rmspec --rmsource \
  291 		--define "_topdir $(RPMTOPDIR)" --define "_tmppath $(RPMTOPDIR)/tmp" \
  292 		$(RPMSPECDIR)/$(PACKAGE_NAME).spec
  293 
  294 rpm: prep-rpm-dir
  295 	rpmbuild -bb --clean --rmspec --rmsource \
  296 		--define "_topdir $(RPMTOPDIR)" --define "_tmppath $(RPMTOPDIR)/tmp" \
  297 		$(RPMSPECDIR)/$(PACKAGE_NAME).spec
  298 
  299 endif
  300 
  301 all-local:
  302 	mkdir -p $(top_builddir)/lib
  303 	echo "$(pkglibdir)" > $(top_builddir)/lib/$(PACKAGE_NAME)-$(host_cpu).conf
  304 
  305 install-data-local:
  306 	$(mkinstalldirs) $(DESTDIR)$(pkglogdir)
  307 	$(mkinstalldirs) $(DESTDIR)$(pkglogdir)/saflog
  308 	$(mkinstalldirs) $(DESTDIR)$(pkgpiddir)
  309 	$(mkinstalldirs) $(DESTDIR)$(lockdir)
  310 	$(mkinstalldirs) $(DESTDIR)$(pkglocalstatedir)
  311 	$(mkinstalldirs) $(DESTDIR)$(pkgdatadir)
  312 	cp -R $(top_srcdir)/samples/ $(DESTDIR)$(pkgdatadir)
  313 if ENABLE_JAVA
  314 	$(mkinstalldirs) $(DESTDIR)$(javadocdir)/$(PACKAGE_NAME)
  315 	@builddir=$$(cd $(top_builddir); pwd; cd - > /dev/null); \
  316 	cd java/ais_api/javadoc; \
  317 	for file in `find . -name \*`; do \
  318 		$(INSTALL) -D -m 644 "$$builddir/java/ais_api/javadoc/$$file" "$(DESTDIR)$(javadocdir)/$(PACKAGE_NAME)/$$file.txt"; \
  319 	done; \
  320 	cd -
  321 endif
  322 
  323 set-default-node-config:
  324 	@echo "*** Setting default controller node configuration ***"
  325 	echo "2" > $(DESTDIR)$(pkgsysconfdir)/chassis_id
  326 	echo "0" > $(DESTDIR)$(pkgsysconfdir)/slot_id
  327 	echo "15" > $(DESTDIR)$(pkgsysconfdir)/subslot_id
  328 	echo "controller" > $(DESTDIR)$(pkgsysconfdir)/node_type
  329 
  330 install-data-hook: set-default-node-config
  331 	@for i in $$(grep -lr -e 'xxLIBDIRxx' -e 'xxLOGDIRxx' -e 'xxCLCCLIDIRxx' $(DESTDIR)$(pkgimmxml_svcdir)/*.xml) ; do \
  332 		sed -i 's|xxLIBDIRxx|$(pkglibdir)|g' "$$i"; \
  333 		sed -i 's|xxCLCCLIDIRxx|$(pkgclcclidir)|g' "$$i"; \
  334 		sed -i 's|xxCLMSCRIPTDIRxx|$(pkgclmscriptsdir)|g' "$$i"; \
  335 		sed -i 's|xxLOGDIRxx|$(pkglogdir)|g' "$$i"; \
  336 	done
  337 	@for i in $$(grep -lr -e 'xxBINDIRxx' -e 'xxLIBDIRxx' -e 'xxCLCCLIDIRxx' $(DESTDIR)$(pkgsysconfdir)/*) ; do \
  338 		sed --follow-symlinks -i 's|xxBINDIRxx|$(bindir)|g' "$$i"; \
  339 		sed --follow-symlinks -i 's|xxLIBDIRxx|$(pkglibdir)|g' "$$i"; \
  340 		sed --follow-symlinks -i 's|xxCLCCLIDIRxx|$(pkgclcclidir)|g' "$$i"; \
  341 		sed --follow-symlinks -i 's|xxCLMSCRIPTDIRxx|$(pkgclmscriptsdir)|g' "$$i"; \
  342 	done
  343 	hostname -s > $(DESTDIR)$(pkgsysconfdir)/node_name
  344 if !ENABLE_AIS_PLM
  345 	sed -i '/plmd/d'  $(DESTDIR)$(pkgsysconfdir)/nodeinit.conf.controller
  346 endif
  347 if ENABLE_SYSTEMD
  348 	if [ ${systemdmodversion} -gt 204 ]; then \
  349 		sed -i '/ControlGroup/d'  $(DESTDIR)$(systemddir)/opensafd.service; \
  350 	fi
  351 endif
  352 
  353 install-exec-hook:
  354 	@libs=""; \
  355 	for i in $(lib_LTLIBRARIES); do \
  356 		l=$$(basename "$$i" .la); \
  357 		test $$(echo "$$l" | cut -c1-5) = "libSa" && \
  358 			libs="$$libs $$l"; \
  359 	done; \
  360 	srcdir=$$(cd $(top_srcdir); pwd; cd - > /dev/null); \
  361 	for i in $$libs; do \
  362 		sofile=$(DESTDIR)$(libdir)/$$i.so; \
  363 		mapfile=$$(bash -c "ls -1 $$srcdir/src/ais/lib/$$i.map"); \
  364 		bash $$srcdir/scripts/create_empty_library "$$sofile" "$$mapfile"; \
  365 	done
  366 
  367 uninstall-hook:
  368 	rm -f $(DESTDIR)$(pkgsysconfdir)/node_name
  369 	-rm -rf $(DESTDIR)$(pkgsysconfdir)
  370 	-rm -rf $(DESTDIR)$(pkgincludedir)
  371 	-rm -rf $(DESTDIR)$(pkglibdir)
  372 	-rm -rf $(DESTDIR)$(docdir)
  373 	-rm -rf $(DESTDIR)$(pkgdatadir)
  374 	-rm -rf $(DESTDIR)$(pkglocalstatedir)
  375 	-rm -rf $(DESTDIR)$(pkglogdir)
  376 	-rm -rf $(DESTDIR)$(pkgpiddir)
  377 if ENABLE_JAVA
  378 	-rm -rf $(DESTDIR)$(javadocdir)/$(PACKAGE_NAME)
  379 	-rm -rf $(DESTDIR)$(javadir)
  380 if ENABLE_AM4J
  381 	-rm -rf $(DESTDIR)$(javadir)
  382 endif
  383 endif
  384 
  385 
  386 docs:
  387 	doxygen
  388 
  389 cppcheck_includes.txt:
  390 	@builddir=$$(cd $(top_builddir); pwd; cd - > /dev/null); \
  391 	srcdir=$$(cd $(top_srcdir); pwd; cd - > /dev/null); \
  392 	echo "src" > "$$builddir/cppcheck_includes.txt"; \
  393 	cd "$$srcdir"; find "src" -type d -name saf >> "$$builddir/cppcheck_includes.txt"; \
  394 	echo "$$builddir/src" >> "$$builddir/cppcheck_includes.txt"
  395 
  396 cppcheck.xml: cppcheck_includes.txt
  397 	@builddir=$$(cd $(top_builddir); pwd; cd - > /dev/null); \
  398 	srcdir=$$(cd $(top_srcdir); pwd; cd - > /dev/null); \
  399 	cd "$$srcdir"; cppcheck -DSA_EXTENDED_NAME_SOURCE -D__USE_GNU -DIMMA_OI -DIMMA_OM -DASAPi_DEBUG=1 -DHAVE_CONFIG_H -DNCS_CPD=1 -DNCS_CPND=1 -DNCSL_ENV_INIT_HM=1 -DNCSL_ENV_INIT_TMR=1 -DNCS_MQD=1 -DNCS_MQND=1 -DRLIMIT_RTPRIO -DTIPC_SUB_CANCEL -DENABLE_AIS_PLM -DLIBXML_SAX1_ENABLED -DLIBXML_XPATH_ENABLED --enable=all --includes-file="$$builddir/cppcheck_includes.txt" --inline-suppr --library=gnu.cfg --library=posix.cfg --xml-version=2 src cppcheck_append.cc 2> "$$builddir/cppcheck.xml"
  400 	@echo "The result can be found in the file cppcheck.xml"
  401 	@echo "Use the follwing command to view it: cppcheck-gui cppcheck.xml"
  402 
  403 cppcheck: cppcheck_includes.txt
  404 	@builddir=$$(cd $(top_builddir); pwd; cd - > /dev/null); \
  405 	srcdir=$$(cd $(top_srcdir); pwd; cd - > /dev/null); \
  406 	cd "$$srcdir"; cppcheck -DSA_EXTENDED_NAME_SOURCE -D__USE_GNU -DIMMA_OI -DIMMA_OM -DASAPi_DEBUG=1 -DHAVE_CONFIG_H -DNCS_CPD=1 -DNCS_CPND=1 -DNCSL_ENV_INIT_HM=1 -DNCSL_ENV_INIT_TMR=1 -DNCS_MQD=1 -DNCS_MQND=1 -DRLIMIT_RTPRIO -DTIPC_SUB_CANCEL -DENABLE_AIS_PLM -DLIBXML_SAX1_ENABLED -DLIBXML_XPATH_ENABLED --enable=all --includes-file="$$builddir/cppcheck_includes.txt" --inline-suppr --library=gnu.cfg --library=posix.cfg src cppcheck_append.cc
  407 
  408 cpplint:
  409 	@test -d $(top_builddir)/bin || mkdir $(top_builddir)/bin
  410 	@cpplint=$$(find $(top_builddir)/bin -name cpplint.py -mtime -30); \
  411 	test -z "$$cpplint" && wget -O $(top_builddir)/bin/cpplint.py https://raw.githubusercontent.com/google/styleguide/gh-pages/cpplint/cpplint.py 2>&1 && touch $(top_builddir)/bin/cpplint.py; \
  412 	builddir=$$(cd $(top_builddir); pwd; cd - > /dev/null); \
  413 	srcdir=$$(cd $(top_srcdir); pwd; cd - > /dev/null); \
  414 	cd "$$srcdir"; find samples src \( -name '*.[CH]' -o -name '*.hh' -o -name '*.[ch]pp' -o -name '*.[ch]xx' \) -exec echo "Invalid file name: {}" \; 1>&2; \
  415 	cd "$$srcdir"; find samples src -name '*.h' | \
  416 		grep -v src/ais/include | \
  417 		grep -v src/osaf/config > "$$builddir/cpplint_files.txt"; \
  418 	cd "$$srcdir"; find samples src -name '*.cc' >> "$$builddir/cpplint_files.txt"; \
  419 	python "$$builddir/bin/cpplint.py" --root=src --extensions=cc,h $$(cat "$$builddir/cpplint_files.txt"); \
  420 	true
  421 
  422 shellcheck:
  423 	@builddir=$$(cd $(top_builddir); pwd; cd - > /dev/null); $(MAKE) install DESTDIR="$$builddir/tmpinstall" 2>&1; \
  424 	cd "$$builddir/tmpinstall"; files=$$(grep --exclude-dir=cluster_sim_uml --exclude-dir='.[a-zA-Z0-9]*' -E '^#\! */bin/(ba)?sh' -rlI *); \
  425 	if test -n "$$files"; then \
  426 		shellcheck --shell=sh $$files 1>&2; \
  427 	fi; \
  428 	true
  429 
  430 checkpatch:
  431 	@test -d $(top_builddir)/bin || mkdir $(top_builddir)/bin
  432 	@checkpatch=$$(find $(top_builddir)/bin -name checkpatch.pl -mtime -30); \
  433 	test -z "$$checkpatch" && wget -O $(top_builddir)/bin/checkpatch.pl https://raw.githubusercontent.com/torvalds/linux/master/scripts/checkpatch.pl 2>&1 && touch $(top_builddir)/bin/checkpatch.pl; \
  434 	test -z "$$checkpatch" && wget -O $(top_builddir)/bin/spelling.txt https://raw.githubusercontent.com/torvalds/linux/master/scripts/spelling.txt 2>&1 && echo __dummy_struct__ > $(top_builddir)/bin/const_structs.checkpatch; \
  435 	builddir=$$(cd $(top_builddir); pwd; cd - > /dev/null); \
  436 	cd "$$srcdir"; find samples src -name '*.c' > "$$builddir/checkpatch_files.txt"; \
  437 	perl "$$builddir/bin/checkpatch.pl" --no-tree --file --ignore SPLIT_STRING --summary-file $$(cat "$$builddir/checkpatch_files.txt") 1>&2; \
  438 	true
  439 
  440 pylint:
  441 	@srcdir=$$(cd $(top_srcdir); pwd; cd - > /dev/null); \
  442 	cd "$$srcdir/python"; find . -name '*.py' | xargs pylint --rcfile=pylintrc --output-format=$(FORMAT) > pylint.res; \
  443 	true
  444 	@echo "The pylint result can be found in the file python/pylint.res"
  445 
  446 .PHONY: cppcheck.xml cppcheck cpplint shellcheck checkpatch pylint
  447 
  448 clean-local:
  449 	-rm -f $(PACKAGE_NAME)-$(PACKAGE_VERSION).tar.gz
  450 	-rm -rf $(top_builddir)/tmpinstall
  451 if ENABLE_RPM_TARGET
  452 	-rm -rf $(RPMTOPDIR)/{BUILD,BUILDROOT,RPMS,SOURCES,SPECS,SRPMS,tmp}
  453 endif
  454 if ENABLE_JAVA
  455 	$(ANT) -f $(top_srcdir)/java/ais_api/build.xml clean
  456 	-rm -rf $(top_builddir)/java/ais_api/javadoc $(top_builddir)/java/ais_api/bin
  457 	$(ANT) -f $(top_srcdir)/java/ais_api_impl/build.xml clean
  458 	-rm -rf $(top_builddir)/java/ais_api_impl/bin
  459 if ENABLE_AM4J
  460 	$(ANT) -f $(top_srcdir)/java/amf_agent/build.xml clean
  461 	-rm -rf $(top_builddir)/java/amf_agent/bin
  462 endif
  463 endif
  464 
  465 distclean-local:
  466 	-rm -f $(top_builddir)/docs $(top_builddir)/rpms $(top_builddir)/bin $(top_builddir)/lib
  467 
  468 maintainer-clean-local:
  469 	-rm -f $(top_builddir)/autom4te.cache
  470 
  471 java/ais_api_impl/bin/opensaf_ais_api.jar:
  472 	$(ANT) -f $(top_srcdir)/java/ais_api_impl/build.xml build-jar
  473 	$(ANT) -f $(top_srcdir)/java/ais_api/build.xml javadocAPI
  474 
  475 java/amf_agent/bin/amf_agent.jar:
  476 	$(ANT) -f $(top_srcdir)/java/amf_agent/build.xml build-jar -Dam4j_api.location=$(AM4J_API_JAR)
  477 
  478 installlibLTLIBRARIES = install-libLTLIBRARIES
  479 $(installlibLTLIBRARIES): install-osaf_libLTLIBRARIES
  480 
  481 installpkglibLTLIBRARIES = install-pkglibLTLIBRARIES
  482 $(installpkglibLTLIBRARIES): install-libLTLIBRARIES