summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLuke Shumaker <lukeshu@sbcglobal.net>2017-02-04 22:53:30 -0500
committerLuke Shumaker <lukeshu@sbcglobal.net>2017-02-04 22:53:30 -0500
commitd570030d25ffba490837499d250587da1ac29dec (patch)
tree17ff6398a97b673c8a9bcdbb6c9b069aafb94c0e
parentc40b7b42592fd801cae5a845ff778e054d0f85de (diff)
Makefile: update for autothing v3
-rw-r--r--Makefile31
l---------README.md1
-rw-r--r--common.each.head.mk0
-rw-r--r--common.each.tail.mk0
-rw-r--r--common.once.head.mk0
-rw-r--r--common.once.tail.mk0
-rw-r--r--config.mk.in198
-rwxr-xr-xwrite-ifchanged11
8 files changed, 7 insertions, 234 deletions
diff --git a/Makefile b/Makefile
index 7ea392e..f56ded4 100644
--- a/Makefile
+++ b/Makefile
@@ -1,23 +1,14 @@
-topoutdir ?= .
-topsrcdir ?= .
-include $(topsrcdir)/automake.head.mk
-
PACKAGE = parabolaweb-utils
VERSION = 20160519
-DESTDIR =
-
#prefix = /usr/local
prefix = /usr
-exec_prefix = $(prefix)
-bindir = $(exec_prefix)/bin
#sbindir = $(exec_prefix)/sbin
sbindir = $(bindir)
#libexecdir = $(exec_prefix)/libexec
libexecdir = $(exec_prefix)/lib
#sysconfdir = $(prefix)/etc
sysconfdir = /etc/conf.d
-systemddir = $(prefix)/lib/systemd/system
#uwsgidir = $(prefix)/etc/uwsgi
uwsgidir = /etc/uwsgi
@@ -27,13 +18,9 @@ pkgconffile = $(sysconfdir)/parabolaweb
CFLAGS += -std=c99 -Wall -Wextra -Werror -Wno-unused-parameter
CPPFLAGS += -DSCRIPT_LOCATION='"$(pkglibexecdir)/parabolaweb-changepassword.real"'
-ifeq ($(wildcard .git),)
-include .srcfiles.mk
-else
-.srcfiles.mk: FORCE
- @echo am_src_files = $(shell git ls-files) | ./write-ifchanged $@
--include $(srcdir)/.srcfiles.mk
-endif
+topoutdir ?= .
+topsrcdir ?= .
+include $(topsrcdir)/build-aux/Makefile.head.mk
targets = \
$(sbindir)/parabolaweb-changepassword \
@@ -43,18 +30,14 @@ targets = \
$(systemddir)/parabolaweb-reporead-inotify.service \
$(uwsgidir)/parabolaweb.ini
-am_gen_files = .srcfiles.mk
-am_out_files = depends.txt $(notdir $(targets)) parabolaweb.conf
-am_sys_files = $(targets) $(pkgconffile)
+files.out.all = depends.txt $(filter-out $(files.src.src),$(notdir $(targets))) parabolaweb.conf
+files.sys.all = $(targets) $(pkgconffile)
# Pattern rules
%: %.in .var.sbindir .var.pkgconffile
sed -e 's|@sbindir@|$(sbindir)|' -e 's|@pkgconffile@|$(pkgconffile)|' < $< > $@
-.var.%: FORCE
- @printf '%s' '$($*)' | ./write-ifchanged $@
-
$(DESTDIR)$(sbindir)/%: %
install -Dm755 $< $@
@@ -79,6 +62,6 @@ $(DESTDIR)$(pkgconffile): parabolaweb.conf
install -Dm644 $< $@
.DELETE_ON_ERROR:
-.PHONY: FORCE
+.SECONDARY:
-include $(topsrcdir)/automake.tail.mk
+include $(topsrcdir)/build-aux/Makefile.tail.mk
diff --git a/README.md b/README.md
deleted file mode 120000
index 5e5ea4a..0000000
--- a/README.md
+++ /dev/null
@@ -1 +0,0 @@
-build-aux/Makefile.README.txt \ No newline at end of file
diff --git a/common.each.head.mk b/common.each.head.mk
deleted file mode 100644
index e69de29..0000000
--- a/common.each.head.mk
+++ /dev/null
diff --git a/common.each.tail.mk b/common.each.tail.mk
deleted file mode 100644
index e69de29..0000000
--- a/common.each.tail.mk
+++ /dev/null
diff --git a/common.once.head.mk b/common.once.head.mk
deleted file mode 100644
index e69de29..0000000
--- a/common.once.head.mk
+++ /dev/null
diff --git a/common.once.tail.mk b/common.once.tail.mk
deleted file mode 100644
index e69de29..0000000
--- a/common.once.tail.mk
+++ /dev/null
diff --git a/config.mk.in b/config.mk.in
deleted file mode 100644
index be95ab4..0000000
--- a/config.mk.in
+++ /dev/null
@@ -1,198 +0,0 @@
-# Copyright (C) 2016-2017 Luke Shumaker
-#
-# This program is free software: you can redistribute it and/or modify
-# it under the terms of the GNU Affero General Public License as published by
-# the Free Software Foundation, either version 3 of the License, or
-# (at your option) any later version.
-#
-# This program 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 Affero General Public License for more details.
-#
-# You should have received a copy of the GNU Affero General Public License
-# along with this program. If not, see <http://www.gnu.org/licenses/>.
-
-# This is based on §7.2 "Makefile Conventions" of the July 25, 2016
-# release of the GNU Coding Standards.
-#
-# Grep for '^##' in this file to see which Autoconf macros it depends
-# on.
-
-dist.pkgname = @PACKAGE_TARNAME@
-gnuconf.pkgname = @PACKAGE_NAME@
-
-# 7.2.2: Utilities in Makefiles
-# -----------------------------
-
-# It's ok to hard-code these commands in rules, but who wants to
-# memorize the list of what's ok?
-
-## AC_PROG_AWK
-## AC_PROG_GREP
-## AC_PROG_EGREP
-## AC_PROG_SED
-
-AWK = @AWK@
-CAT = cat
-CMP = cmp
-CP = cp
-DIFF = diff
-ECHO = echo
-EGREP = @EGREP@
-EXPR = expr
-FALSE = false
-GREP = @GREP@
-INSTALL_INFO = install-info
-LN = ln
-LS = ls
-MKDIR = mkdir
-MV = mv
-PRINTF = printf
-PWD = pwd
-RM = rm
-RMDIR = rmdir
-SED = @SED@
-SLEEP = sleep
-SORT = sort
-TAR = tar
-TEST = test
-TOUCH = touch
-TR = tr
-TRUE = true
-
-# 7.2.2: Utilities in Makefiles/7.2.3: Variables for Specifying Commands
-# ----------------------------------------------------------------------
-
-# Standard user-configurable programs.
-#
-# The list of programs here is specified in §7.2.2, but the associated FLAGS
-# variables are specified in §7.2.3. I found it cleaner to list them together.
-
-## AC_PROG_INSTALL # @INSTALL@ @INSTALL_PROGRAM@ @INSTALL_SCRIPT@ @INSTALL_DATA@
-## AC_PROG_LEX # @LEX@ @LEXLIB@
-## AC_PROG_RANLIB
-## AC_PROG_YACC
-## AC_PROG_CC
-#
-# TODO: What causes Autoconf to define @AR@?
-
-AR = @AR@
-ARFLAGS =
-BISON = bison
-BISONFLAGS =
-CC = @CC@
-CFLAGS = @CFLAGS@ # CFLAGS instead of CCFLAGS
-FLEX = flex
-FLEXFLAGS =
-INSTALL = @INSTALL@
-# There is no INSTALLFLAGS[0]
-LD = ld
-LDFLAGS = @LDFLAGS@
-LDCONFIG = ldconfig # TODO[1]
-LDCONFIGFLAGS =
-LEX = @LEX@
-LFLAGS = #LFLAGS instead of LEXFLAGS
-#MAKE
-MAKEINFO = makeinfo
-MAKEINFOFLAGS =
-RANLIB = @RANLIB@
-RANLIBFLAGS =
-TEXI2DVI = texi2dvi
-TEXI2DVIFLAGS =
-YACC = @YACC@
-YFLAGS = # YFLAGS instead of YACCFLAGS
-
-CPPFLAGS = @CPPFLAGS@
-
-LN_S = @LN_S@
-
-CHGRP = chgrp
-CHGRPFLAGS =
-CHMOD = chmod
-CHMODFLAGS =
-CHOWN = chown
-CHOWNFLAGS =
-MKNOD = mknod
-MKNODFLAGS =
-
-# [0]: There is no INSTALLFLAGS because it would be inconsistent with how the
-# standards otherwise recommend using $(INSTALL); with INSTALL_PROGRAM and
-# INSTALL_DATA; which are specified in a way precluding the use of
-# INSTALLFLAGS. To have the variable, but to ignore it in the common case
-# would be confusing.
-#
-# [1]: The RANLIB and LDCONFIG variables need some extra smarts; §7.2.2 says:
-#
-# > When you use ranlib or ldconfig, you should make sure nothing bad
-# > happens if the system does not have the program in question. Arrange
-# > to ignore an error from that command, and print a message before the
-# > command to tell the user that failure of this command does not mean a
-# > problem. (The Autoconf ‘AC_PROG_RANLIB’ macro can help with this.)
-
-# 7.2.3: Variables for Specifying Commands
-# ----------------------------------------
-
-INSTALL_PROGRAM = @INSTALL_PROGRAM@
-INSTALL_DATA = @INSTALL_DATA@
-
-# 7.2.5: Variables for Installation Directories
-# ---------------------------------------------
-
-# Root for the installation
-prefix = @prefix@
-exec_prefix = @exec_prefix@
-# Executable programs
-bindir = @bindir@
-sbindir = @sbindir@
-libexecdir = @libexecdir@
-# Data files (Autoconf won't support runstatedir until version 2.70)
-datarootdir = @datarootdir@
-datadir = @datadir@
-sysconfdir = @sysconfdir@
-sharedstatedir = @sharedstatedir@
-localstatedir = @localstatedir@
-runstatedir = $(localstatedir)/run
-# Specific types of files
-includedir = @includedir@
-oldincludedir = @oldincludedir@
-docdir = @docdir@
-infodir = @infodir@
-htmldir = @htmldir@
-dvidir = @dvidir@
-pdfdir = @pdfdir@
-psdir = @psdir@
-libdir = @libdir@
-lispdir = $(datarootdir)/emacs/site-lisp
-localedir = @localedir@
-
-mandir = @mandir@
-man1dir = $(mandir)/man1
-man2dir = $(mandir)/man2
-man3dir = $(mandir)/man3
-man4dir = $(mandir)/man4
-man5dir = $(mandir)/man5
-man6dir = $(mandir)/man6
-man7dir = $(mandir)/man7
-man8dir = $(mandir)/man8
-
-manext = .1
-man1ext = .1
-man2ext = .2
-man3ext = .3
-man4ext = .4
-man5ext = .5
-man6ext = .6
-man7ext = .7
-man8ext = .8
-
-# 7.2.7: Install Command Categories
-# ---------------------------------
-
-PRE_INSTALL =
-POST_INSTALL =
-NORMAL_INSTALL =
-
-PRE_UNINSTALL =
-POST_UNINSTALL =
-NORMAL_UNINSTALL =
diff --git a/write-ifchanged b/write-ifchanged
deleted file mode 100755
index c65fa16..0000000
--- a/write-ifchanged
+++ /dev/null
@@ -1,11 +0,0 @@
-#!/usr/bin/env bash
-
-outfile=$1
-tmpfile="$(dirname "$outfile")/.tmp${outfile##*/}"
-
-cat > "$tmpfile" || exit $?
-if cmp -s "$tmpfile" "$outfile"; then
- rm -f "$tmpfile" || :
-else
- mv -f "$tmpfile" "$outfile"
-fi