aboutsummaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorSergey Poznyakoff <gray@gnu.org.ua>2019-09-16 09:15:16 +0200
committerSergey Poznyakoff <gray@gnu.org.ua>2019-09-16 09:16:37 +0200
commitcbd74112e0ee98461db58ac943daced1b668edb9 (patch)
tree3222bbaf0ae1d34f19a412d24381d971e5859962 /Makefile
parent66cb557a9ab03de4eff810547136c39b78b2b781 (diff)
downloadslackupgrade-cbd74112e0ee98461db58ac943daced1b668edb9.tar.gz
slackupgrade-cbd74112e0ee98461db58ac943daced1b668edb9.tar.bz2
Add README and Makefile
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile78
1 files changed, 78 insertions, 0 deletions
diff --git a/Makefile b/Makefile
new file mode 100644
index 0000000..09a5a8c
--- /dev/null
+++ b/Makefile
@@ -0,0 +1,78 @@
+# Makefile for slackware-upgrade-system
+# Copyright (C) 2019 Sergey Poznyakoff.
+#
+# Slackware-upgrade-system is free software; you can redistribute it and/or
+# modify it under the terms of the GNU General Public License as published
+# by the Free Software Foundation; either version 3, or (at your option)
+# any later version.
+#
+# Slackware-upgrade-system is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with slackware-upgrade-system. If not, see
+# <http://www.gnu.org/licenses/>.
+
+PACKAGE=slackupgrade
+VERSION=0.1
+
+SBINDIR=/sbin
+MANDIR=/usr/man
+MAN8DIR=$(MANDIR)/man8
+
+help:;
+ @echo "Avalable targets:"
+ @echo ""
+ @echo "$$ make install"
+ @echo " Installs the program. Influential variables:"
+ @echo " SBINDIR - directory to install system binaries to ($(SBINDIR))"
+ @echo " MANDIR - toplevel directory for man page installation ($(MANDIR))"
+ @echo ""
+ @echo "$$ make install-sbin"
+ @echo " Installs only the slackware-upgrade-system script."
+ @echo ""
+ @echo "$$ make install-man"
+ @echo " Installs only the manpage."
+ @echo ""
+ @echo "$$ make dist"
+ @echo " Creates the distribution tarball."
+
+# ##########################
+# Installation rules
+# ##########################
+install: install-sbin install-man
+
+install-sbin:
+ @if ! test -d $(DESTDIR)$(SBINDIR); then install -d $(DESTDIR)$(SBINDIR); fi
+ install slackware-upgrade-system $(DESTDIR)$(SBINDIR)
+
+install-man:
+ @if ! test -d $(DESTDIR)$(MAN8DIR); then install -d $(DESTDIR)$(MAN8DIR); fi
+ install -m 644 slackware-upgrade-system.8 $(DESTDIR)$(MAN8DIR)
+
+# ##########################
+# Distribution tarball rules
+# ##########################
+
+DISTDIR=$(PACKAGE)-$(VERSION)
+DISTFILES=\
+ slackware-upgrade-system\
+ slackware-upgrade-system.8\
+ Makefile\
+ COPYING\
+ README
+
+distdir:
+ test -d $(DISTDIR) || mkdir $(DISTDIR)
+ tar -c -f - $(DISTFILES) | tar -C $(DISTDIR) -x -f -
+
+dist: distdir
+ tar zcf $(DISTDIR).tar.gz $(DISTDIR)
+ rm -rf $(DISTDIR)
+ @s="$(DISTDIR).tar.gz created"; \
+ echo "$$s" | sed -e s/./=/g; \
+ echo "$$s"; \
+ echo "$$s" | sed -e s/./=/g
+

Return to:

Send suggestions and report system problems to the System administrator.