This is the mail archive of the newlib@sourceware.org mailing list for the newlib project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [patch] link headers if possible


Neal H. Walfield wrote:
This patch removes one scenario where I've had to run make clean to
make the build system recognize some changes that I've made in the
source tree.  Specifically, it tries first to link header files to
targ-include and only falls back to copying them if that fails.

That won't give any benefit to platforms where links don't work. MinGW springs to mind.


How about something more like this?

   HFILES := $(shell cd $(WHEREEVER) && find . ! -type d -name '*.h')
   LOCALHFILES := $(addprefix targ-include/,$(HFILES))

   targ-include/% : $(WHEREEVER)/%
	   $(INSTALL) -D -p $< $@


all: $(LOCALHFILES)


This will probably only work with GNU make and only when find is available, but those are probably requirements already. Make now treats the individual header files as dependencies and updates them as required.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]