commit 6b3faba9f6ba12c3470d6199c36690bc4c42b309
parent bd2df0e55d611707fd9038c5e6733bc9731e8bd1
Author: Jacob R. Edwards <n/a>
Date: Wed, 30 Nov 2022 10:41:46 -0600
Improve fullclean target (previously distclean)
It is now a combination of clean, which removes files which can be
regenerated without network access, and the new cleancache which
removes files which must be fetched from the internet.
While cleancache isn't quite the right name, I chose it over
cleannetcache.
Diffstat:
4 files changed, 13 insertions(+), 5 deletions(-)
diff --git a/local/src/src/fork/Makefile b/local/src/src/fork/Makefile
@@ -4,7 +4,9 @@ SUBDIRS =\
herbe\
slstatus\
-all distclean clean ready patch build install uninstall:
+all distclean fullclean clean ready patch build install uninstall:
.for SUBDIR in ${SUBDIRS}
cd ${SUBDIR} && make $@
.endfor
+
+.PHONY: all distclean fullclean clean ready patch build install uninstall
diff --git a/local/src/src/fork/common.mk b/local/src/src/fork/common.mk
@@ -2,12 +2,11 @@
all: build
-distclean:
- rm -rf ${arc}
-
clean:
rm -rf patched ${dir}
+fullclean: cleancache clean
+
fetch: ${arc}
verify: fetch
@@ -33,4 +32,4 @@ checksum: ${arc}
updatechecksum:
make checksum > checksum
-.PHONY: all distclean clean ready patch verify checksum updatechecksum
+.PHONY: all clean fullclean ready patch verify checksum updatechecksum
diff --git a/local/src/src/fork/git.mk b/local/src/src/fork/git.mk
@@ -9,3 +9,7 @@ ${arc}: ${arc}.git
(*.gz|*.tgz) a=gzip;; \
esac ; \
git -C ${arc}.git archive --format=tar --prefix=${dir}/ ${ref} | $$a > ${arc}
+
+cleancache:
+ rm -f ${arc}
+ rm -rf ${arc}.git
diff --git a/local/src/src/fork/http.mk b/local/src/src/fork/http.mk
@@ -2,3 +2,6 @@
${arc}:
curl -SsL -o ${arc} ${url}
+
+cleancache:
+ rm -f ${arc}