diff options
Diffstat (limited to 'mk')
-rw-r--r-- | mk/dist.mk | 5 | ||||
-rw-r--r-- | mk/gitignore.mk | 15 | ||||
-rw-r--r-- | mk/lib.mk | 2 | ||||
-rw-r--r-- | mk/prog.mk | 2 | ||||
-rw-r--r-- | mk/scripts.mk | 2 | ||||
-rw-r--r-- | mk/svnignore.mk | 14 |
6 files changed, 20 insertions, 20 deletions
@@ -2,6 +2,7 @@ # Copyright 2008 Roy Marples <roy@marples.name> # All rights reserved. Released under the 2-clause BSD license. +GITREF?= HEAD DISTPREFIX?= ${NAME}-${VERSION} DISTFILE?= ${DISTPREFIX}.tar.bz2 @@ -14,9 +15,7 @@ SNAPDIR= ${DISTPREFIX}-${SNAP} SNAPFILE= ${SNAPDIR}.tar.bz2 dist: - svn export . ${DISTPREFIX} - tar cjpf ${DISTFILE} ${DISTPREFIX} - rm -rf ${DISTPREFIX} + git archive --prefix=${DISTPREFIX}/ ${GITREF} | bzip2 > ${DISTFILE} snapshot: rm -rf /tmp/${SNAPDIR} diff --git a/mk/gitignore.mk b/mk/gitignore.mk new file mode 100644 index 00000000..ed274497 --- /dev/null +++ b/mk/gitignore.mk @@ -0,0 +1,15 @@ +# rules to make .gitignore files +# Copyright 2008 Roy Marples <roy@marples.name> +# All rights reserved. Released under the 2-clause BSD license. + +IGNOREFILES+= ${CLEANFILES} + +.PHONY: .gitignore + +.gitignore: + @if test -n "${IGNOREFILES}"; then \ + echo "Ignoring ${IGNOREFILES}"; \ + echo ${IGNOREFILES} | tr ' ' '\n' > .gitignore; \ + fi + +ignore: .gitignore @@ -64,4 +64,4 @@ extra_depend: include ${MK}/sys.mk include ${MK}/os.mk include ${MK}/depend.mk -include ${MK}/svnignore.mk +include ${MK}/gitignore.mk @@ -38,4 +38,4 @@ extra_depend: include ${MK}/sys.mk include ${MK}/os.mk include ${MK}/depend.mk -include ${MK}/svnignore.mk +include ${MK}/gitignore.mk diff --git a/mk/scripts.mk b/mk/scripts.mk index 663731b8..f65c1422 100644 --- a/mk/scripts.mk +++ b/mk/scripts.mk @@ -56,4 +56,4 @@ CLEANFILES+= ${OBJS} clean: @if test -n "${CLEANFILES}"; then echo "rm -f ${CLEANFILES}"; rm -f ${CLEANFILES}; fi -include ${MK}/svnignore.mk +include ${MK}/gitignore.mk diff --git a/mk/svnignore.mk b/mk/svnignore.mk deleted file mode 100644 index 1d2c6250..00000000 --- a/mk/svnignore.mk +++ /dev/null @@ -1,14 +0,0 @@ -# rules to make svn ignore files -# Copyright 2008 Roy Marples <roy@marples.name> -# All rights reserved. Released under the 2-clause BSD license. - -IGNOREFILES+= ${CLEANFILES} - -ignore: - @if test -n "${IGNOREFILES}"; then \ - echo "=> Ignoring ${IGNOREFILES}"; \ - files="$$(echo "${IGNOREFILES}" | tr ' ' '\n')"; \ - efiles="$$(svn propget svn:ignore .)"; \ - sfiles="$$(printf "$${files}\n$${efiles}" | sort -u)"; \ - eval svn propset svn:ignore \'"$${sfiles}"\' .; \ - fi |