summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorP. J. McDermott <pjm@nac.net>2012-08-02 07:03:56 (EDT)
committer P. J. McDermott <pjm@nac.net>2012-08-02 07:03:56 (EDT)
commitd27bcf8dc05090c60a30c926a6f97a26ed60d498 (patch)
tree54dcbee3f674372d221939b0d2f660d1ccaaba69
parentc6dbf4726d3cd4a98fe24929a28c78e880b39024 (diff)
Update lib and man input makefiles.
-rw-r--r--lib/Makefile.in48
-rw-r--r--man/Makefile.in50
2 files changed, 48 insertions, 50 deletions
diff --git a/lib/Makefile.in b/lib/Makefile.in
index ecf1e3a..aa7cacd 100644
--- a/lib/Makefile.in
+++ b/lib/Makefile.in
@@ -17,55 +17,59 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-SHELL = @shell@
-INSTALL = @install@
-MAKE = @make@
+package_name = @package_name@
+package_version= @package_version@
+
+srcdir = @srcdir@
+prefix = @prefix@
+libdir = @libdir@
+datadir = @datadir@
+localedir = @localedir@
-SRCDIR = @srcdir@
-PREFIX = @prefix@
-LIBDIR = @libdir@
+sed_script = s&@@PACKAGE_NAME@@&$(package_name)&;\
+ s&@@PACKAGE_VERSION@@&$(package_version)&;\
+ s&@@LIBDIR@@&$(libdir)&;\
+ s&@@LOCALEDIR@@&$(localedir)&;
+
+INSTALL = @install@
.SUFFIXES:
.SUFFIXES: .sh
-SRCS = controlfields.sh architecture.sh archive.sh messages.sh changelog.sh
+SRCS = control.sh \
+ changelog.sh \
+ locale.sh \
+ messages.sh \
+ util.sh
OBJS = $(SRCS:.sh=)
-PACKAGE = @package@
-VERSION = @version@
-
-distdir = ../$(PACKAGE)-$(VERSION)/lib
+distdir = ../$(package_name)-$(package_version)/lib
distfiles = Makefile.in $(SRCS)
-.PHONY: all
all: $(OBJS)
$(OBJS):
@printf ' SED %s\n' '$@'
- @sed -f ../sedscript $(SRCDIR)/lib/$@.sh > $@
+ @sed '$(sed_script)' '$(srcdir)/lib/$@.sh' >'$@'
-.PHONY: clean
clean:
@for obj in $(OBJS); do \
printf ' RM lib/%s\n' "$${obj}"; \
- rm -f $${obj}; \
+ rm -f "$${obj}"; \
done
-.PHONY: install
install: all
@for obj in $(OBJS); do \
printf ' INSTALL lib/%s\n' "$${obj}"; \
- $(INSTALL) -D $${obj} "$(DESTDIR)/$(LIBDIR)/opkhelper/$${obj}"; \
+ $(INSTALL) -D "$${obj}" "$(DESTDIR)/$(libdir)/$${obj}"; \
done
-.PHONY: uninstall
uninstall:
@for obj in $(OBJS); do \
printf ' RM %s\n' "$${obj}"; \
rm -f "$(DESTDIR)/$(LIBDIR)/opkhelper/$${obj}"; \
done
-.PHONY: distdir
-distdir:
- @[ -d '$(distdir)' ] || mkdir '$(distdir)'
- @cp -pR $(distfiles) $(distdir)
+$(distdir):
+ @mkdir -p '$(distdir)'
+ @cp -pR $(distfiles) '$(distdir)'
diff --git a/man/Makefile.in b/man/Makefile.in
index 5ba5309..e68ccce 100644
--- a/man/Makefile.in
+++ b/man/Makefile.in
@@ -17,60 +17,54 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-SHELL = @shell@
-INSTALL = @install@
-MAKE = @make@
+package_name = @package_name@
+package_version= @package_version@
+
+srcdir = @srcdir@
+prefix = @prefix@
+datadir = @datadir@
+mandir = @mandir@
+
+sh = @sh@
-SRCDIR = @srcdir@
-PREFIX = @prefix@
-MANDIR = @mandir@
+sed_script = s&@@PACKAGE_NAME@@&$(package_name)&;\
+ s&@@PACKAGE_VERSION@@&$(package_version)&;
+
+INSTALL = @install@
.SUFFIXES:
.SUFFIXES: .in
-SRCS = opkhelper.7.in opkbuild.1.in \
- oh-checkbuilddeps.1.in oh-applypatches.1.in oh-copyconfig.1.in \
- oh-strip.1.in oh-installfiles.1.in oh-installdocs.1.in \
- oh-gencontrol.1.in oh-buildopk.1.in
+SRCS = opkhelper.7.in
OBJS = $(SRCS:.in=)
-PACKAGE = @package@
-VERSION = @version@
-
-distdir = ../$(PACKAGE)-$(VERSION)/man
+distdir = ../$(package_name)-$(package_version)/lib
distfiles = Makefile.in $(SRCS)
-.PHONY: all
all: $(OBJS)
$(OBJS):
- @printf ' CP man/%s\n' '$@'
- @sed -f ../sedscript $(SRCDIR)/man/$@.in > $@
+ @printf ' SED man/%s\n' '$@'
+ @sed '$(sed_script)' '$(srcdir)/man/$@.in' >'$@'
-.PHONY: clean
clean:
@for obj in $(OBJS); do \
printf ' RM man/%s\n' "$${obj}"; \
rm -f $${obj}; \
done
-.PHONY: install
install: all
@for obj in $(OBJS); do \
printf ' INSTALL man/%s\n' "$${obj}"; \
- section=$$(echo "$${obj}" | sed 's/^.*[.]\([0-9]\)$$/\1/'); \
- $(INSTALL) -D $${obj} "$(DESTDIR)/$(MANDIR)/man$${section}/$${obj}"; \
+ $(INSTALL) -D "$${obj}" "$(DESTDIR)/$(mandir)/man$${obj##*.}/$${obj}"; \
done
-.PHONY: uninstall
uninstall:
@for obj in $(OBJS); do \
printf ' RM %s\n' "$${obj}"; \
- section=$$(echo "$${obj}" | sed 's/^.*[.]\([0-9]\)$$/\1/'); \
- rm -f "$(DESTDIR)/$(MANDIR)/man$${section}/$${obj}"; \
+ rm -f "$(DESTDIR)/$(mandir)/man$${obj##*.}/$${obj}"; \
done
-.PHONY: distdir
-distdir:
- @[ -d '$(distdir)' ] || mkdir '$(distdir)'
- @cp -pR $(distfiles) $(distdir)
+$(distdir):
+ @mkdir -p '$(distdir)'
+ @cp -pR $(distfiles) '$(distdir)'