From 56ef3f75d34b3b58aee61eb29909a1e2ae53ee76 Mon Sep 17 00:00:00 2001 From: Joachim Nilsson Date: Wed, 22 May 2013 06:18:38 +0200 Subject: [PATCH] Build: Make subdir build prettier. The ROOTDIR variable was only set in the top-level Makefile, so when building from a subdirectory the output was slightly garbled. Moved ROOTDIR declaration to common.mk. Signed-off-by: Joachim Nilsson --- Makefile | 3 --- common.mk | 13 ++++++++----- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/Makefile b/Makefile index e290ffae..5cdd0092 100644 --- a/Makefile +++ b/Makefile @@ -25,9 +25,6 @@ install-exec install-data install-dev \ uninstall-exec uninstall-data uninstall-dev -# Top directory for building complete system, fall back to this directory -ROOTDIR ?= $(shell pwd) - #VERSION ?= $(shell git tag -l | tail -1) VERSION ?= 1.7 NAME = finit diff --git a/common.mk b/common.mk index 05f86e15..4235695f 100644 --- a/common.mk +++ b/common.mk @@ -1,9 +1,12 @@ +# Top directory for building complete system, fall back to this directory +ROOTDIR ?= $(shell pwd) + # Some junk files we always want to be removed when doing a make clean. -JUNK = *~ *.bak *.aux *.dvi *.idx *.ind *.log *.ps *.map .*.d DEADJOE semantic.cache *.gdb *.elf core core.* -MAKE := @$(MAKE) -MAKEFLAGS = --no-print-directory --silent -INSTALL := install --backup=off -STRIPINST := $(INSTALL) -s --strip-program=$(CROSS)strip -m 0755 +JUNK = *~ *.bak *.aux *.dvi *.idx *.ind *.log *.ps *.map .*.d DEADJOE semantic.cache *.gdb *.elf core core.* +MAKE := @$(MAKE) +MAKEFLAGS = --no-print-directory --silent +INSTALL := install --backup=off +STRIPINST := $(INSTALL) -s --strip-program=$(CROSS)strip -m 0755 # Smart autodependecy generation via GCC -M. .%.d: %.c