]> rtime.felk.cvut.cz Git - omk.git/commitdiff
Set MAKERULES_DIR in not defined.
authorMichal Sojka <sojkam1@fel.cvut.cz>
Wed, 12 Mar 2008 16:43:00 +0000 (16:43 +0000)
committerMichal Sojka <sojkam1@fel.cvut.cz>
Wed, 12 Mar 2008 16:43:00 +0000 (16:43 +0000)
If OMK is not called by leaf Makefile but instead by
make -f <path>/Makefile.rules, MAKERULES_DIR variable is set automatically to the
correct value.

darcs-hash:20080312164306-f2ef6-639d249a10e7b763ff61413d86a6894a723fc750.gz

snippets/base

index 0d73538f4843121f2250cfe333488635c7745094..74d15440f7fa2d5fe406e0093eea99822e392e98 100644 (file)
@@ -20,6 +20,11 @@ ifndef SOURCES_DIR
 SOURCES_DIR := $(shell ( pwd -L ) )
 endif
 
+# If we are not called by OMK leaf Makefile...
+ifndef MAKERULES_DIR
+MAKERULES_DIR := $(abspath $(dir $(filter %Makefile.rules,$(MAKEFILE_LIST))))
+endif
+
 .PHONY: all default check-make-ver omkize
 
 ifdef W