mirror of
				https://github.com/postgres/postgres.git
				synced 2025-11-03 09:13:20 +03:00 
			
		
		
		
	nls-global.mk: search build dir for source files, too
In VPATH builds, the build directory was not being searched for files in GETTEXT_FILES, leading to failure to construct the .pot files. This has bit me all along, but never hard enough to get it fixed; I suppose not a lot of people uses VPATH and NLS-enabled builds, and those that do, don't do "make update-po" often. This is a longstanding problem, so backpatch all the way back.
This commit is contained in:
		@@ -73,7 +73,7 @@ all-po: $(MO_FILES)
 | 
				
			|||||||
ifeq ($(word 1,$(GETTEXT_FILES)),+)
 | 
					ifeq ($(word 1,$(GETTEXT_FILES)),+)
 | 
				
			||||||
po/$(CATALOG_NAME).pot: $(word 2, $(GETTEXT_FILES)) $(MAKEFILE_LIST)
 | 
					po/$(CATALOG_NAME).pot: $(word 2, $(GETTEXT_FILES)) $(MAKEFILE_LIST)
 | 
				
			||||||
ifdef XGETTEXT
 | 
					ifdef XGETTEXT
 | 
				
			||||||
	$(XGETTEXT) -D $(srcdir) -n $(addprefix -k, $(GETTEXT_TRIGGERS)) $(addprefix --flag=, $(GETTEXT_FLAGS)) -f $<
 | 
						$(XGETTEXT) -D $(srcdir) -D . -n $(addprefix -k, $(GETTEXT_TRIGGERS)) $(addprefix --flag=, $(GETTEXT_FLAGS)) -f $<
 | 
				
			||||||
else
 | 
					else
 | 
				
			||||||
	@echo "You don't have 'xgettext'."; exit 1
 | 
						@echo "You don't have 'xgettext'."; exit 1
 | 
				
			||||||
endif
 | 
					endif
 | 
				
			||||||
@@ -82,7 +82,7 @@ po/$(CATALOG_NAME).pot: $(GETTEXT_FILES) $(MAKEFILE_LIST)
 | 
				
			|||||||
# Change to srcdir explicitly, don't rely on $^.  That way we get
 | 
					# Change to srcdir explicitly, don't rely on $^.  That way we get
 | 
				
			||||||
# consistent #: file references in the po files.
 | 
					# consistent #: file references in the po files.
 | 
				
			||||||
ifdef XGETTEXT
 | 
					ifdef XGETTEXT
 | 
				
			||||||
	$(XGETTEXT) -D $(srcdir) -n $(addprefix -k, $(GETTEXT_TRIGGERS)) $(addprefix --flag=, $(GETTEXT_FLAGS)) $(GETTEXT_FILES)
 | 
						$(XGETTEXT) -D $(srcdir) -D . -n $(addprefix -k, $(GETTEXT_TRIGGERS)) $(addprefix --flag=, $(GETTEXT_FLAGS)) $(GETTEXT_FILES)
 | 
				
			||||||
else
 | 
					else
 | 
				
			||||||
	@echo "You don't have 'xgettext'."; exit 1
 | 
						@echo "You don't have 'xgettext'."; exit 1
 | 
				
			||||||
endif
 | 
					endif
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user