Browse Source

makefile: add 'dist' target.

tags/non-daw-v1.1.0
Jonathan Moore Liles 17 years ago
parent
commit
f0b0c455c7
2 changed files with 38 additions and 2 deletions
  1. +12
    -2
      Makefile
  2. +26
    -0
      scripts/dist

+ 12
- 2
Makefile View File

@@ -69,10 +69,12 @@ TAGS: $(SRCS)
clean_deps:
@ rm -f .deps

SOURCES = Timeline/.sources FL/.sources

clean_sources:
@ rm -f Timeline/.sources FL/.sources
@ rm -f $(SOURCES)

.sources: Timeline/.sources FL/.sources
.sources: $(SOURCES)

rearrange: clean_deps clean_sources
@ $(MAKE) -s .deps
@@ -82,4 +84,12 @@ rearrange: clean_deps clean_sources

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

+ 26
- 0
scripts/dist View File

@@ -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…
Cancel
Save