From a08fbb3ab1f522f0b923530170e68fc4c08920dc Mon Sep 17 00:00:00 2001
From: Anders Blomdell <anders.blomdell@control.lth.se>
Date: Tue, 17 Feb 2015 10:01:07 +0100
Subject: [PATCH] Some makefile cleanups

Conflicts:
	lib/java/Makefile
---
 lib/Makefile        | 18 +++++++++++-------
 lib/csharp/Makefile |  2 ++
 lib/python/Makefile |  5 +++--
 3 files changed, 16 insertions(+), 9 deletions(-)

diff --git a/lib/Makefile b/lib/Makefile
index 5a16cab..3ca1e03 100644
--- a/lib/Makefile
+++ b/lib/Makefile
@@ -1,19 +1,23 @@
+.PHONY: all
 all:
 	cd c ; make
 	cd csharp ; make
 	cd java ; make
 
+.PHONY: test
 test:
 	$(MAKE) -C c test
 
+.PHONY: clean
 clean:
-	cd c ; make clean
-	cd csharp ; make clean
-	cd java ; make clean
+	$(MAKE) -C c clean
+	$(MAKE) -C csharp clean
+	$(MAKE) -C java clean
 	$(MAKE) -C python clean
 
+.PHONY: distclean
 distclean:
-	cd c ; make distclean
-	cd csharp ; make clean
-	cd java ; make clean
-	$(MAKE) -C python clean
+	$(MAKE) -C c distclean
+	$(MAKE) -C csharp distclean
+	$(MAKE) -C java  distclean
+	$(MAKE) -C python distclean
diff --git a/lib/csharp/Makefile b/lib/csharp/Makefile
index 370c77e..1a18f3b 100644
--- a/lib/csharp/Makefile
+++ b/lib/csharp/Makefile
@@ -16,4 +16,6 @@ labcomm.dll: $(MODULES:%=se/lth/control/labcomm/%.cs) Makefile
 	mcs -out:$@ -target:library $(filter %.cs, $^)
 
 clean:
+
+distclean:
 	rm -f labcomm.dll
diff --git a/lib/python/Makefile b/lib/python/Makefile
index 7798ea9..52022dd 100644
--- a/lib/python/Makefile
+++ b/lib/python/Makefile
@@ -1,5 +1,6 @@
+.PHONY: clean
 clean:
 	find . -name '*.pyc' -exec rm {} \;
 
-distclean:
-	find . -name '*.pyc' -exec rm {} \;
+.PHONY: distclean
+distclean: clean
-- 
GitLab