Commits

Anonymous committed 4d6d788

Cleanup make clean

Comments (0)

Files changed (10)

components/erlang/Makefile

 		$(PROTO_DIR)/usr/lib/erlang/releases/RELEASES \
 		$(PROTO_DIR)/usr/lib/$(MACH64)/erlang/releases/RELEASES
 
-clean::
-	$(RM) -r documentation
+CLEAN_PATHS+=	documentation
 
 test:	$(NO_TESTS)
 

components/meta-packages/nvidia-incorporation/Makefile

 
 include ../../../make-rules/ips.mk
 
-PKGLINT=    true
+CLEAN_PATHS+=	$(BUILD_DIR)
+PKGLINT=	true
 
 build:
 
 	$(PKGDEPEND) generate $(PKGDEPEND_GENERATE_OPTIONS) $< >$@
 
 clean::
-	[ -d $(BUILD_DIR) ] && rm -rf $(BUILD_DIR)
+	$(RM) -r $(CLEAN_PATHS)

components/rpm2cpio/Makefile

 
 BUILD_PKG_DEPENDENCIES =	$(BUILD_TOOLS)
 
+clean::
+	$(RM) -r $(CLEAN_PATHS)
+
 include ../../make-rules/depend.mk

make-rules/ant.mk

 	$(COMPONENT_POST_INSTALL_ACTION)
 	$(TOUCH) $@
 
-clean::
-	$(RM) -r $(SOURCE_DIR) $(BUILD_DIR)
+CLEAN_PATHS+=	$(BUILD_DIR)

make-rules/configure.mk

 	$(TOUCH) $@
 
 clean::
-	$(RM) -r $(BUILD_DIR) $(PROTO_DIR)
+	$(RM) -r $(BUILD_DIR)

make-rules/justmake.mk

 	$(TOUCH) $@
 
 clean::
-	$(RM) -r $(BUILD_DIR) $(PROTO_DIR)
+	$(RM) -r $(BUILD_DIR)

make-rules/makemaker.mk

 	$(TOUCH) $@
 
 clean:: 
-	$(RM) -r $(BUILD_DIR) $(PROTO_DIR)
+	$(RM) -r $(BUILD_DIR)

make-rules/prep.mk

 FETCH =		$(WS_TOOLS)/userland-fetch
 
 ARCHIVES += $(COMPONENT_ARCHIVE)
-CLEAN_PATHS += $(SOURCE_DIR)
+CLEAN_PATHS += $(SOURCE_ROOT_DIR)
 
 # In order to override PATCH_DIR and PATCH_PATTERN in component makefiles, they
 # need to be conditionally set here.  This means that the override needs to
 
 $(SOURCE_DIR)/.unpacked:	download Makefile $(PATCHES)
 	$(RM) -r $(SOURCE_DIR)
-	($(MKDIR) $(COMPONENT_DIR)/source && \
-	cd $(COMPONENT_DIR)/source && \
+	($(MKDIR) $(SOURCE_ROOT_DIR) && \
+	cd $(SOURCE_ROOT_DIR) && \
 	$(UNPACK) $(UNPACK_ARGS) $(USERLAND_ARCHIVES)/$(COMPONENT_ARCHIVE))
 	$(COMPONENT_POST_UNPACK_ACTION)
 	$(TOUCH) $@

make-rules/setup.py.mk

 	$(COMPONENT_POST_TEST_ACTION)
 	$(TOUCH) $@
 
-clean::
-	$(RM) -r $(SOURCE_DIR) $(BUILD_DIR)
+CLEAN_PATHS+=	$(BUILD_DIR)

make-rules/shared-macros.mk

 #CANONICAL_REPO ?=		http://pkg.openindiana.org/experimental/
 
 COMPONENT_DIR =	$(shell pwd)
-SOURCE_DIR =	$(COMPONENT_DIR)/source/$(COMPONENT_SRC)
+SOURCE_ROOT_DIR=	$(COMPONENT_DIR)/source
+SOURCE_DIR =	$(SOURCE_ROOT_DIR)/$(COMPONENT_SRC)
 BUILD_DIR =	$(COMPONENT_DIR)/build
 PROTO_DIR =	$(BUILD_DIR)/prototype/$(MACH)