How to copy additional header directories in Newlib-4.1.0?

Question about which tools to use, bugs, the best way to implement a function, etc should go here. Don't forget to see if your question is answered in the wiki first! When in doubt post here.
Post Reply
superymk
Posts: 3
Joined: Tue Apr 19, 2022 2:03 pm

How to copy additional header directories in Newlib-4.1.0?

Post by superymk »

Hi,

I am modifying one Makefile.am to export my headers' folder "sap_additional_headers". The issue is that subdirs of this folder is only copied to "dist", but not to "targ_include". Compiling newlib then fails due to missing headers in the subdirs of "targ_include".
Why is that and how to solve it properly? I think stmp-targ-include in newlib/Makefile.am is better to be not modified. So there should be a way to easily use the headers in "dist".

Related code in Makefile.am:

Code: Select all

install-data-local:
	$(mkinstalldirs) $(DESTDIR)$(tooldir)/include/sap_additional_headers; \
	for i in $(srcdir)/../include/sap_additional_headers/*.h; do \
	  $(INSTALL_DATA) $$i $(DESTDIR)$(tooldir)/include/sap_additional_headers/`basename $$i`; \
	done; \
	$(mkinstalldirs) $(DESTDIR)$(tooldir)/include/sap_additional_headers/stl; \
	for i in $(srcdir)/../include/sap_additional_headers/stl/*.h; do \
	  $(INSTALL_DATA) $$i $(DESTDIR)$(tooldir)/include/sap_additional_headers/stl/`basename $$i`; \
	done;
Post Reply