makefile: doc update for Makefile.utils
authorAndrei Pelinescu-Onciul <andrei@iptel.org>
Thu, 1 Oct 2009 14:05:02 +0000 (16:05 +0200)
committerAndrei Pelinescu-Onciul <andrei@iptel.org>
Thu, 1 Oct 2009 14:05:02 +0000 (16:05 +0200)
Makefile.utils

index 0c38a79..3f48660 100644 (file)
@@ -8,6 +8,24 @@
 # --------
 #  2009-04-23  initial version derived from Makefile.modules (andrei)
 
+#
+# Variables that should be defined in the util Makefiles, prior to including
+# this makefile:
+#
+# NAME - util binary name, with no path (MUST).
+#
+# COREPATH - path to the main/core directory (OPTIONAL, default ../..)
+#
+# DEFS - local extra defines (OPTIONAL)
+#
+# LIBS - local extra libs (OPTIONAL)
+#
+# SER_LIBS - ser/sr libs that should be compiled, linked against and installed
+#           along the binary. The format is: <path>/<shortname>, e.g.
+#           SER_LIBS=../../lib/srdb2/srdb2 for libsrdb2 with the sources
+#            in ../../lib/srdb2. (OPTIONAL)
+#
+
 UTIL_NAME=$(NAME)
 
 # default path to the core makefiles
@@ -66,10 +84,16 @@ install: $(NAME) $(util_dst) install-libs
        $(INSTALL_TOUCH) $(util_dst)/$(NAME)
        $(INSTALL_BIN)  $(NAME)  $(util_dst)
 
+ifneq (,$(SER_LIBS))
 install-libs:
        @for lib in $(dir $(SER_LIBS)); do \
                $(call try_err, $(MAKE) -C "$${lib}" install-if-newer ) ;\
-       done
+       done; true
+
+else
+install-libs:
+
+endif # $(SER_LIBS)
 
 .PHONY: install-if-newer
 install-if-newer: $(util_dst)/$(NAME)