[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Octave-Forge: requirement for a maintainer Makefile for release
From: |
Carnë Draug |
Subject: |
Re: Octave-Forge: requirement for a maintainer Makefile for release |
Date: |
Thu, 24 Nov 2016 23:45:11 +0000 |
On 16 November 2016 at 14:47, Alexander Barth <address@hidden> wrote:
> Hi all,
>
> I am maintain currently 6 packages and I use a bash script to prepare
> a release (do a clean check out, remove unnecessary files such as
> .gitignore, make configure script, run tests, generate documentation
> ...)
>
> I think it would be good to have all these tasks at a central place (a
> bash script or a Makefile fragment) rather than to explicitly copy
> this logic in all 6 Makefiles. Otherwise it would be quite difficult
> to maintain the Makefiles in the long run.
>
The problem with a central place with a unique script or Makefile for
releases is that it would impose a unique shape on all packages which
would be too restritive (or would have to be too complex to achieve
that flexibility). For example, not all packages need to run autoconf
to create the configure script. Some of those need also to run aclocal
before. Some packages have directories for scripts and code snippets
that are removed from package releases. The ltfat Octave package is
only part of a larger project. I am sure there will be other cases.
You can still keep all the 6 Makefile on your packages the same, it's
just that you would have to sync them when a change is made. You can
even a one line Makefile that only calls your script (but your existing
script would still have to be committed on the six repos). I would
guess that they wouldn't change much overtime so it wouldn't be too
much of a burden.
Also, while it would be nice to also have targets on the Makefile to
run the tests and install development versions, I am only proposing
a target to make a release which can be this:
PACKAGE := $(shell grep "^Name: " DESCRIPTION | cut -f2 -d" ")
VERSION := $(shell grep "^Version: " DESCRIPTION | cut -f2 -d" ")
TARGET_DIR := target/
RELEASE_DIR := $(TARGET_DIR)/$(PACKAGE)-$(VERSION)
RELEASE_TARBALL := $(TARGET_DIR)/$(PACKAGE)-$(VERSION).tar.gz
.PHONY: dist
dist: $(RELEASE_TARBALL)
%.tar.gz: %
tar -c -f - --posix -C "$(TARGET_DIR)/" "$(notdir $<)" | gzip -9n > "$@"
$(RELEASE_DIR): .git/index
$(RM) -r "$@"
git archive --format=tar --prefix="$@/" HEAD | tar -x
$(RM) "$@/.gitignore"
chmod -R a+rX,u+w,go-w "$@"
I have also written a template [1] for the developers instructions based on
the existing Makefiles now present on the forge packages (the example above
is adapted from it). Could you give any feedback if that can help?
Carnë
[1]
http://hg.code.sf.net/p/octave/project-web/file/d2dd7f6a47d6/htdocs/templates/Makefile
- Octave-Forge: requirement for a maintainer Makefile for release, Carnë Draug, 2016/11/11
- Re: Octave-Forge: requirement for a maintainer Makefile for release, Juan Pablo Carbajal, 2016/11/11
- Re: Octave-Forge: requirement for a maintainer Makefile for release, Philip Nienhuis, 2016/11/11
- Re: Octave-Forge: requirement for a maintainer Makefile for release, Carnë Draug, 2016/11/13
- Re: Octave-Forge: requirement for a maintainer Makefile for release, Philip Nienhuis, 2016/11/13
- Re: Octave-Forge: requirement for a maintainer Makefile for release, Carnë Draug, 2016/11/13
- Re: Octave-Forge: requirement for a maintainer Makefile for release, Alexander Barth, 2016/11/16
- Re: Octave-Forge: requirement for a maintainer Makefile for release,
Carnë Draug <=
- Re: Octave-Forge: requirement for a maintainer Makefile for release, Juan Pablo Carbajal, 2016/11/29
- Re: Octave-Forge: requirement for a maintainer Makefile for release, Juan Pablo Carbajal, 2016/11/29
- Re: Octave-Forge: requirement for a maintainer Makefile for release, Oliver Heimlich, 2016/11/20
- Re: Octave-Forge: requirement for a maintainer Makefile for release, Carnë Draug, 2016/11/23
- Re: Octave-Forge: requirement for a maintainer Makefile for release, John W. Eaton, 2016/11/23