summaryrefslogtreecommitdiffstats
path: root/bsd_eth_drivers/links.am
diff options
context:
space:
mode:
Diffstat (limited to 'bsd_eth_drivers/links.am')
-rw-r--r--bsd_eth_drivers/links.am12
1 files changed, 10 insertions, 2 deletions
diff --git a/bsd_eth_drivers/links.am b/bsd_eth_drivers/links.am
index 22c6e8e..1f068a2 100644
--- a/bsd_eth_drivers/links.am
+++ b/bsd_eth_drivers/links.am
@@ -5,8 +5,16 @@ $(DUMMYHEADERS):
@touch $@
$(LINKS):
- @if [ ! -d $(dir $@) ] ; then mkdir -p $(dir $@); fi
- @ln -s `echo $(dir $@) | sed -e 's%[^/]\+[/]\+%../%g'`$(srcdir)/$(notdir $@) $@
+ echo $@
+ if [ ! -d $(dir $@) ] ; then mkdir -p $(dir $@); fi
+ 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)