~m-grant-prg/dnsmasq-logrotate/bionic

« back to all changes in this revision

Viewing changes to src/man/8/Makefile.am

  • Committer: Mark Grant
  • Date: 2018-05-25 09:04:19 UTC
  • Revision ID: m.grant.prg@gmail.com-20180525090419-dv8mln00siub8ng3
Tags: upstream-1.0.0-rc1
ImportĀ upstreamĀ versionĀ 1.0.0-rc1

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#! /usr/bin/env bash
 
2
#########################################################################
 
3
#                                                                       #
 
4
# Script ID: src/man/8/Makefile.am                                      #
 
5
# Author: Copyright (C) 2018  Mark Grant                                #
 
6
#                                                                       #
 
7
# Released under the GPLv3 only.                                        #
 
8
# SPDX-License-Identifier: GPL-3.0                                      #
 
9
#                                                                       #
 
10
# Purpose:                                                              #
 
11
# AutoMake script file to generate dnsmasq-logrotate manual pages.      #
 
12
#                                                                       #
 
13
#########################################################################
 
14
 
 
15
#########################################################################
 
16
#                                                                       #
 
17
# Changelog                                                             #
 
18
#                                                                       #
 
19
# Date          Author  Version Description                             #
 
20
#                                                                       #
 
21
# 25/05/2018    MG      1.0.1   First release.                          #
 
22
#                                                                       #
 
23
#########################################################################
 
24
 
 
25
 
 
26
dnsmasq-postrotate.sh.8: Makefile
 
27
        mkdir -p $(@D)
 
28
        rm -f $@ $@.tmp
 
29
        $(edit) $(srcdir)/$(@F).man.in > $@.tmp
 
30
        targfile=$(@F); \
 
31
        if [[ $$targfile == *"."* ]]; then \
 
32
                if [[ $${targfile##*.} == "" ]]; then \
 
33
                        echo "Source file suffix used as section but empty."; \
 
34
                        exit 1; \
 
35
                else \
 
36
                        section=$${targfile##*.}; \
 
37
                fi; \
 
38
        else \
 
39
                echo "Source file suffix used as section but no dot & empty."; \
 
40
                exit 1; \
 
41
        fi; \
 
42
        txt2manwrap $(@F) $$section "dnsmasq-logrotate Manual" $@.tmp $@
 
43
        rm -f $@.tmp
 
44
 
 
45
dnsmasq-postrotate.sh.8: $(srcdir)/dnsmasq-postrotate.sh.8.man.in
 
46
 
 
47
man_MANS = dnsmasq-postrotate.sh.8
 
48
 
 
49
EXTRA_DIST = $(srcdir)/dnsmasq-postrotate.sh.8.man.in
 
50
 
 
51
CLEANFILES = *.tmp dnsmasq-postrotate.sh.8