diff --git a/Makefile.common b/Makefile.common index a4efc9c..a202304 100644 --- a/Makefile.common +++ b/Makefile.common @@ -115,7 +115,7 @@ shell: # Always rebuild the source rpm .PHONY: $(SRPMFILE) -$(SRPMFILE): $(SPECFILE) $(__allsources) localreponotice +$(SRPMFILE): $(SPECFILE) $(__allsources) localreponotice clean-old-content @$(MAKE) spdxcheck $(MOCK) --buildsrpm --source=./ --spec=$(SPECFILE) --result=results/ --no-cleanup-after --uniqueext=$(PKG_NAME) mv results/root.log results/srpm-root.log @@ -156,8 +156,7 @@ pullrebase: #help Use MOCK_OPTS environment varible to pass down arbitrary mock options #help to autospec. #help For more information, see the project at https://github.com/clearlinux/autospec -autospec: pullrebase localreponotice - rm -f results/*src.rpm +autospec: pullrebase localreponotice clean-old-content @if [ -e $(SPECFILE) ] && ! grep -q "# Generated by: autospec.py" $(SPECFILE) ; then \ echo "Specfile already exists and was not created by autospec.py! Aborting."; \ exit 1; \ diff --git a/Makefile.shared b/Makefile.shared index f784235..8215774 100644 --- a/Makefile.shared +++ b/Makefile.shared @@ -138,6 +138,17 @@ localreponotice: [ -f $(TOPLVL)/repo/opt-in-build ] || sleep 3; \ fi >&2 +.PHONY: clean-old-rpms clean-old-logs clean-old-content +clean-old-rpms: + rm -rf ./rpms + rm -f ./results/*.rpm + +clean-old-logs: + rm -f ./results/*.log + +clean-old-content: clean-old-rpms clean-old-logs + + .PHONY: help ##### Code # Make sure that HELPSPACE has exactly HELPLEN spaces in it