But if I point GNUSTEP_BUILD_DIR to a directory on tmpfs (e.g. /run/user/1000/build/gnustep on Linux/Ubuntu)
I get the following error when trying to build libs-base:
make[4]: No rule to make target '/run/user/1000/build/gnustep/Source/ObjectiveC2//run/user/1000/build/gnustep/Source/ObjectiveC2/obj/ObjectiveC2.obj/blocks_runtime.m.o', needed by '/run/user/1000/build/gnustep/Source/obj/libgnustep-base.so.1.28.0'. Stop.
make[3]: [/opt/gnustep/System/Library/Makefiles/Instance/library.make:286: internal-library-all_] Error 2
make[2]: [/opt/gnustep/System/Library/Makefiles/Master/rules.make:297: libgnustep-base.all.library.variables] Error 2
make[1]: [/opt/gnustep/System/Library/Makefiles/Master/library.make:37: internal-all] Error 2
make: *** [/opt/gnustep/System/Library/Makefiles/Master/serial-subdirectories.make:53: internal-all] Error 2
The close look at the error line gives a cue that the GNUSTEP_BUILD_DIR is somehow used twice somewhere
Here is what happens: SUBPROJECT_PRODUCT is a file named subproject.txt where subproject's object file paths are written.
Writing occurs in Instance/subproject.make:61:
Lets summarize: GNUSTEP_BUILD_DIR is used when subproject's object file paths are written into subproject.txt and the second time in the 'owning' project's SUBPROJECT_OBJ_FILES:
ifneq ($($(GNUSTEP_INSTANCE)_SUBPROJECTS),)
SUBPROJECT_OBJ_FILES = $(foreach d, $($(GNUSTEP_INSTANCE)_SUBPROJECTS), \
$(foreach o, $(shell cat \
$(GNUSTEP_BUILD_DIR)/$(d)/$(GNUSTEP_OBJ_DIR_NAME)/$(SUBPROJECT_PRODUCT)), \ # the first time
$(addprefix $(GNUSTEP_BUILD_DIR)/$(d)/, $(o)))) # the second time
endif
I am not a make expert so here am I lost. All my tinkering with that led to dirty hacks.
GNUSTEP_BUILD_DIR is set to . by default (common.make:176).
But if I point GNUSTEP_BUILD_DIR to a directory on tmpfs (e.g. /run/user/1000/build/gnustep on Linux/Ubuntu) I get the following error when trying to build libs-base:
The close look at the error line gives a cue that the GNUSTEP_BUILD_DIR is somehow used twice somewhere
'/run/user/1000/build/gnustep/Source/ObjectiveC2//run/user/1000/build/gnustep/Source/ObjectiveC2/obj/ObjectiveC2.obj/blocks_runtime.m.o'
I was able to pin the cause down to the Instance/rules.make:211:
Here is what happens: SUBPROJECT_PRODUCT is a file named subproject.txt where subproject's object file paths are written. Writing occurs in Instance/subproject.make:61:
OBJ_FILES_TO_LINK is populated in Instance/rules.make:258 by content of variables like xxx_FILES, e.g. Instance/rules.make:215:
GNUSTEP_OBJ_INSTANCE_DIR is defined in common.make:819:
Lets summarize: GNUSTEP_BUILD_DIR is used when subproject's object file paths are written into subproject.txt and the second time in the 'owning' project's SUBPROJECT_OBJ_FILES:
I am not a make expert so here am I lost. All my tinkering with that led to dirty hacks.