From: Rocco Rutte Date: Wed, 7 Nov 2007 13:54:48 +0000 (+0100) Subject: Don't build keymap_alldefs.h in srcdir as it may be read-only X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=94377b4c7c5bb5492f42794d18f4d246cfba2708;p=neomutt Don't build keymap_alldefs.h in srcdir as it may be read-only --- diff --git a/Makefile.am b/Makefile.am index 670e3e7dd..5f2cb830a 100644 --- a/Makefile.am +++ b/Makefile.am @@ -114,12 +114,11 @@ smime_keys: $(srcdir)/smime_keys.pl keymap_defs.h: $(OPS) $(srcdir)/gen_defs $(srcdir)/gen_defs $(OPS) > keymap_defs.h -$(srcdir)/keymap_alldefs.h: $(srcdir)/OPS $(srcdir)/OPS.PGP $(srcdir)/OPS.MIX $(srcdir)/OPS.CRYPT $(srcdir)/OPS.SMIME $(srcdir)/gen_defs - chmod u+w $(srcdir) +keymap_alldefs.h: $(srcdir)/OPS $(srcdir)/OPS.PGP $(srcdir)/OPS.MIX $(srcdir)/OPS.CRYPT $(srcdir)/OPS.SMIME $(srcdir)/gen_defs rm -f $@ $(srcdir)/gen_defs $(srcdir)/OPS $(srcdir)/OPS.PGP \ $(srcdir)/OPS.MIX $(srcdir)/OPS.CRYPT $(srcdir)/OPS.SMIME \ - > $(srcdir)/keymap_alldefs.h + > keymap_alldefs.h reldate.h: $(srcdir)/ChangeLog echo 'const char *ReleaseDate = "'`head -n 1 $(srcdir)/ChangeLog | LC_ALL=C cut -d ' ' -f 1`'";' > reldate.h.tmp; \ diff --git a/po/Makefile.in.in b/po/Makefile.in.in index 196ce271d..0cf0fe74b 100644 --- a/po/Makefile.in.in +++ b/po/Makefile.in.in @@ -51,6 +51,10 @@ GMOFILES = @GMOFILES@ DISTFILES = Makefile.in.in POTFILES.in $(PACKAGE).pot \ $(POFILES) $(GMOFILES) +# need two spaces before = as m4/gettext.m4 matches against +# 'POTFILES[space]=' to add files from POTFILES +BUILT_POTFILES = $(top_builddir)/keymap_alldefs.h + POTFILES = \ CATALOGS = @CATALOGS@ @@ -78,19 +82,22 @@ all: all-@USE_NLS@ all-yes: $(CATALOGS) all-no: -.PHONY: $(top_srcdir)/keymap_alldefs.h -$(top_srcdir)/keymap_alldefs.h: - cd .. && $(MAKE) keymap_alldefs.h +$(top_builddir)/keymap_alldefs.h: + ( cd $(top_builddir) && $(MAKE) keymap_alldefs.h ) # Note: Target 'all' must not depend on target '$(srcdir)/$(PACKAGE).pot', # otherwise packages like GCC can not be built if only parts of the source # have been downloaded. -$(PACKAGE).pot: $(POTFILES) $(srcdir)/POTFILES.in - rm -f $@ +$(PACKAGE).pot: $(POTFILES) $(BUILT_POTFILES) $(srcdir)/POTFILES.in + rm -f $(PACKAGE).pot $(PACKAGE).po $(XGETTEXT) --default-domain=$(PACKAGE) --directory=$(top_srcdir) \ --add-comments --keyword=_ --keyword=N_ \ --files-from=$(srcdir)/POTFILES.in \ + && \ + $(XGETTEXT) --default-domain=$(PACKAGE) \ + --add-comments --keyword=_ --keyword=N_ \ + --join $(BUILT_POTFILES) \ && test ! -f $(PACKAGE).po \ || ( rm -f $(PACKAGE).pot \ && mv $(PACKAGE).po $(PACKAGE).pot ) diff --git a/po/POTFILES.in b/po/POTFILES.in index b1d7d3688..2d01add62 100644 --- a/po/POTFILES.in +++ b/po/POTFILES.in @@ -34,7 +34,6 @@ imap/message.c imap/util.c init.c keymap.c -keymap_alldefs.h lib.c main.c mbox.c