[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Makefile rule for symbolic links in src/DLD-FUNCTIONS
From: |
Rik |
Subject: |
Makefile rule for symbolic links in src/DLD-FUNCTIONS |
Date: |
Tue, 25 Jan 2011 11:23:31 -0800 |
1/25/11
Often, when I run make in the src/ directory I get a lot of useless
re-creation of symbolic links. For example:
make DLD-FUNCTIONS/balance.oct
making defaults.h from defaults.h.in
making oct-conf.h from oct-conf.h.in
defaults.h is unchanged
oct-conf.h is unchanged
rm -f DLD-FUNCTIONS/balance.oct
la=`echo DLD-FUNCTIONS/balance.la | /bin/sed 's,DLD-FUNCTIONS/,,'` && \
of=`echo DLD-FUNCTIONS/balance.oct | /bin/sed
's,DLD-FUNCTIONS/,,'` && \
cd DLD-FUNCTIONS && \
ln -s .libs/`/bin/sed -n -e "s/dlname='\([^']*\)'/\1/p" < $la` $of
The issue seems to be that the target of the rule is a symbolic link and
make looks at the timestamp of the file *pointed* to by the symbolic link
rather than the link itself. The rule is this one:
DLD-FUNCTIONS/balance.oct: DLD-FUNCTIONS/balance.la
... commands ...
I can stop the endless rule firings by passing the GNU Make-specific
argument '--check-symlink-times' which instructs Make to look at the
symbolic link for modification times. Is there any problem with adding
MAKEFLAGS += --check-symlink-times
to Makefile.am for the src/ directory? The fix above works for me and we
already require GNU Make for building. This would add the additional
requirement that the Make version be greater than 3.81, but that version
was released in April 2006 so I don't see that as a problem.
--Rik
- Makefile rule for symbolic links in src/DLD-FUNCTIONS,
Rik <=