Forge-Maintainers: Makefile simplifies your life

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

Forge-Maintainers: Makefile simplifies your life

Oliver Heimlich
I have created a Makefile [1], which automates some regular package
maintenance tasks. The Makefile is quite generic, but I have made some
assumptions. It should work well with other packages with minor or no
adjustments.

I hope, it is useful for other package maintainers as well. Highlights:

make release: Does most of the steps from [2]. Example output:

c50bb698a690682fc6d209ebb982b857  interval-0.1.1.tar.gz
2e4d35a76bf7543ba7dc44c2e83db8be  interval-html.tar.gz
Upload @ https://sourceforge.net/p/octave/package-releases/new/
Execute: hg tag "release-0.1.1"

make check: Run all package tests (without installation in GNU Octave)

make run: Recompile any outdated OCT-files automatically and run GNU
Octave in the inst directory for a quick evaluation of the package
(without re-installation in GNU Octave, so this is really fast).

Oliver

[1] https://sourceforge.net/p/octave/interval/ci/default/tree/Makefile
[2] http://octave.sourceforge.net/developers.html

Reply | Threaded
Open this post in threaded view
|

Re: Forge-Maintainers: Makefile simplifies your life

Carnë Draug
On 21 February 2015 at 19:23, Oliver Heimlich <[hidden email]> wrote:

> I have created a Makefile [1], which automates some regular package
> maintenance tasks. The Makefile is quite generic, but I have made some
> assumptions. It should work well with other packages with minor or no
> adjustments.
>
> I hope, it is useful for other package maintainers as well. Highlights:
>
> make release: Does most of the steps from [2]. Example output:
> …
> c50bb698a690682fc6d209ebb982b857  interval-0.1.1.tar.gz
> 2e4d35a76bf7543ba7dc44c2e83db8be  interval-html.tar.gz
> Upload @ https://sourceforge.net/p/octave/package-releases/new/
> Execute: hg tag "release-0.1.1"

This is pretty handy, thank you.

> make check: Run all package tests (without installation in GNU Octave)

If the package makes use of PKG_ADD in oct files this will fail. Something like
the following can help working around this.

    $(eval PKG_ADD = $(shell grep -Pho '(?<=// PKG_ADD: ).*' ${CC_SOURCES}))
    $(OCTAVE) --no-window-system --silent --eval 'addpath ("inst/"); '\
    'addpath ("src/"); ${PKG_ADD} runtests ("inst/"); runtests ("src/");'

Carnë

Reply | Threaded
Open this post in threaded view
|

Re: Forge-Maintainers: Makefile simplifies your life

Carnë Draug
On 21 February 2015 at 19:32, Carnë Draug <[hidden email]> wrote:
> On 21 February 2015 at 19:23, Oliver Heimlich <[hidden email]> wrote:
>> I have created a Makefile [1], which automates some regular package
>> maintenance tasks. The Makefile is quite generic, but I have made some
>> assumptions. It should work well with other packages with minor or no
>> adjustments.
>>
>
> This is pretty handy, thank you.
>

I finally got around to adjust image's Makefile package using yours as example.
This is really cool, the "make run" is specially useful for me. The main change
I made (other than personal preferences such as having the commands printed),
was handling PKG_ADD commands in oct and m files.  And here it is, for other
maintainers that may have the same problem [1]

Thank you

Carnë

[1] http://hg.code.sf.net/p/octave/image/file/default/Makefile

Reply | Threaded
Open this post in threaded view
|

Re: Forge-Maintainers: Makefile simplifies your life

Mike Miller
On Thu, Feb 26, 2015 at 11:19:13 +0000, Carnë Draug wrote:

> On 21 February 2015 at 19:32, Carnë Draug <[hidden email]> wrote:
> > On 21 February 2015 at 19:23, Oliver Heimlich <[hidden email]> wrote:
> >> I have created a Makefile [1], which automates some regular package
> >> maintenance tasks. The Makefile is quite generic, but I have made some
> >> assumptions. It should work well with other packages with minor or no
> >> adjustments.
> >>
> >
> > This is pretty handy, thank you.
> >
>
> I finally got around to adjust image's Makefile package using yours as example.
> This is really cool, the "make run" is specially useful for me. The main change
> I made (other than personal preferences such as having the commands printed),
> was handling PKG_ADD commands in oct and m files.  And here it is, for other
> maintainers that may have the same problem [1]

And more thanks to you both. I borrowed and adapted this too, here is
yet another version [1,2].

[1] http://hg.code.sf.net/p/octave/communications/file/default/Makefile
[2] http://hg.code.sf.net/p/octave/signal/file/default/Makefile

--
mike