makefile: add 'dist' target.
This commit is contained in:
parent
b4e2a6b4b6
commit
f0b0c455c7
16
Makefile
16
Makefile
|
@ -69,10 +69,12 @@ TAGS: $(SRCS)
|
||||||
clean_deps:
|
clean_deps:
|
||||||
@ rm -f .deps
|
@ rm -f .deps
|
||||||
|
|
||||||
clean_sources:
|
SOURCES = Timeline/.sources FL/.sources
|
||||||
@ rm -f Timeline/.sources FL/.sources
|
|
||||||
|
|
||||||
.sources: Timeline/.sources FL/.sources
|
clean_sources:
|
||||||
|
@ rm -f $(SOURCES)
|
||||||
|
|
||||||
|
.sources: $(SOURCES)
|
||||||
|
|
||||||
rearrange: clean_deps clean_sources
|
rearrange: clean_deps clean_sources
|
||||||
@ $(MAKE) -s .deps
|
@ $(MAKE) -s .deps
|
||||||
|
@ -82,4 +84,12 @@ rearrange: clean_deps clean_sources
|
||||||
|
|
||||||
clean: FL_clean Timeline_clean
|
clean: FL_clean Timeline_clean
|
||||||
|
|
||||||
|
# (generated) files not in git that need to go into the distribution tarball
|
||||||
|
EXTRA_DIST := $(SOURCES)
|
||||||
|
|
||||||
|
dist: .sources
|
||||||
|
@ echo -n Building tarball...
|
||||||
|
@ scripts/dist non-daw $(VERSION) $(EXTRA_DIST)
|
||||||
|
@ echo $(DONE)
|
||||||
|
|
||||||
-include .deps
|
-include .deps
|
||||||
|
|
|
@ -0,0 +1,26 @@
|
||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
# May 2008 Jonathan Moore Liles
|
||||||
|
#
|
||||||
|
# Use git to build a distribution tarball.
|
||||||
|
#
|
||||||
|
# USAGE:
|
||||||
|
#
|
||||||
|
# dist foo 1.2.0 extra-files ...
|
||||||
|
#
|
||||||
|
# This will build a tarball foo-1.2.0.tar.bz2 using git tag 'v1.2.0'
|
||||||
|
#
|
||||||
|
# Files not in git but listed as arguemnts will also be included in the archive.
|
||||||
|
|
||||||
|
. colors
|
||||||
|
|
||||||
|
NAME="$1"
|
||||||
|
shift 1
|
||||||
|
VERSION="$1"
|
||||||
|
shift 1
|
||||||
|
EXTRA_DIST="$@"
|
||||||
|
|
||||||
|
PREFIX="${NAME}-${VERSION}"
|
||||||
|
git archive --prefix="${PREFIX}/" v${VERSION} > ${PREFIX}.tar
|
||||||
|
tar --owner 0 --group 0 --transform "s:^:${PREFIX}/:" -rf ${PREFIX}.tar ${EXTRA_DIST}
|
||||||
|
bzip2 -f ${PREFIX}.tar
|
Loading…
Reference in New Issue