diff options
author | Alasdair G Kergon <agk@redhat.com> | 2014-07-02 00:48:50 +0100 |
---|---|---|
committer | Alasdair G Kergon <agk@redhat.com> | 2014-07-02 00:48:50 +0100 |
commit | c77197c688fad937b0701d749b9a449160bb40dc (patch) | |
tree | 71ac3b0a89a061639db9678f6dfd8e8040315a14 /make.tmpl.in | |
parent | 70551eec5921e3b8bce7318880e54836f467b5fa (diff) | |
download | lvm2-c77197c688fad937b0701d749b9a449160bb40dc.tar.gz |
make: Fix pofile and .d file generation.
Use builddir not srcdir with make pofile.
Append 'incfile:' lines to %.d files to handle newly-missing dependencies
without 'make clean' after a file is moved or deleted.
Diffstat (limited to 'make.tmpl.in')
-rw-r--r-- | make.tmpl.in | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/make.tmpl.in b/make.tmpl.in index 5a3694a4f..5d4c14450 100644 --- a/make.tmpl.in +++ b/make.tmpl.in @@ -362,7 +362,7 @@ $(TARGETS): $(OBJECTS) $(CC) -c $(INCLUDES) $(DEFS) $(WFLAGS) $(CFLAGS) $(CFLAGS_$@) $< -o $@ %.pot: %.c Makefile - $(CC) -E $(INCLUDES) -include $(top_srcdir)/include/pogen.h \ + $(CC) -E $(INCLUDES) -include $(top_builddir)/include/pogen.h \ $(DEFS) $(WFLAGS) $(CFLAGS) $< > $@ %.so: %.o @@ -413,6 +413,8 @@ $(LIB_STATIC): $(OBJECTS) DEPS=`echo $(DEPS) | sed -e 's/\\//\\\\\\//g'`; \ $(CC) -MM $(INCLUDES) $(DEFS) -o $@ $<; \ sed -i "s/\(.*\)\.o[ :]*/$$FILE.o $$FILE.d $$FILE.pot: $$DEPS /g" $@; \ + DEPLIST=`sed 's/ \\\\//;s/.*://;' < $@`; \ + echo $$DEPLIST | fmt -1 | sed 's/ //g;s/\(.*\)/\1:/' >> $@; \ [ -s $@ ] || $(RM) $@ %.mo: %.po |