summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorP. J. McDermott <pjm@nac.net>2013-05-08 13:10:13 (EDT)
committer P. J. McDermott <pjm@nac.net>2013-05-08 13:10:13 (EDT)
commit0849b109c099aa32dac4f71f45ffcc5df90159f3 (patch)
treeaaf2a9dbdd5beebb5bd66b5cefa293e3ea8a0acf
parent5a7ffe976e1bd4f1ec4a19499c8f2af3bcf82558 (diff)
Add pkglibbuildsystem macros.
-rw-r--r--Makefile.in32
-rw-r--r--lib/buildsystem/local.mk3
2 files changed, 29 insertions, 6 deletions
diff --git a/Makefile.in b/Makefile.in
index c262f35..5d128d9 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -39,6 +39,8 @@ DESTDIR = /
sh = @sh@
archtab = @archtab@
+pkglibbuildsystemdir = $(pkglibdir)/buildsystem
+
.SUFFIXES:
include $(srcdir)/src/local.mk
@@ -49,6 +51,7 @@ include $(srcdir)/locale/local.mk
bin = $(bin_srcs:.sh=)
pkglib = $(pkglib_srcs:.sh=.sm)
+pkglibbuildsystem = $(pkglibbuildsystem_srcs:.sh=.sm)
man1 = $(man_man1)
locale = $(locale_locale)
@@ -66,6 +69,7 @@ distfiles = \
lib/local.mk \
$(bin_srcs) \
$(pkglib_srcs) \
+ $(pkglibbuildsystem_srcs) \
$(man_distfiles) \
$(locale_distfiles)
@@ -89,15 +93,16 @@ script = \
@sed '$(script)' '$(srcdir)/$*.sh' >'$*.sm'
all: all-exec all-data
-all-exec: all-bin all-pkglib
+all-exec: all-bin all-pkglib all-pkglibbuildsystem
all-bin: $(bin)
all-pkglib: $(pkglib)
+all-pkglibbuildsystem: $(pkglibbuildsystem)
all-data: all-man1 all-locale
all-man1: $(man1)
all-locale: $(locale)
clean: clean-exec clean-data
-clean-exec: clean-bin clean-pkglib
+clean-exec: clean-bin clean-pkglib clean-pkglibbuildsystem
clean-bin:
@for f in $(bin); do \
printf ' RM %s\n' "$${f}"; \
@@ -108,6 +113,11 @@ clean-pkglib:
printf ' RM %s\n' "$${f}"; \
rm -f "$${f}"; \
done
+clean-pkglibbuildsystem:
+ @for f in $(pkglibbuildsystem); do \
+ printf ' RM %s\n' "$${f}"; \
+ rm -f "$${f}"; \
+ done
clean-data: clean-man1 clean-locale
clean-man1:
@for f in $(man1); do \
@@ -121,7 +131,7 @@ clean-locale:
done
install: all install-exec install-data
-install-exec: install-bin install-pkglib
+install-exec: install-bin install-pkglib install-pkglibbuildsystem
install-bin:
@mkdir -p '$(DESTDIR)/$(bindir)'
@for f in $(bin); do \
@@ -142,6 +152,14 @@ install-pkglib:
cp "$${f}" "$(DESTDIR)/$(pkglibdir)/$${ff}"; \
chmod 644 "$(DESTDIR)/$(pkglibdir)/$${ff}"; \
done
+install-pkglibbuildsystem:
+ @mkdir -p '$(DESTDIR)/$(pkglibbuildsystemdir)'
+ @for f in $(pkglibbuildsystem); do \
+ printf ' INSTALL %s\n' "$${f}"; \
+ ff="$$(printf '%s' "$${f}" | sed 's|^[^/]*/||')"; \
+ cp "$${f}" "$(DESTDIR)/$(pkglibbuildsystemdir)/$${ff}"; \
+ chmod 644 "$(DESTDIR)/$(pkglibbuildsystemdir)/$${ff}"; \
+ done
install-data: install-man1 install-locale
install-man1:
@mkdir -p '$(DESTDIR)/$(man1dir)'
@@ -165,7 +183,7 @@ install-locale:
done
uninstall: uninstall-exec uninstall-data
-uninstall-exec: uninstall-bin uninstall-pkglib
+uninstall-exec: uninstall-bin uninstall-pkglib uninstall-pkglibbuildsystem
uninstall-bin:
@for f in $(bin); do \
printf ' RM %s\n' "$${f}"; \
@@ -178,6 +196,12 @@ uninstall-pkglib:
ff="$$(printf '%s' "$${f}" | sed 's|^[^/]*/||')"; \
rm -f "$(DESTDIR)/$(pkglibdir)/$${ff}"; \
done
+uninstall-pkglibbuildsystem:
+ @for f in $(pkglibbuildsystem); do \
+ printf ' RM %s\n' "$${f}"; \
+ ff="$$(printf '%s' "$${f}" | sed 's|^[^/]*/||')"; \
+ rm -f "$(DESTDIR)/$(pkglibbuildsystemdir)/$${ff}"; \
+ done
uninstall-data: uninstall-man1 uninstall-locale
uninstall-man1:
@for f in $(man1); do \
diff --git a/lib/buildsystem/local.mk b/lib/buildsystem/local.mk
index 81679c7..76cf972 100644
--- a/lib/buildsystem/local.mk
+++ b/lib/buildsystem/local.mk
@@ -16,8 +16,7 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-lib_buildsystem_srcs = \
+pkglibbuildsystem_srcs = \
lib/buildsystem/autoconf.sh \
lib/buildsystem/kbuild.sh \
lib/buildsystem/make.sh
-lib_buildsystem_distfiles = lib/buildsystem/local.mk $(lib_buildsystem_srcs)