diff --git a/.gitignore b/.gitignore
index 2ac9cdac7..f1cdcf124 100644
--- a/.gitignore
+++ b/.gitignore
@@ -55,6 +55,7 @@
 /docs-check
 /install-sh
 /libtool
+/manpages.mk
 /manpage-check
 /missing
 /missing-distfiles
diff --git a/Makefile.am b/Makefile.am
index 27ef9e4b4..6981b943e 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -412,8 +412,8 @@ flake8-check: $(FLAKE8_PYFILES)
 endif
 CLEANFILES += flake8-check
 
-include $(srcdir)/manpages.mk
-$(srcdir)/manpages.mk: $(MAN_ROOTS) build-aux/sodepends.py python/build/soutil.py
+-include manpages.mk
+manpages.mk: $(MAN_ROOTS) build-aux/sodepends.py python/build/soutil.py
 	@PYTHONPATH=$$PYTHONPATH$(psep)$(srcdir)/python $(PYTHON3) $(srcdir)/build-aux/sodepends.py -I. -I$(srcdir) $(MAN_ROOTS) >$(@F).tmp
 	@if cmp -s $(@F).tmp $@; then \
 	  touch $@; \
@@ -421,6 +421,7 @@ $(srcdir)/manpages.mk: $(MAN_ROOTS) build-aux/sodepends.py python/build/soutil.p
 	else \
 	  mv $(@F).tmp $@; \
 	fi
+CLEANFILES += manpages.mk
 CLEANFILES += manpage-dep-check
 
 if VSTUDIO_DDK
diff --git a/manpages.mk b/manpages.mk
deleted file mode 100644
index dc201484c..000000000
--- a/manpages.mk
+++ /dev/null
@@ -1,266 +0,0 @@
-# Generated automatically -- do not modify!    -*- buffer-read-only: t -*-
-
-ovsdb/ovsdb-client.1: \
-	ovsdb/ovsdb-client.1.in \
-	lib/common-syn.man \
-	lib/common.man \
-	lib/daemon-syn.man \
-	lib/daemon.man \
-	lib/ovs.tmac \
-	lib/ssl-bootstrap-syn.man \
-	lib/ssl-bootstrap.man \
-	lib/ssl-connect-syn.man \
-	lib/ssl-connect.man \
-	lib/ssl-syn.man \
-	lib/ssl.man \
-	lib/table.man \
-	lib/vlog-syn.man \
-	lib/vlog.man \
-	ovsdb/ovsdb-schemas.man
-ovsdb/ovsdb-client.1.in:
-lib/common-syn.man:
-lib/common.man:
-lib/daemon-syn.man:
-lib/daemon.man:
-lib/ovs.tmac:
-lib/ssl-bootstrap-syn.man:
-lib/ssl-bootstrap.man:
-lib/ssl-connect-syn.man:
-lib/ssl-connect.man:
-lib/ssl-syn.man:
-lib/ssl.man:
-lib/table.man:
-lib/vlog-syn.man:
-lib/vlog.man:
-ovsdb/ovsdb-schemas.man:
-
-ovsdb/ovsdb-server.1: \
-	ovsdb/ovsdb-server.1.in \
-	lib/common-syn.man \
-	lib/common.man \
-	lib/coverage-unixctl.man \
-	lib/daemon-syn.man \
-	lib/daemon.man \
-	lib/memory-unixctl.man \
-	lib/ovs.tmac \
-	lib/service-syn.man \
-	lib/service.man \
-	lib/ssl-bootstrap-syn.man \
-	lib/ssl-bootstrap.man \
-	lib/ssl-connect-syn.man \
-	lib/ssl-connect.man \
-	lib/ssl-peer-ca-cert-syn.man \
-	lib/ssl-peer-ca-cert.man \
-	lib/ssl-syn.man \
-	lib/ssl.man \
-	lib/unixctl-syn.man \
-	lib/unixctl.man \
-	lib/vlog-syn.man \
-	lib/vlog-unixctl.man \
-	lib/vlog.man
-ovsdb/ovsdb-server.1.in:
-lib/common-syn.man:
-lib/common.man:
-lib/coverage-unixctl.man:
-lib/daemon-syn.man:
-lib/daemon.man:
-lib/memory-unixctl.man:
-lib/ovs.tmac:
-lib/service-syn.man:
-lib/service.man:
-lib/ssl-bootstrap-syn.man:
-lib/ssl-bootstrap.man:
-lib/ssl-connect-syn.man:
-lib/ssl-connect.man:
-lib/ssl-peer-ca-cert-syn.man:
-lib/ssl-peer-ca-cert.man:
-lib/ssl-syn.man:
-lib/ssl.man:
-lib/unixctl-syn.man:
-lib/unixctl.man:
-lib/vlog-syn.man:
-lib/vlog-unixctl.man:
-lib/vlog.man:
-
-ovsdb/ovsdb-tool.1: \
-	ovsdb/ovsdb-tool.1.in \
-	lib/common-syn.man \
-	lib/common.man \
-	lib/ovs.tmac \
-	lib/vlog-syn.man \
-	lib/vlog.man \
-	ovsdb/ovsdb-schemas.man
-ovsdb/ovsdb-tool.1.in:
-lib/common-syn.man:
-lib/common.man:
-lib/ovs.tmac:
-lib/vlog-syn.man:
-lib/vlog.man:
-ovsdb/ovsdb-schemas.man:
-
-utilities/bugtool/ovs-bugtool.8: \
-	utilities/bugtool/ovs-bugtool.8.in \
-	lib/ovs.tmac
-utilities/bugtool/ovs-bugtool.8.in:
-lib/ovs.tmac:
-
-
-utilities/ovs-dpctl-top.8: \
-	utilities/ovs-dpctl-top.8.in \
-	lib/ovs.tmac
-utilities/ovs-dpctl-top.8.in:
-lib/ovs.tmac:
-
-utilities/ovs-dpctl.8: \
-	utilities/ovs-dpctl.8.in \
-	lib/common.man \
-	lib/dpctl.man \
-	lib/ovs.tmac \
-	lib/vlog.man
-utilities/ovs-dpctl.8.in:
-lib/common.man:
-lib/dpctl.man:
-lib/ovs.tmac:
-lib/vlog.man:
-
-utilities/ovs-ofctl.8: \
-	utilities/ovs-ofctl.8.in \
-	lib/colors.man \
-	lib/common.man \
-	lib/daemon.man \
-	lib/ofp-version.man \
-	lib/ovs.tmac \
-	lib/ssl.man \
-	lib/unixctl.man \
-	lib/vconn-active.man \
-	lib/vlog.man
-utilities/ovs-ofctl.8.in:
-lib/colors.man:
-lib/common.man:
-lib/daemon.man:
-lib/ofp-version.man:
-lib/ovs.tmac:
-lib/ssl.man:
-lib/unixctl.man:
-lib/vconn-active.man:
-lib/vlog.man:
-
-utilities/ovs-pcap.1: \
-	utilities/ovs-pcap.1.in \
-	lib/common-syn.man \
-	lib/common.man \
-	lib/ovs.tmac
-utilities/ovs-pcap.1.in:
-lib/common-syn.man:
-lib/common.man:
-lib/ovs.tmac:
-
-lib/ovs.tmac:
-
-utilities/ovs-testcontroller.8: \
-	utilities/ovs-testcontroller.8.in \
-	lib/common.man \
-	lib/daemon.man \
-	lib/ofp-version.man \
-	lib/ovs.tmac \
-	lib/ssl-peer-ca-cert.man \
-	lib/ssl.man \
-	lib/unixctl.man \
-	lib/vconn-active.man \
-	lib/vconn-passive.man \
-	lib/vlog.man
-utilities/ovs-testcontroller.8.in:
-lib/common.man:
-lib/daemon.man:
-lib/ofp-version.man:
-lib/ovs.tmac:
-lib/ssl-peer-ca-cert.man:
-lib/ssl.man:
-lib/unixctl.man:
-lib/vconn-active.man:
-lib/vconn-passive.man:
-lib/vlog.man:
-
-utilities/ovs-vsctl.8: \
-	utilities/ovs-vsctl.8.in \
-	lib/common.man \
-	lib/db-ctl-base.man \
-	lib/ovs.tmac \
-	lib/ssl-bootstrap.man \
-	lib/ssl-peer-ca-cert.man \
-	lib/ssl.man \
-	lib/table.man \
-	lib/vconn-active.man \
-	lib/vconn-passive.man \
-	lib/vlog.man
-utilities/ovs-vsctl.8.in:
-lib/common.man:
-lib/db-ctl-base.man:
-lib/ovs.tmac:
-lib/ssl-bootstrap.man:
-lib/ssl-peer-ca-cert.man:
-lib/ssl.man:
-lib/table.man:
-lib/vconn-active.man:
-lib/vconn-passive.man:
-lib/vlog.man:
-
-vswitchd/ovs-vswitchd.8: \
-	vswitchd/ovs-vswitchd.8.in \
-	lib/common.man \
-	lib/coverage-unixctl.man \
-	lib/daemon.man \
-	lib/dpctl.man \
-	lib/dpif-netdev-unixctl.man \
-	lib/memory-unixctl.man \
-	lib/netdev-dpdk-unixctl.man \
-	lib/ovs.tmac \
-	lib/service.man \
-	lib/ssl-bootstrap.man \
-	lib/ssl-peer-ca-cert.man \
-	lib/ssl.man \
-	lib/unixctl.man \
-	lib/vlog-unixctl.man \
-	lib/vlog.man \
-	ofproto/ofproto-dpif-unixctl.man \
-	ofproto/ofproto-tnl-unixctl.man \
-	ofproto/ofproto-unixctl.man
-vswitchd/ovs-vswitchd.8.in:
-lib/common.man:
-lib/coverage-unixctl.man:
-lib/daemon.man:
-lib/dpctl.man:
-lib/dpif-netdev-unixctl.man:
-lib/memory-unixctl.man:
-lib/netdev-dpdk-unixctl.man:
-lib/ovs.tmac:
-lib/service.man:
-lib/ssl-bootstrap.man:
-lib/ssl-peer-ca-cert.man:
-lib/ssl.man:
-lib/unixctl.man:
-lib/vlog-unixctl.man:
-lib/vlog.man:
-ofproto/ofproto-dpif-unixctl.man:
-ofproto/ofproto-tnl-unixctl.man:
-ofproto/ofproto-unixctl.man:
-
-vtep/vtep-ctl.8: \
-	vtep/vtep-ctl.8.in \
-	lib/common.man \
-	lib/db-ctl-base.man \
-	lib/ovs.tmac \
-	lib/ssl-bootstrap.man \
-	lib/ssl-peer-ca-cert.man \
-	lib/ssl.man \
-	lib/table.man \
-	lib/vlog.man
-vtep/vtep-ctl.8.in:
-lib/common.man:
-lib/db-ctl-base.man:
-lib/ovs.tmac:
-lib/ssl-bootstrap.man:
-lib/ssl-peer-ca-cert.man:
-lib/ssl.man:
-lib/table.man:
-lib/vlog.man:
