summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLuke Shumaker <LukeShu@sbcglobal.net>2009-11-29 00:34:00 -0500
committerLuke Shumaker <lukeshu@sbcglobal.net>2015-06-26 00:30:19 -0600
commitd4a42ee34928970141b8299c104d47c0f3faecd0 (patch)
treedf2f64b260c78466f468d367aae67e1ba47b0cb1
parent3d48e43b9a2c8073663dea1f29815bfc3989c704 (diff)
add copyright notices, and start to autoconfiscate
-rwxr-xr-xconfigure4
-rw-r--r--pkgthing/.sh (renamed from pkgthing/init)0
-rw-r--r--pkgthing/config2
-rw-r--r--pkgthing/main.mk.in5
-rw-r--r--pkgthing/pkgthing.mk41
-rw-r--r--pkgthing/search19
-rw-r--r--pkgthing/src/libexec/find.sh (renamed from pkgthing/find)19
-rw-r--r--pkgthing/src/libexec/search.sh36
-rw-r--r--pkgthing/src/pkgthing.mk.in59
-rw-r--r--[-rwxr-xr-x]pkgthing/src/pkgthing.sh (renamed from pkgthing/pkgthing)3
-rw-r--r--rvs/plugins/Makefile.in86
-rw-r--r--rvs/plugins/filedata/Makefile.in86
-rw-r--r--rvs/plugins/files/Makefile.in86
-rw-r--r--rvs/plugins/users/Makefile.in86
-rw-r--r--rvs/wrapper/Makefile.in86
15 files changed, 124 insertions, 494 deletions
diff --git a/configure b/configure
index b5209e9..764690a 100755
--- a/configure
+++ b/configure
@@ -26,6 +26,10 @@ _exec_prefix='$(prefix)'
_srcdir=$(readlink -f `dirname "$0"`)
_CONFIG="$@"
vars='DESTDIR prefix exec_prefix bindir sbindir libexecdir srcdir CONFIG'
+case "$1" in
+ --srcdir) _srcdir="$2"; shift 2;;
+ --srcdir=*) _srcdir=${1/--srcdir=/}; shift;;
+esac
if [ -f "$_srcdir/config" ]; then . "$_srcdir/config"; fi
error() {
diff --git a/pkgthing/init b/pkgthing/.sh
index 4f5f784..4f5f784 100644
--- a/pkgthing/init
+++ b/pkgthing/.sh
diff --git a/pkgthing/config b/pkgthing/config
new file mode 100644
index 0000000..f9d61de
--- /dev/null
+++ b/pkgthing/config
@@ -0,0 +1,2 @@
+_ver=`cat $_srcdir/Version`
+vars="$vars ver"
diff --git a/pkgthing/main.mk.in b/pkgthing/main.mk.in
index 7048bbc..f17ab76 100644
--- a/pkgthing/main.mk.in
+++ b/pkgthing/main.mk.in
@@ -14,10 +14,11 @@ ver = 0.0
# General Public License for more details.
#
# You should have received a copy of the GNU General Public License
-# along with this program; see the file COPYIN
+# along with this program; see the file COPYING.
+# If not, see <http://www.gnu.org/licenses>.
# general stuffs #####################################################
-all : pget
+all : src/libexec/find src/libexec/search src/pkgthing src/pkgthing.mk
.SUFFIXES :
VPATH = $(srcdir)
filelist = \
diff --git a/pkgthing/pkgthing.mk b/pkgthing/pkgthing.mk
deleted file mode 100644
index 29322b6..0000000
--- a/pkgthing/pkgthing.mk
+++ /dev/null
@@ -1,41 +0,0 @@
-#!/usr/bin/make -f
-name = pkgthing
-ver = 2.9.0
-
-usage = Usage: make [-C /usr/src] TARGET
-email = LukeShu@sbcglobal.net
-
-datadir = /usr/src/local/pkgthing
-
-.PHONY: shorthelp help version
-shorthelp:
- # $(name): please specify an action
- # $(usage)
- #
- # Try `make -C /usr/src help' for more options
-
-help:
- # $(name) $(ver), package thing(y) - THing Is Not GNU (yet?)
- # $(usage)
- #
- # ...
- #
- # Mail bug reports and suggestions to <$(email)>
-
-version:
- # $(name) $(ver)
- #
- # Copyright (C) 2009 Luke Shumaker, Inc.
- # Licence GPLv2+: GNU GPL version 2 or later
- # <http://www.gnu.org/licenses/gpl.html>.
- # This is free software: you are free to change and redistribute it.
- # There is NO WARRANTY, to the extent permitted by law.
- #
- # Originally written by Luke Shumaker <$(email)>
-
-#.PHONY: init $(addprefix init-,$(shell echo *.lst))
-init: $(addprefix init-,$(shell echo *.lst))
-
-init-%: %
- # loading `$<'...
- bash $(datadir)/init "$<"
diff --git a/pkgthing/search b/pkgthing/search
deleted file mode 100644
index a9aade0..0000000
--- a/pkgthing/search
+++ /dev/null
@@ -1,19 +0,0 @@
-#!/bin/sh
-
-pkg=$1
-src=${2-*}
-
-printname() {
- name=$1
- echo -n "$name"
- if [ -L "${name%/}" ]; then
- echo -n ' -> '
- printname `readlink "${name%/}"`
- else
- echo '' # or, rather: putchar('\n');
- fi
-}
-
-for i in $src/*/"$pkg/" $src/*/"$pkg.README"; do
- if [ -e "$i" ]; then printname "$i"; fi
-done
diff --git a/pkgthing/find b/pkgthing/src/libexec/find.sh
index 4b33612..82d8f3a 100644
--- a/pkgthing/find
+++ b/pkgthing/src/libexec/find.sh
@@ -1,4 +1,21 @@
#!/bin/bash
+#name=pkgthing program finder
+#version=???
+# Copyright (C) 2009 Luke Shumaker
+#
+# This program 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 2 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
+# General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; see the file COPYING.
+# If not, see <http://www.gnu.org/licenses>.
# option handling
case "$1" in
@@ -33,7 +50,7 @@ useVar() {
case "$var" in
\$name) _name="$val";;
\$union) :;;
- \$progs)
+ \$progs)
checkList "$prog" "$_name" "$val"
:;;
esac
diff --git a/pkgthing/src/libexec/search.sh b/pkgthing/src/libexec/search.sh
new file mode 100644
index 0000000..7df0541
--- /dev/null
+++ b/pkgthing/src/libexec/search.sh
@@ -0,0 +1,36 @@
+#!/bin/sh
+#name=pkgthing package search
+#version=???
+# Copyright (C) 2009 Luke Shumaker
+#
+# This program 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 2 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
+# General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; see the file COPYING.
+# If not, see <http://www.gnu.org/licenses>.
+
+pkg=$1
+src=${2-*}
+
+printname() {
+ name=$1
+ echo -n "$name"
+ if [ -L "${name%/}" ]; then
+ echo -n ' -> '
+ printname `readlink "${name%/}"`
+ else
+ echo '' # or, rather: putchar('\n');
+ fi
+}
+
+for i in $src/*/"$pkg/" $src/*/"$pkg.README"; do
+ if [ -e "$i" ]; then printname "$i"; fi
+done
diff --git a/pkgthing/src/pkgthing.mk.in b/pkgthing/src/pkgthing.mk.in
new file mode 100644
index 0000000..ae56543
--- /dev/null
+++ b/pkgthing/src/pkgthing.mk.in
@@ -0,0 +1,59 @@
+#!/usr/bin/make -f
+_pkg_name = pkgthing # name of the program, duh
+_pkg_ver = @ver@ # version number
+# Copyright (C) 2009 Luke Shumaker
+#
+# This program 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 2 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
+# General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; see the file COPYING.
+# If not, see <http://www.gnu.org/licenses>.
+
+#for use in messages
+_pkg_usage = Usage: make [-C /usr/src] TARGET
+_pkg_email = LukeShu@sbcglobal.net
+
+_pkg_libexecdir = @libexecdir@/$(_pkg_name) # the location of helper-scripts
+_pkg_update = update # the make target to update package lists
+
+.PHONY: shorthelp help version
+shorthelp:
+ # $(_pkg_name): please specify an action
+ # $(_pkg_usage)
+ #
+ # Try `make -C /usr/src help' for more options
+
+help:
+ # $(_pkg_name) $(_pkg_ver), package thing(y) - THing Is Not GNU (Yet?)
+ # $(_pkg_usage)
+ #
+ # ...
+ #
+ # Mail bug reports and suggestions to <$(_pkg_email)>
+
+version:
+ # $(_pkg_name) $(_pkg_ver)
+ #
+ # Copyright (C) 2009 Luke Shumaker, Inc.
+ # Licence GPLv2+: GNU GPL version 2 or later
+ # <http://www.gnu.org/licenses/gpl.html>.
+ # This is free software: you are free to change and redistribute it.
+ # There is NO WARRANTY, to the extent permitted by law.
+ #
+ # Originally written by Luke Shumaker <$(_pkg_email)>
+
+#.PHONY: $(_pkg_update) $(addprefix $(_pkg_update)-,$(shell echo *.lst))
+ $(_pkg_update): $(addprefix $(_pkg_update)-,$(shell echo *.lst))
+
+$(_pkg_update)-%: %
+ # loading `$<'...
+ bash $(_pkg_libexecdir)/init "$<"
+
diff --git a/pkgthing/pkgthing b/pkgthing/src/pkgthing.sh
index 9439461..38c5ae5 100755..100644
--- a/pkgthing/pkgthing
+++ b/pkgthing/src/pkgthing.sh
@@ -1,6 +1,7 @@
#!/bin/sh
name='pkgthing'
-export datadir=/usr/src/local/pkgthing
+ver=@ver@
+export libexecdir=@libexecdir@
srcdir=/usr/src
diff --git a/rvs/plugins/Makefile.in b/rvs/plugins/Makefile.in
deleted file mode 100644
index e9864b3..0000000
--- a/rvs/plugins/Makefile.in
+++ /dev/null
@@ -1,86 +0,0 @@
-#!/usr/bin/make -f
-#name = Luke's Makefile
-#ver = 1.0
-# Copyright (C) 2009 Luke Shumaker
-#
-# This program 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 2 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
-# General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; see the file COPYING.
-# If not, see <http://www.gnu.org/licenses>.
-
-# Directories ########################################################
-DESTDIR = @DESTDIR@
-prefix = @prefix@
-exec_prefix = @exec_prefix@
-bindir = @bindir@
-sbindir = @sbindir@
-libexecdir = @libexecdir@
-dirs = $(DESTDIR) $(prefix) $(exec_prefix) $(bindir) $(sbindir) $(libexecdir)
-srcdir = @srcdir@
-
-# Programs ###########################################################
-SHELL = /bin/sh
-CC = gcc
-INSTALL = install
-INSTALL_PROGRAM = $(INSTALL)
-INSTALL_DATA = $(INSTALL) -m 644
-MKDIR = $(INSTALL) -d #mkdir -p
-RM = rm -f
-SED = sed
-
-include main.mk
-
-# dist ###############################################################
-d = $(name)-$(ver)
-.PHONY : dist
-dist : $(d).tar.gz
-
-$(d).tar.gz : $(d) $(addprefix $(d)/,$(filelist))
- tar -czf $@ $<
-
-$(d) :
- $(INSTALL) -m 777 -d $@
-
-$(d)/% : $(srcdir)/% $(d)
- cp $< $@
-
-# implicit rules #####################################################
-$(addprefix $(DESTDIR),$(dirs)) :
- $(MKDIR) $@
-
-% : %.sh
- $(SED) 's/@VER@/$(ver)/g' < $< > $@
-
-$(DESTDIR)$(bindir)/% : % $(DESTDIR)$(bindir)
- $(INSTALL_PROGRAM) $< $@
-
-csources = $(filter %.c,$(filelist))
-Makefiles : $(shell find '$(srcdir)' -type f -name Makefile.in) \
- $(shell find '$(srcdir)' -type f -name Makefile.in) \
- $(csources:.c=.d)
-
-%Makefile %.mk : $(srcdir)/configure
- $< @CONFIG@
-
-# This is taken straight from the GNU `make' manual.
-# That makes it GFDL, which is incompatible with the GPL
-# I claim `fair-use'
- %.d: %.c
- @set -e; rm -f $@; \
- $(CC) -M $(CPPFLAGS) $< > $@.$$$$; \
- sed 's,\($*\)\.o[ :]*,\1.o $@ : ,g' < $@.$$$$ > $@; \
- rm -f $@.$$$$
-
-ifneq ($(shell ls -d $(csources:.c=.d) 2>/dev/null),)
- include $(csources:.c=.d)
-endif
-
diff --git a/rvs/plugins/filedata/Makefile.in b/rvs/plugins/filedata/Makefile.in
deleted file mode 100644
index e9864b3..0000000
--- a/rvs/plugins/filedata/Makefile.in
+++ /dev/null
@@ -1,86 +0,0 @@
-#!/usr/bin/make -f
-#name = Luke's Makefile
-#ver = 1.0
-# Copyright (C) 2009 Luke Shumaker
-#
-# This program 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 2 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
-# General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; see the file COPYING.
-# If not, see <http://www.gnu.org/licenses>.
-
-# Directories ########################################################
-DESTDIR = @DESTDIR@
-prefix = @prefix@
-exec_prefix = @exec_prefix@
-bindir = @bindir@
-sbindir = @sbindir@
-libexecdir = @libexecdir@
-dirs = $(DESTDIR) $(prefix) $(exec_prefix) $(bindir) $(sbindir) $(libexecdir)
-srcdir = @srcdir@
-
-# Programs ###########################################################
-SHELL = /bin/sh
-CC = gcc
-INSTALL = install
-INSTALL_PROGRAM = $(INSTALL)
-INSTALL_DATA = $(INSTALL) -m 644
-MKDIR = $(INSTALL) -d #mkdir -p
-RM = rm -f
-SED = sed
-
-include main.mk
-
-# dist ###############################################################
-d = $(name)-$(ver)
-.PHONY : dist
-dist : $(d).tar.gz
-
-$(d).tar.gz : $(d) $(addprefix $(d)/,$(filelist))
- tar -czf $@ $<
-
-$(d) :
- $(INSTALL) -m 777 -d $@
-
-$(d)/% : $(srcdir)/% $(d)
- cp $< $@
-
-# implicit rules #####################################################
-$(addprefix $(DESTDIR),$(dirs)) :
- $(MKDIR) $@
-
-% : %.sh
- $(SED) 's/@VER@/$(ver)/g' < $< > $@
-
-$(DESTDIR)$(bindir)/% : % $(DESTDIR)$(bindir)
- $(INSTALL_PROGRAM) $< $@
-
-csources = $(filter %.c,$(filelist))
-Makefiles : $(shell find '$(srcdir)' -type f -name Makefile.in) \
- $(shell find '$(srcdir)' -type f -name Makefile.in) \
- $(csources:.c=.d)
-
-%Makefile %.mk : $(srcdir)/configure
- $< @CONFIG@
-
-# This is taken straight from the GNU `make' manual.
-# That makes it GFDL, which is incompatible with the GPL
-# I claim `fair-use'
- %.d: %.c
- @set -e; rm -f $@; \
- $(CC) -M $(CPPFLAGS) $< > $@.$$$$; \
- sed 's,\($*\)\.o[ :]*,\1.o $@ : ,g' < $@.$$$$ > $@; \
- rm -f $@.$$$$
-
-ifneq ($(shell ls -d $(csources:.c=.d) 2>/dev/null),)
- include $(csources:.c=.d)
-endif
-
diff --git a/rvs/plugins/files/Makefile.in b/rvs/plugins/files/Makefile.in
deleted file mode 100644
index e9864b3..0000000
--- a/rvs/plugins/files/Makefile.in
+++ /dev/null
@@ -1,86 +0,0 @@
-#!/usr/bin/make -f
-#name = Luke's Makefile
-#ver = 1.0
-# Copyright (C) 2009 Luke Shumaker
-#
-# This program 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 2 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
-# General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; see the file COPYING.
-# If not, see <http://www.gnu.org/licenses>.
-
-# Directories ########################################################
-DESTDIR = @DESTDIR@
-prefix = @prefix@
-exec_prefix = @exec_prefix@
-bindir = @bindir@
-sbindir = @sbindir@
-libexecdir = @libexecdir@
-dirs = $(DESTDIR) $(prefix) $(exec_prefix) $(bindir) $(sbindir) $(libexecdir)
-srcdir = @srcdir@
-
-# Programs ###########################################################
-SHELL = /bin/sh
-CC = gcc
-INSTALL = install
-INSTALL_PROGRAM = $(INSTALL)
-INSTALL_DATA = $(INSTALL) -m 644
-MKDIR = $(INSTALL) -d #mkdir -p
-RM = rm -f
-SED = sed
-
-include main.mk
-
-# dist ###############################################################
-d = $(name)-$(ver)
-.PHONY : dist
-dist : $(d).tar.gz
-
-$(d).tar.gz : $(d) $(addprefix $(d)/,$(filelist))
- tar -czf $@ $<
-
-$(d) :
- $(INSTALL) -m 777 -d $@
-
-$(d)/% : $(srcdir)/% $(d)
- cp $< $@
-
-# implicit rules #####################################################
-$(addprefix $(DESTDIR),$(dirs)) :
- $(MKDIR) $@
-
-% : %.sh
- $(SED) 's/@VER@/$(ver)/g' < $< > $@
-
-$(DESTDIR)$(bindir)/% : % $(DESTDIR)$(bindir)
- $(INSTALL_PROGRAM) $< $@
-
-csources = $(filter %.c,$(filelist))
-Makefiles : $(shell find '$(srcdir)' -type f -name Makefile.in) \
- $(shell find '$(srcdir)' -type f -name Makefile.in) \
- $(csources:.c=.d)
-
-%Makefile %.mk : $(srcdir)/configure
- $< @CONFIG@
-
-# This is taken straight from the GNU `make' manual.
-# That makes it GFDL, which is incompatible with the GPL
-# I claim `fair-use'
- %.d: %.c
- @set -e; rm -f $@; \
- $(CC) -M $(CPPFLAGS) $< > $@.$$$$; \
- sed 's,\($*\)\.o[ :]*,\1.o $@ : ,g' < $@.$$$$ > $@; \
- rm -f $@.$$$$
-
-ifneq ($(shell ls -d $(csources:.c=.d) 2>/dev/null),)
- include $(csources:.c=.d)
-endif
-
diff --git a/rvs/plugins/users/Makefile.in b/rvs/plugins/users/Makefile.in
deleted file mode 100644
index e9864b3..0000000
--- a/rvs/plugins/users/Makefile.in
+++ /dev/null
@@ -1,86 +0,0 @@
-#!/usr/bin/make -f
-#name = Luke's Makefile
-#ver = 1.0
-# Copyright (C) 2009 Luke Shumaker
-#
-# This program 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 2 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
-# General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; see the file COPYING.
-# If not, see <http://www.gnu.org/licenses>.
-
-# Directories ########################################################
-DESTDIR = @DESTDIR@
-prefix = @prefix@
-exec_prefix = @exec_prefix@
-bindir = @bindir@
-sbindir = @sbindir@
-libexecdir = @libexecdir@
-dirs = $(DESTDIR) $(prefix) $(exec_prefix) $(bindir) $(sbindir) $(libexecdir)
-srcdir = @srcdir@
-
-# Programs ###########################################################
-SHELL = /bin/sh
-CC = gcc
-INSTALL = install
-INSTALL_PROGRAM = $(INSTALL)
-INSTALL_DATA = $(INSTALL) -m 644
-MKDIR = $(INSTALL) -d #mkdir -p
-RM = rm -f
-SED = sed
-
-include main.mk
-
-# dist ###############################################################
-d = $(name)-$(ver)
-.PHONY : dist
-dist : $(d).tar.gz
-
-$(d).tar.gz : $(d) $(addprefix $(d)/,$(filelist))
- tar -czf $@ $<
-
-$(d) :
- $(INSTALL) -m 777 -d $@
-
-$(d)/% : $(srcdir)/% $(d)
- cp $< $@
-
-# implicit rules #####################################################
-$(addprefix $(DESTDIR),$(dirs)) :
- $(MKDIR) $@
-
-% : %.sh
- $(SED) 's/@VER@/$(ver)/g' < $< > $@
-
-$(DESTDIR)$(bindir)/% : % $(DESTDIR)$(bindir)
- $(INSTALL_PROGRAM) $< $@
-
-csources = $(filter %.c,$(filelist))
-Makefiles : $(shell find '$(srcdir)' -type f -name Makefile.in) \
- $(shell find '$(srcdir)' -type f -name Makefile.in) \
- $(csources:.c=.d)
-
-%Makefile %.mk : $(srcdir)/configure
- $< @CONFIG@
-
-# This is taken straight from the GNU `make' manual.
-# That makes it GFDL, which is incompatible with the GPL
-# I claim `fair-use'
- %.d: %.c
- @set -e; rm -f $@; \
- $(CC) -M $(CPPFLAGS) $< > $@.$$$$; \
- sed 's,\($*\)\.o[ :]*,\1.o $@ : ,g' < $@.$$$$ > $@; \
- rm -f $@.$$$$
-
-ifneq ($(shell ls -d $(csources:.c=.d) 2>/dev/null),)
- include $(csources:.c=.d)
-endif
-
diff --git a/rvs/wrapper/Makefile.in b/rvs/wrapper/Makefile.in
deleted file mode 100644
index e9864b3..0000000
--- a/rvs/wrapper/Makefile.in
+++ /dev/null
@@ -1,86 +0,0 @@
-#!/usr/bin/make -f
-#name = Luke's Makefile
-#ver = 1.0
-# Copyright (C) 2009 Luke Shumaker
-#
-# This program 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 2 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
-# General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; see the file COPYING.
-# If not, see <http://www.gnu.org/licenses>.
-
-# Directories ########################################################
-DESTDIR = @DESTDIR@
-prefix = @prefix@
-exec_prefix = @exec_prefix@
-bindir = @bindir@
-sbindir = @sbindir@
-libexecdir = @libexecdir@
-dirs = $(DESTDIR) $(prefix) $(exec_prefix) $(bindir) $(sbindir) $(libexecdir)
-srcdir = @srcdir@
-
-# Programs ###########################################################
-SHELL = /bin/sh
-CC = gcc
-INSTALL = install
-INSTALL_PROGRAM = $(INSTALL)
-INSTALL_DATA = $(INSTALL) -m 644
-MKDIR = $(INSTALL) -d #mkdir -p
-RM = rm -f
-SED = sed
-
-include main.mk
-
-# dist ###############################################################
-d = $(name)-$(ver)
-.PHONY : dist
-dist : $(d).tar.gz
-
-$(d).tar.gz : $(d) $(addprefix $(d)/,$(filelist))
- tar -czf $@ $<
-
-$(d) :
- $(INSTALL) -m 777 -d $@
-
-$(d)/% : $(srcdir)/% $(d)
- cp $< $@
-
-# implicit rules #####################################################
-$(addprefix $(DESTDIR),$(dirs)) :
- $(MKDIR) $@
-
-% : %.sh
- $(SED) 's/@VER@/$(ver)/g' < $< > $@
-
-$(DESTDIR)$(bindir)/% : % $(DESTDIR)$(bindir)
- $(INSTALL_PROGRAM) $< $@
-
-csources = $(filter %.c,$(filelist))
-Makefiles : $(shell find '$(srcdir)' -type f -name Makefile.in) \
- $(shell find '$(srcdir)' -type f -name Makefile.in) \
- $(csources:.c=.d)
-
-%Makefile %.mk : $(srcdir)/configure
- $< @CONFIG@
-
-# This is taken straight from the GNU `make' manual.
-# That makes it GFDL, which is incompatible with the GPL
-# I claim `fair-use'
- %.d: %.c
- @set -e; rm -f $@; \
- $(CC) -M $(CPPFLAGS) $< > $@.$$$$; \
- sed 's,\($*\)\.o[ :]*,\1.o $@ : ,g' < $@.$$$$ > $@; \
- rm -f $@.$$$$
-
-ifneq ($(shell ls -d $(csources:.c=.d) 2>/dev/null),)
- include $(csources:.c=.d)
-endif
-