summaryrefslogtreecommitdiff
path: root/misc/Makefile.in
diff options
context:
space:
mode:
Diffstat (limited to 'misc/Makefile.in')
-rw-r--r--misc/Makefile.in11
1 files changed, 5 insertions, 6 deletions
diff --git a/misc/Makefile.in b/misc/Makefile.in
index 35ac3bb3a..d7365bb29 100644
--- a/misc/Makefile.in
+++ b/misc/Makefile.in
@@ -1,4 +1,5 @@
srcdir = @srcdir@
+top_srcdir = @top_srcdir@
VPATH = $(srcdir)
include ../Makefile.inc
@@ -8,11 +9,7 @@ LIBMISC = libmisc.a
# -----------------------------------------------------------------------
-ifeq (.depend,$(wildcard .depend))
TARGET=everything
-else
-TARGET=depend everything
-endif
all: $(TARGET)
@@ -28,10 +25,12 @@ clean:
rm -f *.a *.o *~ $(PROGS)
distclean: clean
- rm -f .depend Makefile
+ rm -f Makefile
depend:
- $(CPP) $(CFLAGS) -M $(srcdir)/*.c > .depend
+ topdir_path=`( cd $(top_srcdir) && pwd )` ; \
+ $(CPP) $(CFLAGS) -MM $(srcdir)/*.c | \
+ sed s+$$topdir_path+$(top_srcdir)+g > .depend
ifeq (.depend,$(wildcard .depend))
include .depend