If the VPATH variable was set to SOURCES_DIR, it caused problems, when
there were .o files in SOURCES_DIR. OMK thoughts the prerequisites
existed and link command failed, because no .o file were found in
_build tree. This behavior was problematic if OMK was used in
projects with multiple make systems.
darcs-hash:
20080127154245-f2ef6-
69dbb419870250dfc8c8dfabe81e805e80145eb5.gz
#vpath %.cc $(SOURCES_DIR)
#vpath %.cxx $(SOURCES_DIR)
-VPATH = $(SOURCES_DIR)
-srcdir = $(SOURCES_DIR)
-
# Defines for quiet compilation
ifdef V
ifeq ("$(origin V)", "command line")
--- /dev/null
+# Generic directory or leaf node makefile for OCERA make framework
+
+ifndef MAKERULES_DIR
+MAKERULES_DIR := $(shell ( old_pwd="" ; while [ ! -e Makefile.rules ] ; do if [ "$$old_pwd" == `pwd` ] ; then exit 1 ; else old_pwd=`pwd` ; cd -L .. 2>/dev/null ; fi ; done ; pwd ) )
+endif
+
+ifeq ($(MAKERULES_DIR),)
+all : default
+.DEFAULT::
+ @echo -e "\nThe Makefile.rules has not been found in this or partent directory\n"
+else
+include $(MAKERULES_DIR)/Makefile.rules
+endif
+
+print_vars:
+ echo $(COMPILED_DIR)
\ No newline at end of file
--- /dev/null
+bin_PROGRAMS = prg
+
+prg_SOURCES = file.c
+
--- /dev/null
+#include <stdio.h>
+
+void main()
+{
+}
--- /dev/null
+#!/bin/sh
+
+. ../functions.sh
+
+make || error ".o files should not be searched in SOURCES_DIR"