[rtems-libbsd commit] Makefile: updated to probably install architecture specific .h files

Joel Sherrill joel at rtems.org
Mon Jul 9 22:18:43 UTC 2012


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

Author:    Joel Sherrill <joel.sherrill at oarcorp.com>
Date:      Mon Jul  9 17:21:36 2012 -0500

Makefile: updated to probably install architecture specific .h files

---

 Makefile            |   14 ++++++++++++--
 freebsd-to-rtems.py |   14 ++++++++++++--
 2 files changed, 24 insertions(+), 4 deletions(-)

diff --git a/Makefile b/Makefile
index 5c543d9..84e6462 100644
--- a/Makefile
+++ b/Makefile
@@ -452,12 +452,22 @@ $(LIB): $(C_O_FILES)
 lib_usb:
 	$(MAKE) $(LIB)
 
+CPU_SED  = sed
+CPU_SED += -e '/arm/d'
+CPU_SED += -e '/i386/d'
+CPU_SED += -e '/powerpc/d'
+CPU_SED += -e '/mips/d'
+CPU_SED += -e '/sparc/d'
+CPU_SED += -e '/sparc64/d'
+
 install: $(LIB)
 	install -d $(INSTALL_BASE)/include
 	install -c -m 644 $(LIB) $(INSTALL_BASE)
-	cd rtemsbsd; for i in `find . -name '*.h'` ; do \
+	cd rtemsbsd; for i in `find . -name '*.h' | $(CPU_SED)` ; do \
+	  install -c -m 644 -D "$$i" "$(INSTALL_BASE)/include/$$i" ; done
+	for i in `find contrib freebsd -name '*.h' | $(CPU_SED)` ; do \
 	  install -c -m 644 -D "$$i" "$(INSTALL_BASE)/include/$$i" ; done
-	for i in `find contrib freebsd -name '*.h'` ; do \
+	cd freebsd/$(RTEMS_CPU)/include ; for i in `find . -name '*.h'` ; do \
 	  install -c -m 644 -D "$$i" "$(INSTALL_BASE)/include/$$i" ; done
 
 clean:
diff --git a/freebsd-to-rtems.py b/freebsd-to-rtems.py
index c1eef76..56bc6ad 100755
--- a/freebsd-to-rtems.py
+++ b/freebsd-to-rtems.py
@@ -372,12 +372,22 @@ class ModuleManager:
 			'lib_usb:\n' \
 			'\t$(MAKE) $(LIB)\n' \
 			'\n' \
+			'CPU_SED  = sed\n' \
+			'CPU_SED += -e \'/arm/d\'\n' \
+			'CPU_SED += -e \'/i386/d\'\n' \
+			'CPU_SED += -e \'/powerpc/d\'\n' \
+			'CPU_SED += -e \'/mips/d\'\n' \
+			'CPU_SED += -e \'/sparc/d\'\n' \
+			'CPU_SED += -e \'/sparc64/d\'\n' \
+			'\n' \
 			'install: $(LIB)\n' \
 			'\tinstall -d $(INSTALL_BASE)/include\n' \
 			'\tinstall -c -m 644 $(LIB) $(INSTALL_BASE)\n' \
-			'\tcd rtemsbsd; for i in `find . -name \'*.h\'` ; do \\\n' \
+			'\tcd rtemsbsd; for i in `find . -name \'*.h\' | $(CPU_SED)` ; do \\\n' \
+			'\t  install -c -m 644 -D "$$i" "$(INSTALL_BASE)/include/$$i" ; done\n' \
+			'\tfor i in `find contrib freebsd -name \'*.h\' | $(CPU_SED)` ; do \\\n' \
 			'\t  install -c -m 644 -D "$$i" "$(INSTALL_BASE)/include/$$i" ; done\n' \
-			'\tfor i in `find contrib freebsd -name \'*.h\'` ; do \\\n' \
+			'\tcd freebsd/$(RTEMS_CPU)/include ; for i in `find . -name \'*.h\'` ; do \\\n' \
 			'\t  install -c -m 644 -D "$$i" "$(INSTALL_BASE)/include/$$i" ; done\n' \
 			'\n' \
 			'clean:\n' \




More information about the vc mailing list