]> git.ipfire.org Git - thirdparty/cups.git/blobdiff - Makefile
Merge changes from CUPS 1.4svn-r7874.
[thirdparty/cups.git] / Makefile
index 733c86b5328102579bc35037055ddace91288025..7be3bac5981c26b1d4b033773e5483a75ec646fc 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -1,5 +1,5 @@
 #
-# "$Id: Makefile 6897 2007-08-30 06:11:59Z mike $"
+# "$Id: Makefile 7613 2008-05-22 23:27:52Z mike $"
 #
 #   Top-level Makefile for the Common UNIX Printing System (CUPS).
 #
@@ -34,6 +34,8 @@ all:
        echo Using ARCHFLAGS="$(ARCHFLAGS)"
        echo Using ALL_CFLAGS="$(ALL_CFLAGS)"
        echo Using ALL_CXXFLAGS="$(ALL_CXXFLAGS)"
+       echo Using CC="$(CC)"
+       echo Using CXX="$(CC)"
        echo Using DSOFLAGS="$(DSOFLAGS)"
        echo Using LDFLAGS="$(LDFLAGS)"
        echo Using LIBS="$(LIBS)"
@@ -51,15 +53,36 @@ libs:
        echo Using ARCHFLAGS="$(ARCHFLAGS)"
        echo Using ALL_CFLAGS="$(ALL_CFLAGS)"
        echo Using ALL_CXXFLAGS="$(ALL_CXXFLAGS)"
+       echo Using CC="$(CC)"
+       echo Using CXX="$(CC)"
        echo Using DSOFLAGS="$(DSOFLAGS)"
        echo Using LDFLAGS="$(LDFLAGS)"
        echo Using LIBS="$(LIBS)"
        for dir in $(DIRS); do\
-               echo Making all in $$dir... ;\
+               echo Making libraries in $$dir... ;\
                (cd $$dir ; $(MAKE) $(MFLAGS) libs) || exit 1;\
        done
 
 
+#
+# Make unit test targets...
+#
+
+unittests:
+       echo Using ARCHFLAGS="$(ARCHFLAGS)"
+       echo Using ALL_CFLAGS="$(ALL_CFLAGS)"
+       echo Using ALL_CXXFLAGS="$(ALL_CXXFLAGS)"
+       echo Using CC="$(CC)"
+       echo Using CXX="$(CC)"
+       echo Using DSOFLAGS="$(DSOFLAGS)"
+       echo Using LDFLAGS="$(LDFLAGS)"
+       echo Using LIBS="$(LIBS)"
+       for dir in $(DIRS); do\
+               echo Making all in $$dir... ;\
+               (cd $$dir ; $(MAKE) $(MFLAGS) unittests) || exit 1;\
+       done
+
+
 #
 # Remove object and target files...
 #
@@ -103,6 +126,22 @@ depend:
        done
 
 
+#
+# Run the clang.llvm.org static code analysis tool on the C sources.
+#
+
+.PHONY: clang
+clang:
+       if test ! -d clang; then \
+               mkdir clang; \
+       else \
+               rm -rf clang/*; \
+       fi
+       $(MAKE) $(MFLAGS) CC="scan-build -o ../clang $(CC)" \
+               CXX="scan-build -o ../clang $(CXX)" clean all
+       test `ls -1 clang | wc -l` = 0
+
+
 #
 # Generate a ctags file...
 #
@@ -166,6 +205,11 @@ install-data:
                        $(INSTALL_SCRIPT) init/cups.sh $(BUILDROOT)$(INITDDIR)/cups; \
                fi \
        fi
+       if test "x$(SMFMANIFESTDIR)" != x; then \
+               echo Installing SMF manifest in $(SMFMANIFESTDIR)...;\
+               $(INSTALL_DIR) $(BUILDROOT)/$(SMFMANIFESTDIR); \
+               $(INSTALL_SCRIPT) init/cups.xml $(BUILDROOT)$(SMFMANIFESTDIR)/cups.xml; \
+       fi
        if test "x$(DBUSDIR)" != x; then \
                echo Installing cups.conf in $(DBUSDIR)...;\
                $(INSTALL_DIR) -m 755 $(BUILDROOT)$(DBUSDIR)/system.d; \
@@ -325,5 +369,5 @@ dist:       all
 
 
 #
-# End of "$Id: Makefile 6897 2007-08-30 06:11:59Z mike $".
+# End of "$Id: Makefile 7613 2008-05-22 23:27:52Z mike $".
 #