dp-packet: Remove ofpbuf dependency.
[cascardo/ovs.git] / Makefile.am
index 0cfc603..0480d20 100644 (file)
@@ -1,4 +1,4 @@
-# Copyright (C) 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014 Nicira, Inc.
+# Copyright (C) 2007-2015 Nicira, Inc.
 #
 # Copying and distribution of this file, with or without modification,
 # are permitted in any medium without royalty provided the copyright
@@ -61,7 +61,11 @@ CLEANFILES =
 CLEAN_LOCAL =
 DISTCLEANFILES =
 PYCOV_CLEAN_FILES = build-aux/check-structs,cover
-EXTRA_DIST = \
+
+# A list of Markdown-formatted documentation that will automatically be
+# included in the "make dist-docs" output.
+docs = \
+       appveyor.yml \
        CONTRIBUTING.md \
        CodingStyle.md \
        DESIGN.md \
@@ -80,24 +84,30 @@ EXTRA_DIST = \
        INSTALL.userspace.md \
        INSTALL.Windows.md \
        IntegrationGuide.md \
-       NOTICE \
        OPENFLOW-1.1+.md \
        PORTING.md \
        README.md \
        README-lisp.md \
        README-native-tunneling.md \
        REPORTING-BUGS.md \
+       SECURITY.md \
        TODO.md \
+       WHY-OVS.md
+EXTRA_DIST = \
+       $(docs) \
+       NOTICE \
        .travis.yml \
        .travis/build.sh \
        .travis/prepare.sh \
-       WHY-OVS.md \
        boot.sh \
        build-aux/cccl \
+       build-aux/dist-docs \
        build-aux/sodepends.pl \
        build-aux/soexpand.pl \
+       build-aux/xml2nroff \
        $(MAN_FRAGMENTS) \
-       $(MAN_ROOTS)
+       $(MAN_ROOTS) \
+       Vagrantfile
 bin_PROGRAMS =
 sbin_PROGRAMS =
 bin_SCRIPTS =
@@ -126,6 +136,7 @@ scripts_SCRIPTS =
 scripts_DATA =
 SUFFIXES =
 check_DATA =
+check_SCRIPTS =
 pkgconfig_DATA =
 
 scriptsdir = $(pkgdatadir)/scripts
@@ -258,6 +269,23 @@ check-assert-h-usage:
         fi
 .PHONY: check-assert-h-usage
 
+# Check that LITTLE_ENDIAN and BIG_ENDIAN are not used unless BYTE_ORDER is
+# also mentioned.  (<endian.h> always defines the former two constants.  They
+# must be compared to BYTE_ORDER to get the machine's correct endianness.  But
+# it is better to use WORDS_BIGENDIAN.)
+ALL_LOCAL += check-endian
+check-endian:
+       @if test -e $(srcdir)/.git && (git --version) >/dev/null 2>&1 && \
+           (cd $(srcdir) && git --no-pager grep -l -E \
+             -e 'BIG_ENDIAN|LITTLE_ENDIAN' --and --not -e 'BYTE_ORDER' | \
+           $(EGREP) -v '^datapath/'); \
+         then \
+           echo "See above for list of files that misuse LITTLE""_ENDIAN"; \
+           echo "or BIG""_ENDIAN.  Please use WORDS_BIGENDIAN instead."; \
+           exit 1; \
+        fi
+.PHONY: check-endian
+
 ALL_LOCAL += thread-safety-check
 thread-safety-check:
        @cd $(srcdir); \
@@ -320,6 +348,10 @@ if LINUX_ENABLED
        cd datapath/linux && $(MAKE) modules_install
 endif
 
+dist-docs:
+       VERSION=$(VERSION) $(srcdir)/build-aux/dist-docs $(srcdir) $(docs)
+.PHONY: dist-docs
+
 include m4/automake.mk
 include lib/automake.mk
 include ofproto/automake.mk