Makefile (1470B)
1 # Copyright (C) 2023, 2024 Vincent Forest (vaplv@posteo.net) 2 # 3 # This program is free software: you can redistribute it and/or modify 4 # it under the terms of the GNU General Public License as published by 5 # the Free Software Foundation, either version 3 of the License, or 6 # (at your option) any later version. 7 # 8 # This program is distributed in the hope that it will be useful, 9 # but WITHOUT ANY WARRANTY; without even the implied warranty of 10 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 11 # GNU General Public License for more details. 12 # 13 # You should have received a copy of the GNU General Public License 14 # along with this program. If not, see <http://www.gnu.org/licenses/>. 15 .POSIX: 16 17 PREFIX=/usr/local 18 BINPREFIX=$(PREFIX)/bin 19 MANPREFIX=$(PREFIX)/share/man/ 20 21 default: 22 23 lint: 24 shellcheck -o all backup 25 shellcheck -o all ecc 26 mandoc -T lint ecc.1 27 mandoc -T lint backup.8 28 29 install: 30 mkdir -p $(DESTDIR)$(BINPREFIX) 31 mkdir -p $(DESTDIR)$(MANPREFIX)/man1/ 32 mkdir -p $(DESTDIR)$(MANPREFIX)/man8/ 33 cp backup ecc $(DESTDIR)$(BINPREFIX) 34 chmod 755 $(DESTDIR)$(BINPREFIX)/backup 35 chmod 755 $(DESTDIR)$(BINPREFIX)/ecc 36 cp ecc.1 $(DESTDIR)$(MANPREFIX)/man1/ 37 chmod 644 $(DESTDIR)$(MANPREFIX)/man1/ecc.1 38 cp backup.8 $(DESTDIR)$(MANPREFIX)/man8/ 39 chmod 644 $(DESTDIR)$(MANPREFIX)/man8/backup.8 40 41 uninstall: 42 rm -f $(DESTDIR)$(BINPREFIX)/backup 43 rm -f $(DESTDIR)$(BINPREFIX)/ecc 44 rm -f $(DESTDIR)$(MANPREFIX)/man1/ecc.1 45 rm -f $(DESTDIR)$(MANPREFIX)/man8/backup.8