summaryrefslogtreecommitdiffstats
path: root/bsd_eth_drivers
diff options
context:
space:
mode:
authorChris Johns <chrisj@rtems.org>2009-10-12 04:51:04 +0000
committerChris Johns <chrisj@rtems.org>2009-10-12 04:51:04 +0000
commitd766703aa906fa845a345db7db9999f9c7f4f41e (patch)
tree684363baff9d2ed5fb1aeca2af6088d5d1305023 /bsd_eth_drivers
parent383c07ca83eaee4f56c845309d71ceab991c8f9f (diff)
downloadlibbsdport-d766703aa906fa845a345db7db9999f9c7f4f41e.tar.bz2
2009-09-12 Chris Johns <chrisj@rtems.org>
* links.am: Fixed the links so they work with absolute paths.
Diffstat (limited to 'bsd_eth_drivers')
-rw-r--r--bsd_eth_drivers/ChangeLog4
-rw-r--r--bsd_eth_drivers/links.am11
2 files changed, 14 insertions, 1 deletions
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 <chrisj@rtems.org>
+
+ * links.am: Fixed the links so they work with absolute paths.
+
2009-08-15 Till Straumann <Till.Straumann@TU-Berlin.de>
* 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)