From 0849b109c099aa32dac4f71f45ffcc5df90159f3 Mon Sep 17 00:00:00 2001 From: P. J. McDermott Date: Wed, 08 May 2013 13:10:13 -0400 Subject: Add pkglibbuildsystem macros. --- 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 . -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) -- cgit v0.9.1