From a10379327c921e72cd22b3a2441a04456b9b4be9 Mon Sep 17 00:00:00 2001 From: Andrew Johnson Date: Tue, 12 Nov 2019 16:14:39 -0600 Subject: [PATCH] Replace broken cleandirs recipe --- configure/RULES_TOP | 17 ++++++----------- 1 file changed, 6 insertions(+), 11 deletions(-) diff --git a/configure/RULES_TOP b/configure/RULES_TOP index 3d60b5af8..4db1ace66 100644 --- a/configure/RULES_TOP +++ b/configure/RULES_TOP @@ -24,24 +24,19 @@ UNINSTALL_DIRS += $(INSTALL_DBD) $(INSTALL_INCLUDE) $(INSTALL_DOC) \ uninstallDirs: $(RMDIR) $(UNINSTALL_DIRS) +EMPTY_INSTALL_DIRS = \ + $(if $(wildcard $(INSTALL_LOCATION_BIN)/*),,$(INSTALL_LOCATION_BIN)) \ + $(if $(wildcard $(INSTALL_LOCATION_LIB)/*),,$(INSTALL_LOCATION_LIB)) uninstall: archuninstall uninstallDirs + $(RMDIR) $(EMPTY_INSTALL_DIRS) -archuninstall: $(addprefix uninstall$(DIVIDER),$(BUILD_ARCHS)) | cleandirs +archuninstall: $(addprefix uninstall$(DIVIDER),$(BUILD_ARCHS)) archPart = $(word 2, $(subst $(DIVIDER), ,$@)) uninstall$(DIVIDER)%: $(RMDIR) $(INSTALL_LOCATION_BIN)/$(archPart) $(RMDIR) $(INSTALL_LOCATION_LIB)/$(archPart) -cleandirs: - @$(NOP) -ifeq ($(wildcard $(INSTALL_LOCATION_BIN)/*),) - $(RMDIR) $(INSTALL_LOCATION_BIN) -endif -ifeq ($(wildcard $(INSTALL_LOCATION_LIB)/*),) - $(RMDIR) $(INSTALL_LOCATION_LIB) -endif - help: @echo "Usage: gnumake [options] [target] ..." @@ -75,7 +70,7 @@ help: @echo "Indiv. object targets are supported by O. level Makefile .e.g" @echo " xxxRecord.o" -.PHONY: cleandirs distclean cvsclean realuninstall archuninstall uninstallDirs +.PHONY: distclean cvsclean realuninstall archuninstall uninstallDirs .PHONY: uninstall help # Include /cfg/TOP_RULES* files from tops defined in RELEASE* files