]> git.proxmox.com Git - smartmontools.git/commitdiff
make sure submodule is initialized
authorFabian Grünbichler <f.gruenbichler@proxmox.com>
Fri, 30 Sep 2016 07:44:37 +0000 (09:44 +0200)
committerFabian Grünbichler <f.gruenbichler@proxmox.com>
Fri, 30 Sep 2016 07:44:37 +0000 (09:44 +0200)
Makefile

index bcae4d2fa797e1b569b90c02dca3f3bebf04a531..2b74d161d93647f47437b645504a0ec851da53ec 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -14,7 +14,7 @@ DEB=${PACKAGE}_${VER}-${DEBREL}_${ARCH}.deb
 all: ${DEB}
        echo ${DEB}
 
-deb ${DEB}: ${SRCDIR}
+deb ${DEB}: submodule
        rm -rf ${SRCDIR}.tmp
        cp -rpa ${SRCDIR} ${SRCDIR}.tmp
        cd ${SRCDIR}.tmp; patch -p1 < ../patches/update_changelog.patch
@@ -22,9 +22,14 @@ deb ${DEB}: ${SRCDIR}
        lintian ${DEB}
        echo ${DEB}
 
+# make sure submodule was initialized
+.PHONY: submodule
+submodule:
+       test -f "${SRCDIR}/debian/changelog" || git submodule update --init
+
+# upgrade to current master
 .PHONY: download
-download ${SRCDIR}:
-       git submodule update --init
+download ${SRCDIR}: submodule
        cd ${SRCDIR}; git fetch
        cd ${SRCDIR}; git merge --ff-only master