]> git.ipfire.org Git - thirdparty/cups.git/blobdiff - Makefile
Merge changes from CUPS 1.4svn-r7874.
[thirdparty/cups.git] / Makefile
index 2a6d27b9fc8a6b68cc8f3bc41d603a6c53666ed5..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).
 #
@@ -22,7 +22,7 @@ include Makedefs
 DIRS   =       cups filter backend berkeley cgi-bin driver locale man monitor \
                notifier ppdc scheduler systemv test \
                $(PHPDIR) \
-               conf data doc $(FONTS) ppd templates
+               conf data doc $(FONTS) templates
 
 
 #
@@ -31,13 +31,55 @@ DIRS        =       cups filter backend berkeley cgi-bin driver locale man monitor \
 
 all:
        chmod +x cups-config
+       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)) || exit 1;\
+               (cd $$dir ; $(MAKE) $(MFLAGS) all) || exit 1;\
+       done
+
+
+#
+# Make library targets...
+#
+
+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 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
 
 
@@ -84,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...
 #
@@ -147,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; \
@@ -189,10 +252,10 @@ install-headers:
 # Install programs...
 #
 
-install-exec:
+install-exec:  all
        for dir in $(DIRS); do\
                echo Installing programs in $$dir... ;\
-               (cd $$dir; $(MAKE) $(MFLAGS) all install-exec) || exit 1;\
+               (cd $$dir; $(MAKE) $(MFLAGS) install-exec) || exit 1;\
        done
 
 
@@ -200,10 +263,10 @@ install-exec:
 # Install libraries...
 #
 
-install-libs:
+install-libs:  libs
        for dir in $(DIRS); do\
                echo Installing libraries in $$dir... ;\
-               (cd $$dir; $(MAKE) $(MFLAGS) all install-libs) || exit 1;\
+               (cd $$dir; $(MAKE) $(MFLAGS) install-libs) || exit 1;\
        done
 
 
@@ -306,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 $".
 #