Allows for installable headers in later commits. Signed-off-by: Thomas Graf <tg...@noironetworks.com> --- Makefile.am | 6 ++- configure.ac | 1 + include/.gitignore | 1 + include/Makefile.am | 19 +++++++++ include/automake.mk | 8 +--- include/openflow/automake.mk | 85 ++++++++++++++++++++--------------------- include/openvswitch/automake.mk | 2 +- include/sparse/automake.mk | 18 ++++----- include/windows/automake.mk | 54 +++++++++++++------------- 9 files changed, 105 insertions(+), 89 deletions(-) create mode 100644 include/Makefile.am
diff --git a/Makefile.am b/Makefile.am index 343dffa..8e6de5f 100644 --- a/Makefile.am +++ b/Makefile.am @@ -7,7 +7,7 @@ AUTOMAKE_OPTIONS = foreign subdir-objects ACLOCAL_AMFLAGS = -I m4 -SUBDIRS = datapath +SUBDIRS = datapath include AM_CPPFLAGS = $(SSL_CFLAGS) AM_LDFLAGS = $(SSL_LDFLAGS) @@ -176,7 +176,9 @@ ALL_LOCAL += dist-hook-git dist-hook-git: distfiles @if test -e $(srcdir)/.git && (git --version) >/dev/null 2>&1; then \ (cd datapath && $(MAKE) distfiles); \ - (cat distfiles; sed 's|^|datapath/|' datapath/distfiles) | \ + (cd include && $(MAKE) distfiles); \ + (cat distfiles; sed 's|^|datapath/|' datapath/distfiles; \ + sed 's|^|include/|' include/distfiles) | \ LC_ALL=C sort -u > all-distfiles; \ (cd $(srcdir) && git ls-files) | grep -v '\.gitignore$$' | \ LC_ALL=C sort -u > all-gitfiles; \ diff --git a/configure.ac b/configure.ac index c3b26ec..8cd48ca 100644 --- a/configure.ac +++ b/configure.ac @@ -171,6 +171,7 @@ AC_CONFIG_FILES(datapath/Makefile) AC_CONFIG_FILES(datapath/linux/Kbuild) AC_CONFIG_FILES(datapath/linux/Makefile) AC_CONFIG_FILES(datapath/linux/Makefile.main) +AC_CONFIG_FILES(include/Makefile) AC_CONFIG_FILES(tests/atlocal) dnl This makes sure that include/openflow gets created in the build directory. diff --git a/include/.gitignore b/include/.gitignore index b336cc7..5f752cf 100644 --- a/include/.gitignore +++ b/include/.gitignore @@ -1,2 +1,3 @@ /Makefile /Makefile.in +/distfiles diff --git a/include/Makefile.am b/include/Makefile.am new file mode 100644 index 0000000..2fe936d --- /dev/null +++ b/include/Makefile.am @@ -0,0 +1,19 @@ +noinst_HEADERS = +nobase_include_HEADERS = +SUFFIXES = +ALL_LOCAL = +CLEANFILES = distfiles + +include openflow/automake.mk +include openvswitch/automake.mk +include sparse/automake.mk +include windows/automake.mk + +# The following is based on commands for the Automake "distdir" target. +distfiles: Makefile + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t" | sort -u > $@ diff --git a/include/automake.mk b/include/automake.mk index 6a4cf86..3297917 100644 --- a/include/automake.mk +++ b/include/automake.mk @@ -3,10 +3,6 @@ BUILT_SOURCES += include/odp-netlink.h include/odp-netlink.h: datapath/linux/compat/include/linux/openvswitch.h \ build-aux/extract-odp-netlink-h $(AM_V_GEN)sed -f $(srcdir)/build-aux/extract-odp-netlink-h < $< > $@ -EXTRA_DIST += build-aux/extract-odp-netlink-h +EXTRA_DIST += build-aux/extract-odp-netlink-h \ + build-aux/check-structs CLEANFILES += include/odp-netlink.h - -include include/openflow/automake.mk -include include/openvswitch/automake.mk -include include/sparse/automake.mk -include include/windows/automake.mk diff --git a/include/openflow/automake.mk b/include/openflow/automake.mk index 4194996..5e0e261 100644 --- a/include/openflow/automake.mk +++ b/include/openflow/automake.mk @@ -1,13 +1,13 @@ noinst_HEADERS += \ - include/openflow/nicira-ext.h \ - include/openflow/openflow-1.0.h \ - include/openflow/openflow-1.1.h \ - include/openflow/openflow-1.2.h \ - include/openflow/openflow-1.3.h \ - include/openflow/openflow-1.4.h \ - include/openflow/openflow-1.5.h \ - include/openflow/openflow-common.h \ - include/openflow/openflow.h + openflow/nicira-ext.h \ + openflow/openflow-1.0.h \ + openflow/openflow-1.1.h \ + openflow/openflow-1.2.h \ + openflow/openflow-1.3.h \ + openflow/openflow-1.4.h \ + openflow/openflow-1.5.h \ + openflow/openflow-common.h \ + openflow/openflow.h if HAVE_PYTHON SUFFIXES += .h .hstamp @@ -17,42 +17,39 @@ SUFFIXES += .h .hstamp touch $@ HSTAMP_FILES = \ - include/openflow/nicira-ext.hstamp \ - include/openflow/openflow-1.0.hstamp \ - include/openflow/openflow-1.1.hstamp \ - include/openflow/openflow-1.2.hstamp \ - include/openflow/openflow-1.3.hstamp \ - include/openflow/openflow-1.4.hstamp \ - include/openflow/openflow-1.5.hstamp \ - include/openflow/openflow-common.hstamp \ - include/openflow/openflow.hstamp + openflow/nicira-ext.hstamp \ + openflow/openflow-1.0.hstamp \ + openflow/openflow-1.1.hstamp \ + openflow/openflow-1.2.hstamp \ + openflow/openflow-1.3.hstamp \ + openflow/openflow-1.4.hstamp \ + openflow/openflow-1.5.hstamp \ + openflow/openflow-common.hstamp \ + openflow/openflow.hstamp CLEANFILES += $(HSTAMP_FILES) ALL_LOCAL += $(HSTAMP_FILES) -$(HSTAMP_FILES): build-aux/check-structs +$(HSTAMP_FILES): $(srcdir)/build-aux/check-structs -include/openflow/openflow-1.0.hstamp: \ - include/openflow/openflow-common.h -include/openflow/openflow-1.1.hstamp: \ - include/openflow/openflow-common.h -include/openflow/openflow-1.2.hstamp: \ - include/openflow/openflow-common.h \ - include/openflow/openflow-1.1.h -include/openflow/openflow-1.3.hstamp: \ - include/openflow/openflow-common.h \ - include/openflow/openflow-1.1.h \ - include/openflow/openflow-1.2.h -include/openflow/openflow-1.4.hstamp: \ - include/openflow/openflow-1.4.h -include/openflow/openflow-1.5.hstamp: \ - include/openflow/openflow-1.5.h -include/openflow/nicira-ext.hstamp: \ - include/openflow/openflow.h \ - include/openflow/openflow-common.h \ - include/openflow/openflow-1.0.h \ - include/openflow/openflow-1.1.h \ - include/openflow/openflow-1.2.h \ - include/openflow/openflow-1.3.h +openflow/openflow-1.0.hstamp: \ + openflow/openflow-common.h +openflow/openflow-1.1.hstamp: \ + openflow/openflow-common.h +openflow/openflow-1.2.hstamp: \ + openflow/openflow-common.h \ + openflow/openflow-1.1.h +openflow/openflow-1.3.hstamp: \ + openflow/openflow-common.h \ + openflow/openflow-1.1.h \ + openflow/openflow-1.2.h +openflow/openflow-1.4.hstamp: \ + openflow/openflow-1.4.h +openflow/openflow-1.5.hstamp: \ + openflow/openflow-1.5.h +openflow/nicira-ext.hstamp: \ + openflow/openflow.h \ + openflow/openflow-common.h \ + openflow/openflow-1.0.h \ + openflow/openflow-1.1.h \ + openflow/openflow-1.2.h \ + openflow/openflow-1.3.h endif - -EXTRA_DIST += build-aux/check-structs - diff --git a/include/openvswitch/automake.mk b/include/openvswitch/automake.mk index d651c16..44367bf 100644 --- a/include/openvswitch/automake.mk +++ b/include/openvswitch/automake.mk @@ -1,3 +1,3 @@ noinst_HEADERS += \ - include/openvswitch/types.h + openvswitch/types.h diff --git a/include/sparse/automake.mk b/include/sparse/automake.mk index 572c7c2..8ffbbad 100644 --- a/include/sparse/automake.mk +++ b/include/sparse/automake.mk @@ -1,10 +1,10 @@ noinst_HEADERS += \ - include/sparse/arpa/inet.h \ - include/sparse/assert.h \ - include/sparse/math.h \ - include/sparse/netinet/in.h \ - include/sparse/netinet/ip6.h \ - include/sparse/netpacket/packet.h \ - include/sparse/pthread.h \ - include/sparse/sys/socket.h \ - include/sparse/sys/wait.h + sparse/arpa/inet.h \ + sparse/assert.h \ + sparse/math.h \ + sparse/netinet/in.h \ + sparse/netinet/ip6.h \ + sparse/netpacket/packet.h \ + sparse/pthread.h \ + sparse/sys/socket.h \ + sparse/sys/wait.h diff --git a/include/windows/automake.mk b/include/windows/automake.mk index 58b52f1..a8e3d3d 100644 --- a/include/windows/automake.mk +++ b/include/windows/automake.mk @@ -6,30 +6,30 @@ # without warranty of any kind. noinst_HEADERS += \ - include/windows/arpa/inet.h \ - include/windows/dirent.h \ - include/windows/getopt.h \ - include/windows/linux/pkt_sched.h \ - include/windows/linux/types.h \ - include/windows/net/if.h \ - include/windows/netdb.h \ - include/windows/netpacket/packet.h \ - include/windows/netinet/icmp6.h \ - include/windows/netinet/in.h \ - include/windows/netinet/in_systm.h \ - include/windows/netinet/ip.h \ - include/windows/netinet/ip6.h \ - include/windows/netinet/tcp.h \ - include/windows/poll.h \ - include/windows/strings.h \ - include/windows/syslog.h \ - include/windows/sys/epoll.h \ - include/windows/sys/ioctl.h \ - include/windows/sys/resource.h \ - include/windows/sys/socket.h \ - include/windows/sys/time.h \ - include/windows/sys/uio.h \ - include/windows/sys/un.h \ - include/windows/sys/wait.h \ - include/windows/unistd.h \ - include/windows/windefs.h + windows/arpa/inet.h \ + windows/dirent.h \ + windows/getopt.h \ + windows/linux/pkt_sched.h \ + windows/linux/types.h \ + windows/net/if.h \ + windows/netdb.h \ + windows/netpacket/packet.h \ + windows/netinet/icmp6.h \ + windows/netinet/in.h \ + windows/netinet/in_systm.h \ + windows/netinet/ip.h \ + windows/netinet/ip6.h \ + windows/netinet/tcp.h \ + windows/poll.h \ + windows/strings.h \ + windows/syslog.h \ + windows/sys/epoll.h \ + windows/sys/ioctl.h \ + windows/sys/resource.h \ + windows/sys/socket.h \ + windows/sys/time.h \ + windows/sys/uio.h \ + windows/sys/un.h \ + windows/sys/wait.h \ + windows/unistd.h \ + windows/windefs.h -- 1.9.3 _______________________________________________ dev mailing list dev@openvswitch.org http://openvswitch.org/mailman/listinfo/dev