]> sourceware.org Git - lvm2.git/commitdiff
make: Fix pofile and .d file generation.
authorAlasdair G Kergon <agk@redhat.com>
Tue, 1 Jul 2014 23:48:50 +0000 (00:48 +0100)
committerAlasdair G Kergon <agk@redhat.com>
Tue, 1 Jul 2014 23:48:50 +0000 (00:48 +0100)
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.

WHATS_NEW
make.tmpl.in
po/Makefile.in

index 4fa881c293d9d619bedab9a6f3fde244b2f10e6c..2259976310600c6624a2047fad15b2a1bcfb35df 100644 (file)
--- a/WHATS_NEW
+++ b/WHATS_NEW
@@ -1,5 +1,7 @@
 Version 2.02.108 -
 =================================
+  Change makefile %.d generation to handle filename changes without make clean.
+  Fix use of buildir in make pofile.
   Enhance private volumes UUIDs with suffixed for easier detection.
   Do not use reserved _[tc]meta volumes for temporary LVs.
   Leave backup pool metadata with _meta%d suffix instead of reserved _tmeta%d.
index 5a3694a4f4643e5fbb1be892a1f81847987c82e0..5d4c14450ceae473f51028d94ae32adbfe86802d 100644 (file)
@@ -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
index a4f57a68f915f0b035a3c95b96ffe9e3091694b7..ff5db17fd9ebe6b2cf9e22d45dd651e643c52732 100644 (file)
@@ -19,10 +19,10 @@ LANGS=de
 
 TARGETS=$(LANGS:%=lvm2_%.mo) $(LANGS:%=dm_%.mo)
 
-DM_POSOURCES = $(top_srcdir)/dmsetup/*.pot $(top_srcdir)/libdm/*.pot \
-              $(top_srcdir)/libdm/*/*.pot
+DM_POSOURCES = $(top_builddir)/tools/dmsetup.pot $(top_builddir)/libdm/*.pot \
+              $(top_builddir)/libdm/*/*.pot
 
-LVM_POSOURCES = $(top_srcdir)/tools/*.pot $(top_srcdir)/lib/*/*.pot
+LVM_POSOURCES = $(top_builddir)/tools/*.pot $(top_builddir)/lib/*/*.pot
 
 include $(top_builddir)/make.tmpl
 
This page took 0.050094 seconds and 5 git commands to generate.