How to get current relative directory of your Makefile?

I have a several Makefiles in app specific directories like this: /project1/apps/app_typeA/Makefile /project1/apps/app_typeB/Makefile /project1/apps/app_typeC/Makefile Each Makefile includes a .inc file in this path one level up: /project1/apps/app_rules.inc Inside app_rules.inc I’m setting the destination of where I want the binaries to be placed when built. I want all binaries to be in their respective app_type path: … Read more

Why does make think the target is up to date?

This is my Makefile: REBAR=./rebar REBAR_COMPILE=$(REBAR) get-deps compile all: compile compile: $(REBAR_COMPILE) test: $(REBAR_COMPILE) skip_deps=true eunit clean: -rm -rf deps ebin priv doc/* docs: $(REBAR_COMPILE) doc ifeq ($(wildcard dialyzer/sqlite3.plt),) static: $(REBAR_COMPILE) build_plt analyze else static: $(REBAR_COMPILE) analyze endif I can run make compile multiple times and get aromanov@alexey-desktop:~/workspace/gm-controller/lib/erlang-sqlite$ make compile ./rebar get-deps compile ==> erlang-sqlite … Read more