X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=Makefile.am;h=eef8eb6bbdc3a73e1e5380dc7db5286ae5c8b9aa;hb=2ab4c7bf5156f66b8d06dd273e776e3823b6f516;hp=eb7f4f78b5cb7295e131082ba4a866b704650b34;hpb=4c1eabc12300be3190d2fb66edc07d9c607f539e;p=openvswitch diff --git a/Makefile.am b/Makefile.am index eb7f4f78..eef8eb6b 100644 --- a/Makefile.am +++ b/Makefile.am @@ -12,6 +12,7 @@ SUBDIRS = datapath AM_CPPFLAGS = $(SSL_CFLAGS) AM_CPPFLAGS += -I $(top_srcdir)/include AM_CPPFLAGS += -I $(top_srcdir)/lib +AM_CPPFLAGS += -I $(top_builddir)/lib AM_CFLAGS = -Wstrict-prototypes AM_CFLAGS += $(WARNING_FLAGS) @@ -87,7 +88,7 @@ SUFFIXES += .in -e 's,[@]abs_top_srcdir[@],$(abs_top_srcdir),g' \ -e 's,[@]ovsdbmonitordir[@],$(ovsdbmonitordir),g' \ > $@.tmp - @if head -n 1 $@.tmp | grep -q '#!'; then \ + @if head -n 1 $@.tmp | grep '#!' > /dev/null; then \ echo chmod +x $@.tmp; \ chmod +x $@.tmp; \ fi @@ -95,26 +96,31 @@ SUFFIXES += .in # If we're checked out from a Git repository, make sure that every # file that is in Git is distributed. -dist-hook-git: - if test -e $(srcdir)/.git && (git --version) >/dev/null 2>&1; then \ - rc=0; \ - for d in `cd $(srcdir) && git ls-files`; do \ - if test ! -e $(distdir)/$$d; then \ - case $$d in # ( \ - .gitignore|*/.gitignore) ;; # ( \ - *) \ - if test $$rc = 0; then \ - echo "The distribution is missing the following files:"; \ - rc=1; \ - fi; \ - echo "$$d"; \ - ;; \ - esac; \ - fi \ - done; \ - exit $$rc; \ +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) | \ + sort -u > all-distfiles; \ + (cd $(srcdir) && git ls-files) | grep -v '\.gitignore$$' | \ + sort -u > all-gitfiles; \ + comm -1 -3 all-distfiles all-gitfiles > missing-distfiles; \ + if test -s missing-distfiles; then \ + echo "The distribution is missing the following files:"; \ + cat missing-distfiles; \ + exit 1; \ + fi; \ fi -DIST_HOOKS += dist-hook-git +CLEANFILES += all-distfiles all-gitfiles missing-distfiles +# 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 > $@ +CLEANFILES += distfiles dist-hook: $(DIST_HOOKS) all-local: $(ALL_LOCAL) @@ -130,4 +136,4 @@ include debian/automake.mk include vswitchd/automake.mk include ovsdb/automake.mk include xenserver/automake.mk - +include python/ovs/automake.mk