1# 2# Man page makefile for CUPS. 3# 4# Copyright © 2007-2019 by Apple Inc. 5# Copyright © 1993-2006 by Easy Software Products. 6# 7# Licensed under Apache License v2.0. See the file "LICENSE" for more 8# information. 9# 10 11include ../Makedefs 12 13 14# 15# Man pages... 16# 17 18MAN1 = cancel.1 \ 19 cups.1 \ 20 cups-config.1 \ 21 cupstestppd.1 \ 22 ippeveprinter.1 \ 23 $(IPPFIND_MAN) \ 24 ipptool.1 \ 25 lp.1 \ 26 lpoptions.1 \ 27 lpq.1 \ 28 lprm.1 \ 29 lpr.1 \ 30 lpstat.1 \ 31 ppdc.1 \ 32 ppdhtml.1 \ 33 ppdi.1 \ 34 ppdmerge.1 \ 35 ppdpo.1 36MAN5 = classes.conf.5 \ 37 client.conf.5 \ 38 cups-files.conf.5 \ 39 cups-snmp.conf.5 \ 40 cupsd.conf.5 \ 41 cupsd-logs.5 \ 42 ipptoolfile.5 \ 43 mailto.conf.5 \ 44 mime.convs.5 \ 45 mime.types.5 \ 46 ppdcfile.5 \ 47 printers.conf.5 \ 48 subscriptions.conf.5 49MAN7 = backend.7 \ 50 filter.7 \ 51 ippevepcl.7 \ 52 notifier.7 53MAN8 = cupsaccept.8 \ 54 cupsctl.8 \ 55 cupsfilter.8 \ 56 cups-lpd.8 \ 57 cups-snmp.8 \ 58 cupsd.8 \ 59 cupsd-helper.8 \ 60 cupsenable.8 \ 61 lpadmin.8 \ 62 lpinfo.8 \ 63 lpmove.8 \ 64 lpc.8 65 66 67# 68# Make everything... 69# 70 71all: $(MAN1) $(MAN5) $(MAN7) $(MAN8) 72 73 74# 75# Make library targets... 76# 77 78libs: 79 80 81# 82# Make unit tests... 83# 84 85unittests: 86 87 88# 89# Clean all config and object files... 90# 91 92clean: 93 $(RM) mantohtml mantohtml.o 94 95 96# 97# Dummy depend target... 98# 99 100depend: 101 102 103# 104# Install all targets... 105# 106 107install: all install-data install-headers install-libs install-exec 108 109 110# 111# Install data files... 112# 113 114install-data: all 115 echo Installing man pages in $(MANDIR)/man1... 116 $(INSTALL_DIR) -m 755 $(MANDIR)/man1 117 for file in $(MAN1); do \ 118 $(INSTALL_MAN) $$file $(MANDIR)/man1; \ 119 done 120 echo Installing man pages in $(MANDIR)/man5... 121 $(INSTALL_DIR) -m 755 $(MANDIR)/man5 122 for file in $(MAN5); do \ 123 $(INSTALL_MAN) $$file $(MANDIR)/man5; \ 124 done 125 echo Installing man pages in $(MANDIR)/man7... 126 $(INSTALL_DIR) -m 755 $(MANDIR)/man7 127 for file in $(MAN7); do \ 128 $(INSTALL_MAN) $$file $(MANDIR)/man7; \ 129 done 130 $(RM) $(MANDIR)/man7/ippeveps.7 131 $(LN) ippevepcl.7 $(MANDIR)/man7/ippeveps.7 132 echo Installing man pages in $(MANDIR)/man8... 133 $(INSTALL_DIR) -m 755 $(MANDIR)/man8 134 for file in $(MAN8); do \ 135 $(INSTALL_MAN) $$file $(MANDIR)/man8; \ 136 done 137 $(RM) $(MANDIR)/man8/cupsdisable.8 138 $(LN) cupsenable.8 $(MANDIR)/man8/cupsdisable.8 139 $(RM) $(MANDIR)/man8/cupsreject.8 140 $(LN) cupsaccept.8 $(MANDIR)/man8/cupsreject.8 141 for file in cups-deviced.8 cups-driverd.8 cups-exec.8; do \ 142 $(RM) $(MANDIR)/man8/$$file; \ 143 $(LN) cupsd-helper.8 $(MANDIR)/man8/$$file; \ 144 done 145 146 147# 148# Install programs... 149# 150 151install-exec: 152 153 154# 155# Install headers... 156# 157 158install-headers: 159 160 161# 162# Install libraries... 163# 164 165install-libs: 166 167 168# 169# Uninstall files... 170# 171 172uninstall: 173 echo Uninstalling man pages from $(MANDIR)/man1... 174 for file in $(MAN1); do \ 175 $(RM) $(MANDIR)/man1/$$file; \ 176 done 177 -$(RMDIR) $(MANDIR)/man1 178 echo Uninstalling man pages from $(MANDIR)/man5... 179 for file in $(MAN5); do \ 180 $(RM) $(MANDIR)/man5/$$file; \ 181 done 182 -$(RMDIR) $(MANDIR)/man5 183 echo Uninstalling man pages from $(MANDIR)/man7... 184 for file in $(MAN7) ippeveps.7; do \ 185 $(RM) $(MANDIR)/man7/$$file; \ 186 done 187 -$(RMDIR) $(MANDIR)/man7 188 echo Uninstalling man pages from $(MANDIR)/man8... 189 for file in $(MAN8) cupsenable.8 cupsreject.8 cups-deviced.8 cups-driverd.8 cups-exec.8; do \ 190 $(RM) $(MANDIR)/man8/$$file; \ 191 done 192 -$(RMDIR) $(MANDIR)/man8 193 194 195# 196# Local programs (not built when cross-compiling...) 197# 198 199local: html 200 201 202# 203# Make html versions of man pages... 204# 205 206html: $(MAN1) $(MAN5) $(MAN7) $(MAN8) mantohtml 207 echo Converting man pages to HTML... 208 for file in $(MAN1); do \ 209 echo " $$file..."; \ 210 ./mantohtml $$file >../doc/help/man-`basename $$file .1`.html; \ 211 done 212 for file in $(MAN5); do \ 213 echo " $$file..."; \ 214 ./mantohtml $$file >../doc/help/man-`basename $$file .5`.html; \ 215 done 216 for file in $(MAN7); do \ 217 echo " $$file..."; \ 218 ./mantohtml $$file >../doc/help/man-`basename $$file .7`.html; \ 219 done 220 for file in $(MAN8); do \ 221 echo " $$file..."; \ 222 ./mantohtml $$file >../doc/help/man-`basename $$file .8`.html; \ 223 done 224 225mantohtml: mantohtml.o ../cups/$(LIBCUPSSTATIC) 226 $(LD_CC) $(ARCHFLAGS) $(ALL_LDFLAGS) -o $@ mantohtml.o $(LINKCUPSSTATIC) 227 $(CODE_SIGN) -s "$(CODE_SIGN_IDENTITY)" $@ 228