summaryrefslogtreecommitdiffstats
path: root/man
diff options
context:
space:
mode:
Diffstat (limited to 'man')
-rw-r--r--man/Makefile.in50
1 files changed, 22 insertions, 28 deletions
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)'