erlang-stdinout-pool icon indicating copy to clipboard operation
erlang-stdinout-pool copied to clipboard

Let Rebar handle the c_src compilation

Open djui opened this issue 14 years ago • 3 comments

If possible (meaning all the C compiler flags are not really needed) let rebar handle the compilation. Rebar by default compiles .c files in c_src. That would make the repository even smaller, removing the makefile etc. As a side-effect the name of compile file will have to be changed in the pool erl file.

djui avatar Sep 29 '11 13:09 djui

Last I checked, rebar tries to compile anything in c_src to a shared library linked against erlang interfaces. The stdinout binary is just a standalone executable. If you want to compile a non-port or multiple things from one c_src directory, we need a Makefile.

I guess, technically, the stdinout C source should be under priv/c_src since it doesn't use any erlang native communication.

You mentioned C compiler flags (and you found a problem with cpu topology earlier) -- what platform are you running under? It sounds either very old or slightly uncommon.

mattsta avatar Sep 29 '11 17:09 mattsta

Keywords -- "last I checked."

Looks like newer versions of rebar don't use the port_pre_script and port_cleanup_script blocks anymore. Everything got moved to a centralized post_hooks block.

Let's compromise. I'll remove the Makefile, but leave the flags. For now, I'm keeping the name the same (stdin_forcer) but I may make it more consistent when I bump the version to 2.0.

mattsta avatar Sep 29 '11 18:09 mattsta

I'll have to check once I am back on a machine. Because for me I got enoent when I run the standard make. Now when I check the Makefile it indeed looks weird how that could be. Will write back later.

djui avatar Sep 29 '11 18:09 djui