[rtems-libbsd commit] Fix library creation

Sebastian Huber sebh at rtems.org
Wed Sep 17 09:51:53 UTC 2014


Module:    rtems-libbsd
Branch:    master
Commit:    3d01336e8821312d240b273c62fa1257a7b48f43
Changeset: http://git.rtems.org/rtems-libbsd/commit/?id=3d01336e8821312d240b273c62fa1257a7b48f43

Author:    Sebastian Huber <sebastian.huber at embedded-brains.de>
Date:      Thu Aug 28 22:31:47 2014 +0200

Fix library creation

Delete library and create it from scratch to avoid problems with
non-unique file names.

---

 Makefile            |    1 +
 freebsd-to-rtems.py |    1 +
 2 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/Makefile b/Makefile
index cf0c8b8..53e38b5 100644
--- a/Makefile
+++ b/Makefile
@@ -1438,6 +1438,7 @@ D_FILES += $(LIB_C_FILES:%.c=%.d)
 all: $(LIB) $(TESTS) $(TEST_NETWORK_CONFIG) $(NET_TESTS)
 
 $(LIB): $(LIB_GEN_FILES) $(LIB_O_FILES)
+	rm -f $@
 	$(AR) rcu $@ $^
 
 run_tests: $(RUN_TESTS)
diff --git a/freebsd-to-rtems.py b/freebsd-to-rtems.py
index 394a621..c77a534 100755
--- a/freebsd-to-rtems.py
+++ b/freebsd-to-rtems.py
@@ -478,6 +478,7 @@ class ModuleManager:
 			'all: $(LIB) $(TESTS) $(TEST_NETWORK_CONFIG) $(NET_TESTS)\n' \
 			'\n' \
 			'$(LIB): $(LIB_GEN_FILES) $(LIB_O_FILES)\n' \
+			'\trm -f $@\n' \
 			'\t$(AR) rcu $@ $^\n' \
 			'\n' \
 			'run_tests: $(RUN_TESTS)\n' \



More information about the vc mailing list