Here's the relevant snippet of my makefile code: HERE:=$(dir $(lastword $(MAKEFILE_LIST))) include $(TOPDIR)target.mk #include $(TOPDIR)mkfunc/chdir.mk CURDIR:=$(shell echo $(PWD))$(DIRSEP) # Directories PREPARE:=set tmp REPLACE:=%tmp:teh=the% #$(call chdir,$(CURDIR)$(TOPDIR)) WKSDIR:=$(shell echo $(PWD))$(DIRSEP) OBJDIR:=obj OUTDIR:=build PRJOUT:=$(OUTDIR)/$(TARDIR) PRJOBJ:=$(OBJDIR)/$(TARDIR) B:=$(PRJOUT)/$(DBG) O:=$(PRJOBJ)/$(DBG) DEPDIR:=$(OUTDIR) $(PRJOUT) $(OBJDIR) $(PRJOBJ) PRJINC:=$(FI)"$(CC_INC)" $(FI)"src" $(FI)"$(O)" PRJBIN:=$(FL)"$(CC_LIB)" $(FL)"$(PRJOUT)" PRJLIB:=$(FL)"$(CC_LIB)" SOURCES:=$(wildcard src/*.c) OBJECTS:=$(patsubst src/%.c,$(O)%.o,$(SOURCES))
The to lines commented out that are obviously actions to be performed are where I'm having trouble, I initially tried using the $(shell chdir...) variant but later realized my mistake there, I then went on to googling for possible solutions to this, I'd rather not start up a new instance of make just to apply an option to change the working directory, is it possible to do this from within my makefiles? _______________________________________________ Help-make mailing list Help-make@gnu.org https://lists.gnu.org/mailman/listinfo/help-make