diff --git a/.gitignore b/.gitignore index 722303bd5..668630512 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,4 @@ +.arlock .depend Make.dep *.o diff --git a/Application.mk b/Application.mk index 25af1926e..641e89b85 100644 --- a/Application.mk +++ b/Application.mk @@ -130,9 +130,9 @@ $(CXXOBJS): %$(SUFFIX)$(OBJEXT): %$(CXXEXT) .built: $(OBJS) ifeq ($(WINTOOL),y) - $(call ARCHIVE, "${shell cygpath -w $(BIN)}", $(OBJS)) + $(call ARLOCK, "${shell cygpath -w $(BIN)}", $(OBJS)) else - $(call ARCHIVE, $(BIN), $(OBJS)) + $(call ARLOCK, $(BIN), $(OBJS)) endif $(Q) touch $@ diff --git a/Make.defs b/Make.defs index 77b0c8275..89a649b39 100644 --- a/Make.defs +++ b/Make.defs @@ -52,7 +52,7 @@ CLEANDIRS := $(dir $(wildcard $(APPDIR)$(DELIM)*$(DELIM)Makefile)) CONFIGURED_APPS := define Add_Application - include $(1)Make.defs + include $(1)Make.defs endef $(foreach BDIR, $(BUILDIRS), $(eval $(call Add_Application,$(BDIR)))) @@ -99,6 +99,10 @@ define REGISTER endef endif +define ARLOCK + $(Q) flock .arlock $(call ARCHIVE, $1, $(2)) +endef + # Tools ifeq ($(DIRLINK),) diff --git a/Makefile b/Makefile index e0ad31f1c..dfb9da882 100644 --- a/Makefile +++ b/Makefile @@ -117,9 +117,9 @@ $(SYMTABOBJ): %$(OBJEXT): %.c $(BIN): $(SYMTABOBJ) ifeq ($(WINTOOL),y) - $(call ARCHIVE, "${shell cygpath -w $(BIN)}", $^) + $(call ARLOCK, "${shell cygpath -w $(BIN)}", $^) else - $(call ARCHIVE, $(BIN), $^) + $(call ARLOCK, $(BIN), $^) endif endif # !CONFIG_BUILD_LOADABLE @@ -198,6 +198,7 @@ else fi; \ ) endif + $(call DELFILE, .arlock) $(call DELFILE, .depend) $(call DELFILE, $(SYMTABSRC)) $(call DELFILE, $(SYMTABOBJ))