1# 2# Configuration file makefile for CUPS. 3# 4# Copyright 2007-2015 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 information. 8# 9 10include ../Makedefs 11 12# 13# Config files... 14# 15 16KEEP = cups-files.conf cupsd.conf snmp.conf 17REPLACE = mime.convs mime.types 18 19 20# 21# Make everything... 22# 23 24all: 25 26 27# 28# Make library targets... 29# 30 31libs: 32 33 34# 35# Make unit tests... 36# 37 38unittests: 39 40 41# 42# Clean all config and object files... 43# 44 45clean: 46 47 48# 49# Dummy depend... 50# 51 52depend: 53 54 55# 56# Install all targets... 57# 58 59install: all install-data install-headers install-libs install-exec 60 61 62# 63# Install data files... 64# 65 66install-data: 67 for file in $(KEEP); do \ 68 if test -r $(SERVERROOT)/$$file ; then \ 69 $(INSTALL_CONFIG) -g $(CUPS_GROUP) $$file $(SERVERROOT)/$$file.N ; \ 70 else \ 71 $(INSTALL_CONFIG) -g $(CUPS_GROUP) $$file $(SERVERROOT) ; \ 72 fi ; \ 73 $(INSTALL_CONFIG) -g $(CUPS_GROUP) $$file $(SERVERROOT)/$$file.default; \ 74 done 75 $(INSTALL_DIR) -m 755 $(DATADIR)/mime 76 for file in $(REPLACE); do \ 77 if test -r $(DATADIR)/mime/$$file ; then \ 78 $(MV) $(DATADIR)/mime/$$file $(DATADIR)/mime/$$file.O ; \ 79 fi ; \ 80 if test -r $(SERVERROOT)/$$file ; then \ 81 $(MV) $(SERVERROOT)/$$file $(DATADIR)/mime/$$file.O ; \ 82 fi ; \ 83 $(INSTALL_DATA) $$file $(DATADIR)/mime ; \ 84 done 85 -if test x$(PAMDIR) != x; then \ 86 $(INSTALL_DIR) -m 755 $(BUILDROOT)$(PAMDIR); \ 87 if test -r $(BUILDROOT)$(PAMDIR)/cups ; then \ 88 $(INSTALL_DATA) $(PAMFILE) $(BUILDROOT)$(PAMDIR)/cups.N ; \ 89 else \ 90 $(INSTALL_DATA) $(PAMFILE) $(BUILDROOT)$(PAMDIR)/cups ; \ 91 fi ; \ 92 fi 93 94 95# 96# Install programs... 97# 98 99install-exec: 100 101 102# 103# Install headers... 104# 105 106install-headers: 107 108 109# 110# Install libraries... 111# 112 113install-libs: 114 115 116# 117# Uninstall files... 118# 119 120uninstall: 121 for file in $(KEEP) $(REPLACE) cupsd.conf.default; do \ 122 $(RM) $(SERVERROOT)/$$file; \ 123 done 124 -$(RMDIR) $(SERVERROOT) 125 for file in $(REPLACE); do \ 126 $(RM) $(DATADIR)/mime/$$file; \ 127 done 128 -$(RMDIR) $(DATADIR)/mime 129 -if test x$(PAMDIR) != x; then \ 130 $(RM) $(BUILDROOT)$(PAMDIR)/cups; \ 131 $(RMDIR) $(BUILDROOT)$(PAMDIR); \ 132 fi 133