aboutsummaryrefslogtreecommitdiffstats
path: root/mk/clean.mk
diff options
context:
space:
mode:
authorMattias Andrée <maandree@member.fsf.org>2016-01-26 20:38:35 +0100
committerMattias Andrée <maandree@member.fsf.org>2016-01-26 20:38:35 +0100
commit8f0f8c9e927889e27d65031bb92b56364a21818d (patch)
treeb6c26f3998e22593bede9cb384c0897e2038e1f0 /mk/clean.mk
parentadd man page (diff)
downloadlearn-your-telephone-number-8f0f8c9e927889e27d65031bb92b56364a21818d.tar.gz
learn-your-telephone-number-8f0f8c9e927889e27d65031bb92b56364a21818d.tar.bz2
learn-your-telephone-number-8f0f8c9e927889e27d65031bb92b56364a21818d.tar.xz
import make files
Signed-off-by: Mattias Andrée <maandree@member.fsf.org>
Diffstat (limited to 'mk/clean.mk')
-rw-r--r--mk/clean.mk45
1 files changed, 45 insertions, 0 deletions
diff --git a/mk/clean.mk b/mk/clean.mk
new file mode 100644
index 0000000..1ae4fdc
--- /dev/null
+++ b/mk/clean.mk
@@ -0,0 +1,45 @@
+# Copyright (C) 2015, 2016 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: clean-dist
+ @$(PRINTF_INFO) '\e[00;01;31mCLEANING BUILT FILES\e[34m\e[00m\n'
+ -$(Q)$(RM) -r -- bin aux *.su src/*.su src/*/*.su src/*/*/*.su src/*/*/*/*.su
+ @$(ECHO)
+
+# Delete all files that are created during configuration or building.
+.PHONY: distclean
+distclean: clean
+ @$(PRINTF_INFO) '\e[00;01;31mCLEANING CONFIGURATIONS\e[34m\e[00m\n'
+ -$(Q)$(RM) -- .config.mk config.status Makefile
+ @$(ECHO)
+
+# 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)
+
+# Delete all files generated by `make dist`
+.PHONY: clean-dist
+clean-dist:
+ @$(PRINTF_INFO) '\e[00;01;31mCLEANING RELEASES\e[34m\e[00m\n'
+ -$(Q)$(RM) -r -- $(_PROJECT)-*.tar* $(_PROJECT)-*.checksums* $(_PROJECT)-*
+ @$(ECHO)
+