Commit 085152e1 authored by Gary King's avatar Gary King
Browse files

started on some make file automation

Bare bones GNUmakefile and a new `bin` directory with a few
handy (?) scripts.
parent b2815bc1
......@@ -2,11 +2,9 @@
make/
common-lisp.net
.vcs
GNUmakefile
init-lisp.lisp
website/changelog.xml
moptilities.tar.gz
website/output/
test-results/
lift-local.config
......
system := "asdf"
#user := $(shell basename `echo "$home"`)
user := "gking"
webhome_private := $(user)@common-lisp.net:/project/asdf/public_html/
webhome_public := "http://common-lisp.net/project/asdf/"
clnet_home := "/project/asdf/public_html/"
sourceDirectory := $(shell pwd)
# website, tag, install
install: archive-copy
archive: FORCE
bin/build-tarball.sh
archive-copy: archive
bin/rsync-cp.sh tmp/asdf*.tar.gz $(webhome_private)/archives
bin/link-tarball.sh $(clnet_home) $(user)
bin/rsync-cp.sh tmp/asdf.lisp $(webhome_private)
website-copy: FORCE
bin/rsync-cp.sh website/output/ $(webhome_private)
bin/rsync-cp.sh tmp/asdf.lisp $(webhome_private)
clean_dirs = $(sourceDirectory)
clean_extensions = fasl dfsl cfsl fasl fas lib
clean: FORCE
@for dir in $(clean_dirs); do \
if test -d $$dir; then \
echo Cleaning $$dir; \
for ext in $(clean_extensions); do \
find $$dir \( -name "*.$$ext" \) \
-and -not -path \""*/.git/*"\" \
-and -not -path \""*/_darcs/*"\" \
-and -not -path \""*/tags/*"\" -print -delete; \
done; \
fi; \
done
FORCE:
\ No newline at end of file
#!/bin/sh
# create tarball and tagged asdf.lisp file in tmp/ using the most recent
# annotated tag
tag=`git describe --tags`
if [ "$tag" == "" ]; then
echo "Unable to find most recent tag, exiting"
exit 1
fi
if [ -d "tmp" ]; then
rm -r tmp
fi
mkdir tmp
archive_file="tmp/asdf-$tag.tar.gz"
echo "Create tmp/asdf.tar.gz with tag $tag"
git archive $tag --prefix="asdf/" --format=tar | \
gzip > $archive_file
echo "Extract tmp/asdf.lisp"
tar --to-stdout -zxf $archive_file asdf/asdf.lisp > tmp/asdf.lisp
#!/bin/sh
if [ -z $1 ]; then
echo "Remote directory must be specified."
exit 1
fi
if [ -z $2 ]; then
echo "Remote username must be specified."
exit 1
fi
clnet_home="$1"
user=$2
tarball=`ls tmp/asdf*.tar.gz`
tarball=`basename $tarball`
latest="asdf.tar.gz"
echo "Link $tarball to $latest"
ssh $user@common-lisp.net "rm -f $clnet_home$latest; \
ln -s $clnet_home/archives/$tarball $clnet_home$latest"
#!/bin/sh
# --extended-attributes \
rsync \
--archive \
--rsh=ssh \
--compress \
--partial \
--include "*/" --include "*" \
--progress \
-v \
$*
#!/bin/sh
# tag the currently checked out branch with $tag and update
# the tag RELEASE to point at this. $tag must not already exist.
# create tarball and tagged asdf.lisp file in tmp/
if [ -z $1 ]; then
echo "Tag must be specified."
exit 1
fi
tag=$1
system="asdf"
git tag | grep -q $tag > /dev/null
if [ $? -eq 0 ]; then
echo "Tag $tag already exists. Exiting."
exit 1
fi
echo "Tagging with $tag"
git tag $tag
echo "Tagging with RELEASE"
git tag -f RELEASE
bin/build-tarball.sh
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment