From d766703aa906fa845a345db7db9999f9c7f4f41e Mon Sep 17 00:00:00 2001 From: Chris Johns Date: Mon, 12 Oct 2009 04:51:04 +0000 Subject: 2009-09-12 Chris Johns * links.am: Fixed the links so they work with absolute paths. --- bsd_eth_drivers/ChangeLog | 4 ++++ bsd_eth_drivers/links.am | 11 ++++++++++- 2 files changed, 14 insertions(+), 1 deletion(-) (limited to 'bsd_eth_drivers') diff --git a/bsd_eth_drivers/ChangeLog b/bsd_eth_drivers/ChangeLog index 066074f..45cd835 100644 --- a/bsd_eth_drivers/ChangeLog +++ b/bsd_eth_drivers/ChangeLog @@ -1,3 +1,7 @@ +2009-09-12 Chris Johns + + * links.am: Fixed the links so they work with absolute paths. + 2009-08-15 Till Straumann * if_re/Makefile.am: added 'if_rlreg.h' to SOURCES so diff --git a/bsd_eth_drivers/links.am b/bsd_eth_drivers/links.am index a5444f9..6add846 100644 --- a/bsd_eth_drivers/links.am +++ b/bsd_eth_drivers/links.am @@ -4,10 +4,19 @@ $(DUMMYHEADERS): @if [ ! -d `dirname $@` ] ; then mkdir -p `dirname $@`; fi @touch $@ +# if [ "$(echo $@ | sed -e 's/^\/.*/yes/')" = "yes" ]; then + $(LINKS): echo $@ if [ ! -d $(dir $@) ] ; then mkdir -p $(dir $@); fi - ln -s `echo $(dir $@) | sed -e 's%[^/]\+[/]\+%../%g'`$(srcdir)/$(notdir $@) $@ + if [ ! -e $@ ]; then \ + rm -rf $@ ; \ + if [ "`echo $(srcdir) | sed -e 's/^\/.*/yes/'`" = "yes" ]; then \ + ln -s `echo $(dir $@) | sed -e 's%[^/]\+[/]\+%%g'`$(srcdir)/$(notdir $@) $@ ; \ + else \ + ln -s `echo $(dir $@) | sed -e 's%[^/]\+[/]\+%../%g'`$(srcdir)/$(notdir $@) $@ ; \ + fi ; \ + fi BUILT_SOURCES += $(DUMMYHEADERS) $(LINKS) -- cgit v1.2.3