yaws icon indicating copy to clipboard operation
yaws copied to clipboard

Stray file Makefile.am in rebar3 release

Open leoliu opened this issue 6 years ago • 5 comments

I now use Yaws as a rebar3 dep and after building a release the yaws-2.0.6 directory looks like this:

├── ebin
├── include
└── priv

all these subdirectories have a file Makefile.am which is unusual.

The issue can be reproduced with branch master or rebar3-support.

leoliu avatar Feb 25 '19 02:02 leoliu

Running rebar3 release doesn't work for me — I assume because of the lack of a relx section in rebar.config — but running rebar3 compile partly duplicates this problem, as after it finishes I see a couple Makefile.am files under the _build directory. I don't see any way to avoid having rebar3 copy those files, but a post hook like the one below added to rebar.config can remove them:

{post_hooks, [{"(linux|solaris|freebsd|darwin)", compile,
               "find $REBAR_BUILD_DIR -name Makefile.am -exec rm -f {} \\;"}]}.

vinoski avatar Feb 25 '19 03:02 vinoski

I just noticed these files are in the repo i.e. version-controlled. So maybe ignore this issue for now. It's harmless anyway.

leoliu avatar Feb 25 '19 05:02 leoliu

Fair enough, but for now I've pushed a commit to run find over the build area after compilation as mentioned earlier in this issue.

vinoski avatar Feb 25 '19 12:02 vinoski

That could work. But...

is it safe to run it inside _build? It will make uncommitted/untracked changes to deps. Ideally it should only be run inside the rel directory or, even better, yaws-VERSION directory in the rel directory.

leoliu avatar Feb 25 '19 22:02 leoliu

I convinced myself a bit ago that the find addition wasn't really helpful, so I just pushed another change to remove it.

vinoski avatar Feb 25 '19 23:02 vinoski