]> git.ipfire.org Git - thirdparty/cups.git/blobdiff - Makefile
Import changes from CUPS 1.4svn-r8704.
[thirdparty/cups.git] / Makefile
index 44beff0a3a1560c289cdde0281c11cbe2a649f3d..e1929711cc1a7ad8951b773868f0847f83d7c553 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -3,7 +3,7 @@
 #
 #   Top-level Makefile for the Common UNIX Printing System (CUPS).
 #
-#   Copyright 2007-2008 by Apple Inc.
+#   Copyright 2007-2009 by Apple Inc.
 #   Copyright 1997-2007 by Easy Software Products, all rights reserved.
 #
 #   These coded instructions, statements, and computer programs are the
@@ -144,7 +144,7 @@ depend:
 .PHONY: clang
 clang:
        $(RM) -r clang
-       scan-build -k -o `pwd`/clang $(MAKE) $(MFLAGS) \
+       scan-build -V -k -o `pwd`/clang $(MAKE) $(MFLAGS) \
                CC=ccc-analyzer CXX=ccc-analyzer clean all
 
 
@@ -316,33 +316,88 @@ uninstall:
                fi \
                $(RMDIR) $(BUILDROOT)$(INITDDIR); \
        fi
+       if test "x$(SMFMANIFESTDIR)" != x; then \
+               echo Uninstalling SMF manifest in $(SMFMANIFESTDIR)...;\
+               $(RM) $(BUILDROOT)$(SMFMANIFESTDIR)/cups.xml; \
+       fi
        if test "x$(DBUSDIR)" != x; then \
                echo Uninstalling cups.conf in $(DBUSDIR)...;\
                $(RM) $(BUILDROOT)$(DBUSDIR)/cups.conf; \
                $(RMDIR) $(BUILDROOT)$(DBUSDIR); \
        fi
-       $(RM) $(BUILDROOT)/etc/xinetd.d/cups-lpd
-       $(RM) $(BUILDROOT)/usr/share/applications/cups.desktop
-       $(RM) $(BUILDROOT)/usr/share/icons/hicolor/16x16/apps/cups.png
-       $(RM) $(BUILDROOT)/usr/share/icons/hicolor/32x32/apps/cups.png
-       $(RM) $(BUILDROOT)/usr/share/icons/hicolor/64x64/apps/cups.png
-       $(RM) $(BUILDROOT)/usr/share/icons/hicolor/128x128/apps/cups.png
+       if test "x$(XINETD)" != x; then \
+               echo Uninstalling xinetd configuration file for cups-lpd...; \
+               $(RM) $(BUILDROOT)$(XINETD)/cups-lpd; \
+       fi
+       if test "x$(MENUDIR)" != x; then \
+               echo Uninstalling desktop menu...; \
+               $(RM) $(BUILDROOT)$(MENUDIR)/cups.desktop; \
+       fi
+       if test "x$(ICONDIR)" != x; then \
+               echo Uninstalling desktop icons...; \
+               $(RM) $(BUILDROOT)$(ICONDIR)/hicolor/16x16/apps/cups.png; \
+               $(RM) $(BUILDROOT)$(ICONDIR)/hicolor/32x32/apps/cups.png; \
+               $(RM) $(BUILDROOT)$(ICONDIR)/hicolor/64x64/apps/cups.png; \
+               $(RM) $(BUILDROOT)$(ICONDIR)/hicolor/128x128/apps/cups.png; \
+       fi
 
 
 #
 # Run the test suite...
 #
 
-test:  all
+test:  all unittests
        echo Running CUPS test suite...
        cd test; ./run-stp-tests.sh
 
 
-check: all
+check: all unittests
        echo Running CUPS test suite with defaults...
        cd test; ./run-stp-tests.sh 1 0 n
 
 
+#
+# Create HTML documentation...
+#
+
+apihelp:
+       for dir in cgi-bin cups filter driver ppdc scheduler; do\
+               echo Generating API help in $$dir... ;\
+               (cd $$dir; $(MAKE) $(MFLAGS) apihelp) || exit 1;\
+       done
+
+framedhelp:
+       for dir in cgi-bin cups filter driver ppdc scheduler; do\
+               echo Generating framed API help in $$dir... ;\
+               (cd $$dir; $(MAKE) $(MFLAGS) framedhelp) || exit 1;\
+       done
+
+
+#
+# Create an Xcode docset...
+#
+
+docset:        apihelp
+       echo Generating docset directory tree...
+       $(RM) -r org.cups.docset
+       mkdir -p org.cups.docset/Contents/Resources/Documentation/help
+       mkdir -p org.cups.docset/Contents/Resources/Documentation/images
+       cd man; $(MAKE) $(MFLAGS) html
+       cd doc; $(MAKE) $(MFLAGS) docset
+       cd cgi-bin; $(MAKE) $(MFLAGS) makedocset
+       cgi-bin/makedocset org.cups.docset \
+               `svnversion . | sed -e '1,$$s/[a-zA-Z]//g'` \
+               doc/help/api-*.tokens
+       $(RM) doc/help/api-*.tokens
+       echo Indexing docset...
+       /Developer/usr/bin/docsetutil index org.cups.docset
+       echo Generating docset archive and feed...
+       /Developer/usr/bin/docsetutil package --output org.cups.docset.xar \
+               --atom org.cups.docset.atom \
+               --download-url http://www.cups.org/org.cups.docset.xar \
+               org.cups.docset
+
+
 #
 # Make software distributions using EPM (http://www.easysw.com/epm/)...
 #
@@ -369,7 +424,7 @@ dist:       all
                *BSD*) $(MAKE) $(MFLAGS) bsd;; \
                Darwin*) $(MAKE) $(MFLAGS) osx;; \
                IRIX*) $(MAKE) $(MFLAGS) tardist;; \
-               Linux*) $(MAKE) $(MFLAGS) rpm;; \
+               Linux*) test ! -x /usr/bin/rpm || $(MAKE) $(MFLAGS) rpm;; \
                SunOS*) $(MAKE) $(MFLAGS) pkg;; \
        esac