This is the mail archive of the
newlib@sources.redhat.com
mailing list for the newlib project.
Re: OS specific machine/*.h include files
Joel Sherrill wrote:
>
> "J. Johnston" wrote:
> >
>
> > Look for sys/$(sys_dir)/machine/$(machine_dir)... Those loops that copy
> > headers must appear after any of your added sys/$(sys_dir)/machine/*.h loops.
> > There are multiple stanzas because one target puts the header files in a build header
> > file area. The second installs the header files. Not all build header files are
> > installed. The restriction I mention applies in both places. From
> > what I could see, you added one of your loops at the end of all other loops.
>
> I will repost the entire patch for review but is this what you want?
> It adds the libc/sys/$(sys_dir)/machine before the
> machine/$(machine_dir)
> which I think matches (what I think is) the intended order of:
>
> + include/...
> + sys/$(sys_dir)/...
> + machine/$(machine_dir)/...
>
It is fine, but the order I am looking for is that for sys header files,
generic ones get copied first (sys/xxx/*.h sys/xxx/include/*.h and now
sys/xxx/machine/*.h followed and possibly overwritten by
sys/xxx/machine/yyy/*.h). The patch below abides by that.
-- Jeff J.
> Index: Makefile.am
> ===================================================================
> RCS file: /cvs/src/src/newlib/Makefile.am,v
> retrieving revision 1.26
> diff -u -r1.26 Makefile.am
> --- Makefile.am 29 Aug 2002 00:22:10 -0000 1.26
> +++ Makefile.am 8 Oct 2002 17:06:09 -0000
> @@ -205,6 +205,11 @@
> cp $$i targ-include/sys/`basename $$i`; \
> else true; fi ; \
> done
> + -for i in $(srcdir)/libc/sys/$(sys_dir)/machine/*.h; do \
> + if [ -f $$i ]; then \
> + cp $$i targ-include/machine/`basename $$i`; \
> + else true; fi ; \
> + done
> -for i in
> $(srcdir)/libc/sys/$(sys_dir)/machine/$(machine_dir)/*.h; do \
> if [ -f $$i ]; then \
> cp $$i targ-include/machine/`basename $$i`; \
> @@ -248,6 +253,11 @@
> for i in $(srcdir)/libc/sys/$(sys_dir)/sys/*.h; do \
> if [ -f $$i ]; then \
> $(INSTALL_DATA) $$i
> $(DESTDIR)$(tooldir)/include/sys/`basename $$i`; \
> + else true; fi ; \
> + done ; \
> + for i in $(srcdir)/libc/sys/$(sys_dir)/machine/*.h; do \
> + if [ -f $$i ]; then \
> + $(INSTALL_DATA) $$i
> $(DESTDIR)$(tooldir)/include/machine/`basename $$i`; \
> else true; fi ; \
> done ; \
> for i in $(srcdir)/libc/sys/$(sys_dir)/include/*.h; do \