Spiritdude / OpenSCAD.jscad

Small wrapper for converting OpenSCAD .scad files to OpenJsCad .jscad files, openjscad (CLI) .jscad to .stl on command-line.
46 stars 11 forks source link

Improve Makefile #2

Open koraa opened 11 years ago

koraa commented 11 years ago

Fix some coding standards: Don't use sudo, don't use scp, don't bump clean if already clean. Add dynamic version(, prefix,...) setting to the command script by injecting those variables with meta programming. Don't push to origin in Makefile; use a custom remote called 'central', create it automagically if necessary.'

Spiritdude commented 11 years ago

Sorry for late response. I have abandoned this project mostly, as OpenJSCAD.org covers all and more functionality.

I like the Makefile improvements you did, except the .proto file introduction: if I understand correct, you distinct of openjscad vs openjscad.proto, and openjscad.proto becomes main source to edit, and running 'make' to insert config.js into openjscad.proto -> openjscad, correct? If this is the case, this means, openjscad.proto itself is not functional, and all changes in the source require make to run to create a functional openjscad.

koraa commented 11 years ago

Yes. If you don't like this, we could use require config.js in .proto and replace that during make.. This would render .proto functional.

Spiritdude commented 11 years ago

Yes, the .proto itself should be functional, that works better. If you remove 'require ...' in the final exec and add those vars, then why not simply update openjscad with those few lines of vars, and mark them with '// -- updated by make (do not remove comment)' - if you are versed in sed and can accomplish this, then there is no need for a .proto anymore.

koraa commented 11 years ago

Sorry, I said nonsence, but noticed and deleted to late. (And hoped you would not notice ;) )

What wonders me… does invoking ./openjscad work right now,? Because the includes are performed by using the lib variable which does not point at the source tree…

If so, the right action would be to use a tool like browserify and don't use a PREFIX variable at all.