<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 TRANSITIONAL//EN">
<HTML>
<HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; CHARSET=UTF-8">
<META NAME="GENERATOR" CONTENT="GtkHTML/3.26.0">
</HEAD>
<BODY>
On Fri, 2010-05-14 at 22:25 -0700, Alan Coopersmith wrote:<BR>
<BLOCKQUOTE TYPE=CITE>
<TT><FONT COLOR="#1a1a1a">+xserver.ent: $(top_builddir)/doc/xml/xserver.ent</FONT></TT><BR>
<TT><FONT COLOR="#1a1a1a">+ -rm -f $@</FONT></TT><BR>
<TT><FONT COLOR="#1a1a1a">+ ln -s $(top_builddir)/doc/xml/xserver.ent $@</FONT></TT><BR>
<BR>
</BLOCKQUOTE>
Autoconf suggest using $(LN_S) for better portability.<BR>
<BR>
<BLOCKQUOTE>
— Macro: <B>AC_PROG_LN_S</B>
</BLOCKQUOTE>
<BLOCKQUOTE>
If ‘ln -s’ works on the current file system (the operating system and file system support symbolic links), set the output variable <TT>LN_S</TT> to ‘ln -s’; otherwise, if ‘ln’ works, set <TT>LN_S</TT> to ‘ln’, and otherwise set it to ‘cp -p’. <BR>
<BR>
If you make a link in a directory other than the current directory, its meaning depends on whether ‘ln’ or ‘ln -s’ is used. To safely create links using ‘$(LN_S)’, either find out which form is used and adjust the arguments, or always invoke <TT>ln</TT> in the directory where the link is to be created. <BR>
<BR>
In other words, it does not work to do: <BR>
<BR>
<PRE>
$(LN_S) foo /x/bar
</PRE>
<BR>
Instead, do: <BR>
<BR>
<PRE>
(cd /x && $(LN_S) foo bar)
</PRE>
<BR>
</BLOCKQUOTE>
You may also take a look at AC_CONFIG_LINKS just in case (I thought I had seen it used somewhere):<BR>
<BR>
<BLOCKQUOTE>
<PRE>
<TT>AC_CONFIG_LINKS</TT>
</PRE>
</BLOCKQUOTE>
<DL>
<BLOCKQUOTE>
<PRE>
Automake will generate rules to remove configure generated links on ‘make distclean’ and to distribute named source files as part of ‘make dist’.
</PRE>
</BLOCKQUOTE>
</DL>
<BR>
This has to be tested with distcheck as the directory structure gets reshuffled. Also make sure they are no left overs after a make clean such that git would refuse to rebase due to a dirty directory. <BR>
<BR>
</BODY>
</HTML>