Dear Olaf

On 04/04/2014 02:45 PM, Olaf Walter wrote:
> Dear easybuilders,
>
> the tool that I'm working on contains two source directories, each of them 
> requiring a make. My idea was to create a patch that writes a top-level 
> Makefile that calls both of them. This is what I get:
>
> EasyBuildError: "EasyBuild crashed with an error (at 
> easybuild/1.11.1_p370_2/lib/python2.6/site-packages/easybuild_framework-1.11.1-py2.6.egg/easybuild/tools/filetools.py:610
>  in apply_patch): Can't determine patch level for patch 
> /gpfs01/home/bioadmn/eb20140311/eb/erds-1.1-Makefile.patch from directory 
> /gpfs01/home/bioadmn/.local/easybuild/build/erds/1.1/goolf-1.4.12-no-OFED/erds1.1"
>
> This is my patch:
>
> diff -urN erds1.1.orig/Makefile erds1.1/Makefile
> --- erds1.1.orig/Makefile       1970-01-01 01:00:00.000000000 +0100
> +++ erds1.1/Makefile    2014-04-04 14:10:49.015186000 +0200
> @@ -0,0 +1,9 @@
> +
> +all: make_hmm make_phmm
> +
> +make_hmm:
> +       cd hmm && $(MAKE)
> +
> +make_phmm:
> +       cd phmm && $(MAKE)
> +
>
> Does anybody have an idea how to solve this, or a different approach to my 
> problem?
You can't just create a patch of a non existing file, it has to be
present before it can be patched.
You can add the new file in the sources, but it will not end up in the
unpacked directory of your tarball, so  you'll need an easyblock to fix
that.

You will probably want an EasyBlock anyway. So the aproach most people
will benefit from in the future is if you create an EasyBlock that
extends the ConfigureMake EasyBlock and
runs`ConfigureMake.build_step(self)` in each subdirectory it finds in
the unpacked tarball (e.g. using a glob pattern).

You could make it generic and call it ConfigureMakeSubdirs or something
along those lines.
So other packages that have the same behaviour could just be build by
specifying your EasyBlock.

If you're not familiar enough with python to try this on maybe someone
else could have a go at it...

Jens

Reply via email to