zooko <[EMAIL PROTECTED]> writes:

> Dear Eric Kow:
>
> If you apply this patch, then the buildslaves can do "scp snapshots/*
> $server".  I tested this and it worked as expected:

In that case, rsync would be better, since snapshots would be created
but not (normally) destroyed.

Of course, you can also just do "scp darcs-* fooserv" without this
patch; the globbing isn't particularly different.

> New patches:
>
> [on "make darcs-snapshot" make a copy of the executable in a directory
> named "snapshots" and named with its version number  including patch
> count
> [EMAIL PROTECTED]
>  Ignore-this: 408b016d6a108ceddfe6fdb104160d96
> ] hunk ./GNUmakefile 228
>
>  DARCS_VERSION_WITH_PATCHES=$(shell sed -e 's/ (//' -e 's/ patches)//'
> -e 's/+ /+/' release/STATE)
>  darcs-nightly: darcs release/STATE
> -     ln -sf darcs darcs-$(DARCS_VERSION_WITH_PATCHES)
> +     mkdir -p snapshots
> +     cp darcs snapshots/darcs-$(DARCS_VERSION_WITH_PATCHES)

I prefer to use non-PHONY targets, then make the PHONY targets
(i.e. darcs-nightly) simply alias them.  Something like (untested):

    snapshots:
        mkdir $@
    snapshots/darcs-%: darcs snapshots
        cp -f $< $@
    darcs-nightly: release/STATE snapshots/darcs-$(DARCS_VERSION_WITH_PATCHES)

however now that I glare at it, the ugliness resulting from the
release/STATE dependency makes me think it's better to just go with your
version.

>  dist: darcs $(PREDIST_COPY_FILES)
>       REPO_PATH="$$PWD" ./darcs dist --dist-name darcs-$(DARCS_VERSION)
> hunk ./GNUmakefile 543
>       rm -f doc/manual/darcs.ps doc/manual/darcs.pdf
> doc/manual/patch-
> theory.pdf src/Autoconf.lhs darcs.idv
>       rm -f src/ThisVersion.lhs tools/cgi/README tools/cgi/darcs.cgi
> tools/cgi/cgi.conf
>       rm -f config.command
> +     rm -rf snapshots

I generally prefer to put the cleanup code directly beneath the stanza
that generates it, because it makes it easier for the maintainer (of the
stanza) to see the cleanup and remember to update it when they change
the stanza.

This is possible due to the double-colon rules, which make the clean::
and distclean:: rule bodies catenate instead of overwriting.

E.g.

    foo bar baz: yow.o zow.o
        mkzow -o$@ $+
    distclean::
        rm -f foo bar baz

_______________________________________________
darcs-users mailing list
darcs-users@darcs.net
http://lists.osuosl.org/mailman/listinfo/darcs-users

Reply via email to