aboutsummaryrefslogtreecommitdiffstats
path: root/mk/clean.mk
diff options
context:
space:
mode:
authorMattias Andrée <maandree@member.fsf.org>2015-12-08 20:25:54 +0100
committerMattias Andrée <maandree@member.fsf.org>2015-12-08 20:25:54 +0100
commitb9c23e3a7123452dcfefb2fee97ba1cdc18ee2ad (patch)
tree2761c44427abe1896b32bde30dd77c5bdd971516 /mk/clean.mk
parentPackaging moved to my collective repo for them (not needed now that it is documented in INSTALL.) (diff)
downloadscrotty-b9c23e3a7123452dcfefb2fee97ba1cdc18ee2ad.tar.gz
scrotty-b9c23e3a7123452dcfefb2fee97ba1cdc18ee2ad.tar.bz2
scrotty-b9c23e3a7123452dcfefb2fee97ba1cdc18ee2ad.tar.xz
a magical makefile, using a collection of submakefiles that are completely reusable without modifications
Signed-off-by: Mattias Andrée <maandree@member.fsf.org>
Diffstat (limited to '')
-rw-r--r--mk/clean.mk36
1 files changed, 36 insertions, 0 deletions
diff --git a/mk/clean.mk b/mk/clean.mk
new file mode 100644
index 0000000..4d6d1a4
--- /dev/null
+++ b/mk/clean.mk
@@ -0,0 +1,36 @@
+# Copyright (C) 2015 Mattias Andrée <maandree@member.fsf.org>
+#
+# Copying and distribution of this file, with or without modification,
+# are permitted in any medium without royalty provided the copyright
+# notice and this notice are preserved. This file is offered as-is,
+# without any warranty.
+
+
+#=== These rules are used for cleaning the repository of generated files. ===#
+
+
+# Delete all files are normally created during a build.
+.PHONY: clean
+clean:
+ @$(PRINTF_INFO) '\e[00;01;31mCLEANING\e[34m\e[00m\n'
+ -$(Q)$(RM) -r bin obj $(PKGNAME)-*.tar* $(PKGNAME)-*.checksums*
+ @$(ECHO)
+
+# Delete all files that are created during configuration.
+# Note, this, for some reason, should not imply `make clean`.
+.PHONY: distclean
+distclean:
+
+# Like `make clean` but do not remove massive binaries
+# that are seldom recompiled.
+.PHONY: mostlyclean
+mostlyclean: clean
+
+# Delete everything except ./configure
+.PHONY: maintainer-clean
+maintainer-clean: clean distclean
+ @$(ECHO)
+ @$(ECHO) 'This command is intended for maintainers to use; it'
+ @$(ECHO) 'deletes files that may need special tools to rebuild.'
+ @$(ECHO)
+