gkz / grasp

JavaScript structural search, replace, and refactor
http://graspjs.com
MIT License
1.28k stars 33 forks source link

Problem building nested ls file structure #114

Open kristianmandrup opened 7 years ago

kristianmandrup commented 7 years ago

Trying to build using a nested folder structure for divide/conquer of logic. Not used to Makefile, how to I make all my nested ls files compile into lib !?!?.

LIB = $(SRC:src/%.ls=lib/%.js)

lib:
    rm -rf lib
    mkdir -p lib/

lib/%.js: src/%.ls lib
    $(LSC) --compile --output lib "$<"

lib/replace/%.js: src/replace/%.ls lib/replace
    $(LSC) --compile --output lib/replace "$<"

lib/runner/%.js: src/runner/%.ls lib/runner
    $(LSC) --compile --output lib/runner "$<"