Skip to content

Commit

Permalink
Fixed partially broken 'cleanlib' make target.
Browse files Browse the repository at this point in the history
Details:
- Previously, libflame was not deleting the libflame libraries correctly
  when running 'make clean'. This is due to a copy-paste bug whereby it
  was attempting to delete LIBBLIS_A_PATH rather than LIBFLAME_A_PATH
  (and same with the equivalent shared object variables).
- Added a new 'cleanhack' target to clean the local libflame.a archive
  that is created as part of the ARG_MAX hack, and added cleanhack as
  a dependency to cleanlib and distclean.
  • Loading branch information
fgvanzee committed Sep 27, 2022
1 parent ace6216 commit 43581de
Showing 1 changed file with 21 additions and 6 deletions.
27 changes: 21 additions & 6 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -729,22 +729,37 @@ else
endif
endif

cleanlib:
cleanlib: cleanhack
ifeq ($(IS_CONFIGURED),yes)
ifeq ($(ENABLE_VERBOSE),yes)
- $(FIND) $(BASE_OBJ_PATH) -name "*.o" | $(XARGS) $(RM_F)
- $(RM_F) $(LIBBLIS_A_PATH)
- $(RM_F) $(LIBBLIS_SO_PATH)
- $(RM_F) $(LIBFLAME_A_PATH)
- $(RM_F) $(LIBFLAME_SO_PATH)
else
@echo "Removing object files from $(BASE_OBJ_PATH)"
@$(FIND) $(BASE_OBJ_PATH) -name "*.o" | $(XARGS) $(RM_F)
@echo "Removing libraries from $(BASE_LIB_PATH)"
@$(RM_F) $(LIBBLIS_A_PATH)
@$(RM_F) $(LIBBLIS_SO_PATH)
@$(RM_F) $(LIBFLAME_A_PATH)
@$(RM_F) $(LIBFLAME_SO_PATH)
endif
endif

distclean: cleanmk cleanh cleanlib
cleanhack:
ifeq ($(IS_CONFIGURED),yes)
ifeq ($(ENABLE_VERBOSE),yes)
ifeq ($(FLA_ENABLE_MAX_ARG_LIST_HACK),yes)
- $(RM_F) $(LIBFLAME_A)
endif
else
ifeq ($(FLA_ENABLE_MAX_ARG_LIST_HACK),yes)
@echo "Removing temporary $(LIBFLAME_A) archive"
@$(RM_F) $(LIBFLAME_A)
endif
endif
endif


distclean: cleanmk cleanh cleanlib cleanhack
ifeq ($(IS_CONFIGURED),yes)
ifeq ($(ENABLE_VERBOSE),yes)
- $(RM_F) $(AR_OBJ_LIST_FILE)
Expand Down

0 comments on commit 43581de

Please sign in to comment.