Project

General

Profile

« Previous | Next » 

Revision 625

Makefiles: Recurse into outermost subdir rather than bypassing it and going directly to innermost subdir

View differences:

inputs/Makefile
1 1
# Make
2
subMake = $(MAKE) $(@F) --directory=$(@D) --makefile=../input.Makefile
2
pathParts = $(shell path="$(1)"; echo "$${path%%/*}" "$${path\#*/}")
3
topDir = $(firstword $(pathParts))
4
subPath = $(lastword $(pathParts))
5
subMake = $(MAKE) $(call subPath,$@) --directory=$(call topDir,$@) \
6
--makefile=../input.Makefile
3 7
# input.Makefile path is relative to subdir
4 8

  
5 9
#####
Makefile
1 1
# Make
2 2
SHELL := /bin/bash
3
subMake = $(MAKE) $(@F) --directory=$(@D)
3
pathParts = $(shell path="$(1)"; echo "$${path%%/*}" "$${path\#*/}")
4
topDir = $(firstword $(pathParts))
5
subPath = $(lastword $(pathParts))
6
subMake = $(MAKE) $(call subPath,$@) --directory=$(call topDir,$@)
4 7

  
5 8
# OS
6 9
os := $(shell uname)

Also available in: Unified diff