[sr-dev] git:master:e9cfbfd6: Makefile: root - remove src/ if provided in the value of modules variable

Daniel-Constantin Mierla miconda at gmail.com
Thu Dec 8 18:36:41 CET 2016


Module: kamailio
Branch: master
Commit: e9cfbfd6d9e4f529235e76f0cb778eca52f1b732
URL: https://github.com/kamailio/kamailio/commit/e9cfbfd6d9e4f529235e76f0cb778eca52f1b732

Author: Daniel-Constantin Mierla <miconda at gmail.com>
Committer: Daniel-Constantin Mierla <miconda at gmail.com>
Date: 2016-12-08T18:34:38+01:00

Makefile: root - remove src/ if provided in the value of modules variable

---

Modified: Makefile

---

Diff:  https://github.com/kamailio/kamailio/commit/e9cfbfd6d9e4f529235e76f0cb778eca52f1b732.diff
Patch: https://github.com/kamailio/kamailio/commit/e9cfbfd6d9e4f529235e76f0cb778eca52f1b732.patch

---

diff --git a/Makefile b/Makefile
index 05b9570..ca371a9 100644
--- a/Makefile
+++ b/Makefile
@@ -3,20 +3,32 @@
 # - forward all commands to the Makefile in the src/ subfolder
 #
 
+
 # path to the source code folder
 KSR_DIR ?= src/
 
 # default target for makefile
 .DEFAULT_GOAL := default
 
+
+# strip the src/ from the path to modules
+SMODPARAM=
+ifneq ($(modules),)
+ifneq (,$(findstring src/,$(modules)))
+smodules=$(subst src/,,$(modules))
+SMODPARAM=modules=$(smodules)
+endif
+endif
+
 # forward all named targets
 %:
-	$(MAKE) -C $(KSR_DIR) $@
+	$(MAKE) -C $(KSR_DIR) $@ $(SMODPARAM)
 
 # forward the default target
 default:
 	$(MAKE) -C $(KSR_DIR)
 
+# forward the install target
 .PHONY: install
 install:
-	$(MAKE) -C $(KSR_DIR) $@
+	$(MAKE) -C $(KSR_DIR) $@ $(SMODPARAM)




More information about the sr-dev mailing list