include ${VARSMK}
-# lists populated by dir.mk files in subdirectories
-SRCS := # := start
-OBJS := # := start
-DEPS := # := start
-
-BLDDIRS := # := start
-
# include all of the dir.mk
include src/${DIRMK}
-CURDIR :=
-
-include src/${VARSMK}
-include src/${FILESMK}
-include $(addprefix ${SRCSDIR},$(addsuffix ${DIRMK},${NEWDIRS}))
+CURDIR := src/
+SRCPATH :=
+include ${CURDIR}${VARSMK}
+include ${CURDIR}${FILESMK}
-BLDDIRS += ${OBJSDIR}
-BLDDIRS += ${DEPSDIR}
-BLDDIRS += ${WORKINGDIR}
+# steps on variables
+include $(addprefix ${SRCSDIR},$(addsuffix ${DIRMK},${NEWDIRS}))
+# Restore variables
+CURDIR := src/
+SRCPATH :=
-include src/${RULESMK}
+include ${CURDIR}${RULESMK}
# Do not include deps files when doing a clean operation
ifeq ($(filter ${CLEANCMDS},${MAKECMDGOALS}),)
################################################################################
-NEWSRCS := $(addprefix ${CURDIR},${NEWSRCS})
-NEWDIRS := $(addprefix ${CURDIR},${NEWDIRS})
+NEWSRCS := $(addprefix ${SRCPATH},${NEWSRCS})
+NEWDIRS := $(addprefix ${SRCPATH},${NEWDIRS})
NEWOBJS := ${NEWSRCS:.cpp=.o}
NEWDEPS := ${NEWSRCS:.cpp=.d}
-CURDIR := locks/
+CURDIR := src/locks/
+SRCPATH := locks/
-include src/locks/${FILESMK}
+include ${CURDIR}${FILESMK}
include $(addprefix ${SRCSDIR},$(addsuffix ${DIRMK},${NEWDIRS}))
################################################################################
-NEWSRCS := $(addprefix ${CURDIR},${NEWSRCS})
-NEWDIRS := $(addprefix ${CURDIR},${NEWDIRS})
+NEWSRCS := $(addprefix ${SRCPATH},${NEWSRCS})
+NEWDIRS := $(addprefix ${SRCPATH},${NEWDIRS})
NEWOBJS := ${NEWSRCS:.cpp=.o}
NEWDEPS := ${NEWSRCS:.cpp=.d}
endif
endif
+# lists populated by dir.mk files in subdirectories
+SRCS := # := start
+OBJS := # := start
+DEPS := # := start
+
+BLDDIRS := # := start
+
+BLDDIRS += ${OBJSDIR}
+BLDDIRS += ${DEPSDIR}
+BLDDIRS += ${WORKINGDIR}
+