* Re: Maintainer mode and NLS requires srcdir = objdir?
@ 2001-07-16 10:00 Golubev I. N.
0 siblings, 0 replies; 7+ messages in thread
From: Golubev I. N. @ 2001-07-16 10:00 UTC (permalink / raw)
To: Nick Clifton; +Cc: binutils
The patch described
< http://sources.redhat.com/ml/binutils/2001-03/msg00293.html > not only
causes `CY_GNU_GETTEXT' error message as described in
< http://sources.redhat.com/ml/binutils/2001-04/msg00385.html >. With
that patch `po/{SRC,BLD}-POTFILES' are not generated and values in
`po/Makefile' are not filled, at least during the first run of
`configure'. (Many versions of `sed' even do not give errors about
nonexistent files, so you may never notice it). Only `make' in `po'
subdir creates them (and recreates `Makefile' properly).
And all of it went into 2.11.2 release.
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: Maintainer mode and NLS requires srcdir = objdir?
2001-03-22 19:29 ` Nick Clifton
@ 2001-03-22 20:06 ` Hans-Peter Nilsson
0 siblings, 0 replies; 7+ messages in thread
From: Hans-Peter Nilsson @ 2001-03-22 20:06 UTC (permalink / raw)
To: nickc; +Cc: hans-peter.nilsson, binutils
> From: Nick Clifton <nickc@redhat.com>
> Date: 22 Mar 2001 19:29:12 -0800
> Here is an amended patch:
This works. Thanks.
> Index: README-maintainer-mode
> + The Makefiles in the po/ subdirectories depend upon the Makefiles in
> + their parent directories,
Say "in bfd"? Or say "in some of the po/ subdirs"?
brgds, H-P
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: Maintainer mode and NLS requires srcdir = objdir?
2001-03-22 18:13 ` Hans-Peter Nilsson
@ 2001-03-22 19:29 ` Nick Clifton
2001-03-22 20:06 ` Hans-Peter Nilsson
0 siblings, 1 reply; 7+ messages in thread
From: Nick Clifton @ 2001-03-22 19:29 UTC (permalink / raw)
To: Hans-Peter Nilsson; +Cc: binutils
Hi Hans-Peter,
> > I also noticed that "make distclean" does not work in maintainer
> > mode. I could not find a way around this problem, so instead I have
> > inserted a comment into Make-in explaining what is going on.
>
> If it can't be fixed cleanly, perhaps document it in
> README-maintainer-mode.
Good idea.
> > + # of po/POTFILES.in. Hence the presence of this rule.
> > + po/POTFILES.in:
>
> Remove this rule soon, or state a time there for its removal?
State a time I think. 6 months in the future ought to be enough.
> > ! # Note - the following line gets processed by bfd/configure and amened
> > ! # to contain the full list of build dir POTFILES.
>
> Amended?
Doh! Yes.
> ! --files-from=$(srcdir)/SRC-POTFILES.in \
> ! --files-from=$(srcdir)/BLD-POTFILES.in
>
> Problem here. These options do not accumulate. The last
> --files-from is chosen, at least with xgettext 0.10.32 and
> 0.10.35 (the latter shipped with RH 6.2).
Oh poo! I had not thought about that. I am using 0.10.36, but this
also does not accumulate these options.
> Do you see the same problem, or are you using a newer xgettext?
> If there's a newer xgettext where those options accumulate, that
> version could be required at configure --enable-maintainer-mode time.
>
> Anyway it seems there's the trivial solution of cat:ing those
> files.
Yup. Here is an amended patch:
Cheers
Nick
Index: Makefile.am
===================================================================
RCS file: /cvs/src//src/bfd/Makefile.am,v
retrieving revision 1.51
diff -p -r1.51 Makefile.am
*** Makefile.am 2001/03/08 21:03:56 1.51
--- Makefile.am 2001/03/23 03:16:23
*************** SOURCE_CFILES = \
*** 485,494 ****
$(BFD64_BACKENDS_CFILES) \
$(OPTIONAL_BACKENDS_CFILES)
! CFILES = \
! $(SOURCE_CFILES) \
elf32-ia64.c elf64-ia64.c peigen.c pepigen.c
## This is a list of all .h files which are in the source tree.
SOURCE_HFILES = \
aout-target.h aoutf1.h aoutx.h coffcode.h coffswap.h ecoffswap.h \
--- 485,495 ----
$(BFD64_BACKENDS_CFILES) \
$(OPTIONAL_BACKENDS_CFILES)
! BUILD_CFILES = \
elf32-ia64.c elf64-ia64.c peigen.c pepigen.c
+ CFILES = $(SOURCE_CFILES) $(BUILD_CFILES)
+
## This is a list of all .h files which are in the source tree.
SOURCE_HFILES = \
aout-target.h aoutf1.h aoutx.h coffcode.h coffswap.h ecoffswap.h \
*************** SOURCE_HFILES = \
*** 497,512 ****
libaout.h libbfd.h libcoff.h libecoff.h libhppa.h \
libieee.h libnlm.h liboasys.h libpei.h netbsd.h nlm-target.h \
nlmcode.h nlmswap.h ns32k.h peicode.h som.h vms.h xcoff-target.h
- HFILES = \
- elf32-target.h elf64-target.h targmatch.h \
- $(SOURCE_HFILES)
-
- POTFILES = $(CFILES) $(HFILES)
-
- po/POTFILES.in: @MAINT@ Makefile $(POTFILES)
- for file in $(POTFILES); do echo $$file; done | sort > tmp \
- && mv tmp $(srcdir)/po/POTFILES.in
diststuff: info
--- 498,530 ----
libaout.h libbfd.h libcoff.h libecoff.h libhppa.h \
libieee.h libnlm.h liboasys.h libpei.h netbsd.h nlm-target.h \
nlmcode.h nlmswap.h ns32k.h peicode.h som.h vms.h xcoff-target.h
+
+ ## ... and all .h files which are in the build tree.
+ BUILD_HFILES = \
+ elf32-target.h elf64-target.h targmatch.h
+
+ HFILES = $(SOURCE_HFILES) $(BUILD_HFILES)
+
+ SRC_POTFILES = $(SOURCE_CFILES) $(SOURCE_HFILES)
+ BLD_POTFILES = $(BUILD_CFILES) $(BUILD_HFILES)
+
+ po/SRC-POTFILES.in: @MAINT@ Makefile $(SRC_POTFILES)
+ for file in $(SRC_POTFILES); do echo $$file; done | sort > tmp \
+ && mv tmp $(srcdir)/po/SRC-POTFILES.in
+
+ po/BLD-POTFILES.in: @MAINT@ Makefile $(BLD_POTFILES)
+ for file in $(BLD_POTFILES); do echo $$file; done | sort > tmp \
+ && mv tmp $(srcdir)/po/BLD-POTFILES.in
+
+ # The following target is retained for upgrade purposes.
+ # This target used to exist in older versions of this makefile, and was
+ # referenced by <builddir>/po/Makefile (which is created from <srcdir>/po/Make-in)
+ # So old versions of <builddir>/po/Makefile will try to regenerate themselves
+ # when make is next run, but that dependency cannot be completed without a build
+ # of po/POTFILES.in. Hence the presence of this rule. This rule will be deleted
+ # once it is no longer needed - probably in the fall of 2001.
+ po/POTFILES.in:
diststuff: info
*************** stmp-lcoff-h: $(LIBCOFF_H_FILES)
*** 714,724 ****
$(SHELL) $(srcdir)/../move-if-change libcoff.h-new $(srcdir)/libcoff.h
touch stmp-lcoff-h
! MOSTLYCLEANFILES = elf32-target.h elf64-target.h ofiles stamp-ofiles \
! targmatch.h
CLEANFILES = bfd.h dep.sed stmp-bfd-h DEP DEPA DEP1 DEP2 libbfd.a stamp-lib \
stmp-bin2-h stmp-lbfd-h stmp-lcoff-h
# We want to rerun configure if config.bfd or configure.host change.
config.status: $(srcdir)/configure $(srcdir)/config.bfd $(srcdir)/configure.host
--- 732,743 ----
$(SHELL) $(srcdir)/../move-if-change libcoff.h-new $(srcdir)/libcoff.h
touch stmp-lcoff-h
! MOSTLYCLEANFILES = ofiles stamp-ofiles
CLEANFILES = bfd.h dep.sed stmp-bfd-h DEP DEPA DEP1 DEP2 libbfd.a stamp-lib \
stmp-bin2-h stmp-lbfd-h stmp-lcoff-h
+
+ DISTCLEANFILES = $(BUILD_CFILES) $(BUILD_HFILES)
# We want to rerun configure if config.bfd or configure.host change.
config.status: $(srcdir)/configure $(srcdir)/config.bfd $(srcdir)/configure.host
Index: configure.in
===================================================================
RCS file: /cvs/src//src/bfd/configure.in,v
retrieving revision 1.48
diff -p -r1.48 configure.in
*** configure.in 2001/03/20 18:24:28 1.48
--- configure.in 2001/03/23 03:16:24
*************** esac
*** 750,753 ****
rm -f doc/config.status
AC_OUTPUT(Makefile doc/Makefile bfd-in3.h:bfd-in2.h po/Makefile.in:po/Make-in,
! [sed -e '/POTFILES =/r po/POTFILES' po/Makefile.in > po/Makefile])
--- 750,754 ----
rm -f doc/config.status
AC_OUTPUT(Makefile doc/Makefile bfd-in3.h:bfd-in2.h po/Makefile.in:po/Make-in,
! [sed -e '/SRC-POTFILES =/r po/SRC-POTFILES' -e '/BLD-POTFILES =/r po/BLD-POTFILES' po/Makefile.in > po/Makefile])
!
Index: po/Make-in
===================================================================
RCS file: /cvs/src//src/bfd/po/Make-in,v
retrieving revision 1.1.1.1
diff -p -r1.1.1.1 Make-in
*** Make-in 1999/05/03 07:28:58 1.1.1.1
--- Make-in 2001/03/23 03:27:57
*************** COMPILE = $(CC) -c $(DEFS) $(INCLUDES) $
*** 46,55 ****
SOURCES = cat-id-tbl.c
POFILES = @POFILES@
GMOFILES = @GMOFILES@
! DISTFILES = ChangeLog Makefile.in.in POTFILES.in $(PACKAGE).pot \
stamp-cat-id $(POFILES) $(GMOFILES) $(SOURCES)
! POTFILES = \
CATALOGS = @CATALOGS@
CATOBJEXT = @CATOBJEXT@
--- 46,61 ----
SOURCES = cat-id-tbl.c
POFILES = @POFILES@
GMOFILES = @GMOFILES@
! DISTFILES = ChangeLog Makefile.in.in SRC-POTFILES.in BLD-POTFILES.in $(PACKAGE).pot \
stamp-cat-id $(POFILES) $(GMOFILES) $(SOURCES)
! # Note - the following line gets processed by bfd/configure and amended
! # to contain the full list of source dir POTFILES.
! SRC-POTFILES = \
!
! # Note - the following line gets processed by bfd/configure and amended
! # to contain the full list of build dir POTFILES.
! BLD-POTFILES = \
CATALOGS = @CATALOGS@
CATOBJEXT = @CATOBJEXT@
*************** all: all-@USE_NLS@
*** 82,91 ****
all-yes: $(CATALOGS) @MAINT@ $(PACKAGE).pot
all-no:
! $(srcdir)/$(PACKAGE).pot: $(POTFILES)
! $(XGETTEXT) --default-domain=$(PACKAGE) --directory=$(top_srcdir) \
--add-comments --keyword=_ --keyword=N_ \
! --files-from=$(srcdir)/POTFILES.in
rm -f $(srcdir)/$(PACKAGE).pot
mv $(PACKAGE).po $(srcdir)/$(PACKAGE).pot
--- 88,104 ----
all-yes: $(CATALOGS) @MAINT@ $(PACKAGE).pot
all-no:
! $(srcdir)/$(PACKAGE).pot: $(SRC-POTFILES) $(BLD-POTFILES)
! $(XGETTEXT) --default-domain=$(PACKAGE) \
! --directory=$(top_srcdir) \
--add-comments --keyword=_ --keyword=N_ \
! --files-from=$(srcdir)/SRC-POTFILES.in
! $(XGETTEXT) --default-domain=$(PACKAGE) \
! --directory=.. \
! --directory=. \
! --add-comments --keyword=_ --keyword=N_ \
! --join-existing \
! --files-from=$(srcdir)/BLD-POTFILES.in
rm -f $(srcdir)/$(PACKAGE).pot
mv $(PACKAGE).po $(srcdir)/$(PACKAGE).pot
*************** mostlyclean:
*** 191,198 ****
clean: mostlyclean
distclean: clean
! rm -f Makefile Makefile.in POTFILES *.mo *.msg *.cat *.cat.m
!
maintainer-clean: distclean
@echo "This command is intended for maintainers to use;"
@echo "it deletes files that may require special tools to rebuild."
--- 204,212 ----
clean: mostlyclean
distclean: clean
! rm -f Makefile Makefile.in *.mo *.msg *.cat *.cat.m
! rm -f SRC-POTFILES BLD-POTFILES SRC-POTFILES.in BLD-POTFILES.in
!
maintainer-clean: distclean
@echo "This command is intended for maintainers to use;"
@echo "it deletes files that may require special tools to rebuild."
*************** update-po: Makefile
*** 225,247 ****
fi; \
done
! POTFILES: POTFILES.in
( if test 'x$(srcdir)' != 'x.'; then \
posrcprefix='$(top_srcdir)/'; \
else \
posrcprefix="../"; \
fi; \
rm -f $@-t $@ \
! && (sed -e '/^#/d' -e '/^[ ]*$$/d' \
-e "s@.*@ $$posrcprefix& \\\\@" < $(srcdir)/$@.in \
| sed -e '$$s/\\$$//') > $@-t \
&& chmod a-w $@-t \
&& mv $@-t $@ )
! POTFILES.in: @MAINT@ ../Makefile
! cd .. && $(MAKE) po/POTFILES.in
! Makefile: Make-in ../config.status POTFILES
cd .. \
&& CONFIG_FILES=$(subdir)/Makefile.in:$(subdir)/Make-in \
CONFIG_HEADERS= $(SHELL) ./config.status
--- 239,286 ----
fi; \
done
! SRC-POTFILES: SRC-POTFILES.in
( if test 'x$(srcdir)' != 'x.'; then \
posrcprefix='$(top_srcdir)/'; \
else \
posrcprefix="../"; \
fi; \
rm -f $@-t $@ \
! && (sed -e '/^#/d' \
! -e '/^[ ]*$$/d' \
-e "s@.*@ $$posrcprefix& \\\\@" < $(srcdir)/$@.in \
| sed -e '$$s/\\$$//') > $@-t \
&& chmod a-w $@-t \
&& mv $@-t $@ )
+
+ BLD-POTFILES: BLD-POTFILES.in
+ ( rm -f $@-t $@ \
+ && (sed -e '/^#/d' \
+ -e '/^[ ]*$$/d' \
+ -e "s@.*@ ../& \\\\@" < $(srcdir)/$@.in \
+ | sed -e '$$s/\\$$//') > $@-t \
+ && chmod a-w $@-t \
+ && mv $@-t $@ )
+
+ SRC-POTFILES.in: @MAINT@ ../Makefile
+ cd .. && $(MAKE) po/SRC-POTFILES.in
! BLD-POTFILES.in: @MAINT@ ../Makefile
! cd .. && $(MAKE) po/BLD-POTFILES.in
! # Note - The presence of SRC-POTFILES and BLD-POTFILES as dependencies
! # here breaks the implementation of the 'distclean' rule for maintainers.
! # This is because if 'make distclean' is run in the BFD directory, the
! # Makefile there will be deleted before 'distclean' is made here, and so
! # the dependency SRC-POTFILES -> SRC-POTFILES.in -> ../Makefile cannot
! # be satisfied.
! #
! # The SRC-POTFILES and BLD-POTFILES dependencies cannot be removed,
! # however since it is necessary that these files be built during
! # *configure* time, so that configure can insert them into the
! # po/Makefile that it is creating, so that the Makefile will have
! # the correct dependencies.
! Makefile: Make-in ../config.status SRC-POTFILES BLD-POTFILES
cd .. \
&& CONFIG_FILES=$(subdir)/Makefile.in:$(subdir)/Make-in \
CONFIG_HEADERS= $(SHELL) ./config.status
Index: README-maintainer-mode
===================================================================
RCS file: /cvs/src//src/README-maintainer-mode,v
retrieving revision 1.1
diff -p -r1.1 README-maintainer-mode
*** README-maintainer-mode 2000/06/07 21:31:48 1.1
--- README-maintainer-mode 2001/03/23 03:28:56
***************
*** 4,6 ****
--- 4,14 ----
Note that if you configure with --enable-maintainer-mode, you will need
special versions of automake, autoconf, libtool and gettext. You will
find the sources for these in ftp://sourceware.cygnus.com/pub/binutils .
+
+ Note - "make distclean" does not work with maintainer mode enabled.
+ The Makefiles in the po/ subdirectories depend upon the Makefiles in
+ their parent directories, and distclean will delete the Makefiles in
+ the parent directories before running the Makefiles in the child
+ directories. There is no easy way around this (short of changing the
+ automake macros) as these dependencies need to exist in order to
+ correctly build the NLS files.
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: Maintainer mode and NLS requires srcdir = objdir?
2001-03-22 14:09 ` Nick Clifton
@ 2001-03-22 18:13 ` Hans-Peter Nilsson
2001-03-22 19:29 ` Nick Clifton
0 siblings, 1 reply; 7+ messages in thread
From: Hans-Peter Nilsson @ 2001-03-22 18:13 UTC (permalink / raw)
To: nickc; +Cc: binutils
> From: Nick Clifton <nickc@redhat.com>
> Date: 22 Mar 2001 14:09:52 -0800
> Here is a potential patch to fix this.
So I don't have to do this? Thanks!
> I am not checking it in right away as I am would like to see if anyone
> has any opinions or problems with it.
See last comment. Except for that, it works here, and seems to
work cleanly with --enable-maintainer-mode both with
--enable-all-targets and --target=cris.
> I also noticed that "make distclean" does not work in maintainer
> mode. I could not find a way around this problem, so instead I have
> inserted a comment into Make-in explaining what is going on.
If it can't be fixed cleanly, perhaps document it in
README-maintainer-mode.
> Comments anyone ?
> Index: Makefile.am
> + # The following target is retained for upgrade purposes.
> + # This target used to exist in older versions of this makefile, and was
> + # referenced by <builddir>/po/Makefile (which is created from <srcdir>/po/Make-in)
> + # So old versions of <builddir>/po/Makefile will try to regenerate themselves
> + # when make is next run, but that dependency cannot be completed without a build
> + # of po/POTFILES.in. Hence the presence of this rule.
> + po/POTFILES.in:
Remove this rule soon, or state a time there for its removal?
> Index: po/Make-in
> ! # Note - the following line gets processed by bfd/configure and amened
> ! # to contain the full list of source dir POTFILES.
> ! SRC-POTFILES = \
> !
> ! # Note - the following line gets processed by bfd/configure and amened
> ! # to contain the full list of build dir POTFILES.
Amended?
! --files-from=$(srcdir)/SRC-POTFILES.in \
! --files-from=$(srcdir)/BLD-POTFILES.in
Problem here. These options do not accumulate. The last
--files-from is chosen, at least with xgettext 0.10.32 and
0.10.35 (the latter shipped with RH 6.2).
Do you see the same problem, or are you using a newer xgettext?
If there's a newer xgettext where those options accumulate, that
version could be required at configure --enable-maintainer-mode time.
Anyway it seems there's the trivial solution of cat:ing those
files.
brgds, H-P
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: Maintainer mode and NLS requires srcdir = objdir?
2001-03-22 2:51 Hans-Peter Nilsson
2001-03-22 9:10 ` H . J . Lu
@ 2001-03-22 14:09 ` Nick Clifton
2001-03-22 18:13 ` Hans-Peter Nilsson
1 sibling, 1 reply; 7+ messages in thread
From: Nick Clifton @ 2001-03-22 14:09 UTC (permalink / raw)
To: Hans-Peter Nilsson; +Cc: binutils
Hi Hans-Peter,
> Unless I'm missing something, like a new set of maintainer
> tools, the rules in bfd/po/Makefile for generating
> po/POTFILES.in from elf32-ia64.c elf64-ia64.c peigen.c pepigen.c
> elf32-target.h elf64-target.h and targmatch.h require that these
> files are in srcdir, while they're generated in objdir.
> The question is, *should* maintainer builds be performed in
> srcdir?
I believe that the answer is no.
> If not, is this a bug that should be fixed?
Yes.
Here is a potential patch to fix this.
I am not checking it in right away as I am would like to see if anyone
has any opinions or problems with it.
The patch splits up POTFILES.in into two files SRC-POTFILES.in and
BLD-POTFILES.in. The patch also has the side effect of changing "make
clean" and "make mostlyclean" so that they now not delete the auto
generated .c and .h files.
I also noticed that "make distclean" does not work in maintainer
mode. I could not find a way around this problem, so instead I have
inserted a comment into Make-in explaining what is going on.
Comments anyone ?
Cheers
Nick
2001-03-22 Nick Clifton <nickc@redhat.com>
* Makefile.am (BUILD_CFILES): New variable: List of C source
files created in build directory.
(BUILD_HFILES): New variable: List of header files created in
build directory.
(POTFILES): Delete.
(po/POTFILES.in): Replace rule with empty entry.
(po/SRC-POTFILES.in): New rule: Create a list of source files
in the source directory.
(po/BLD-POTFILES.in): New rule: Create a list of source files
in the build directory.
(MOSTLYCLEAN): Do not delete source files created in build
directory.
* Makefile.in: Regenerate.
* configure.in: Insert SRC-POTFILES.in and BLD-POTFILES.in
into po/Makefile.
* configure: Regenerate.
* po/Make-in: Replace occurrences of POTFILES with SRC-POTFILES
and BLD_POTFILES.
Add .. to the search path when building bfd.pot.
Delete POTFILES when performing distclean.
Add comment describing why distclean is broken in maintainer mode.
* po/POTFILES.in: Delete.
* po/SRC-POTFILES.in: New file.
* po/BLD-POTFILES.in: New file.
* po/bfd.pot: Regenerate.
Index: Makefile.am
===================================================================
RCS file: /cvs/src//src/bfd/Makefile.am,v
retrieving revision 1.51
diff -p -w -r1.51 Makefile.am
*** Makefile.am 2001/03/08 21:03:56 1.51
--- Makefile.am 2001/03/22 21:50:35
*************** SOURCE_CFILES = \
*** 485,494 ****
$(BFD64_BACKENDS_CFILES) \
$(OPTIONAL_BACKENDS_CFILES)
! CFILES = \
! $(SOURCE_CFILES) \
elf32-ia64.c elf64-ia64.c peigen.c pepigen.c
## This is a list of all .h files which are in the source tree.
SOURCE_HFILES = \
aout-target.h aoutf1.h aoutx.h coffcode.h coffswap.h ecoffswap.h \
--- 485,495 ----
$(BFD64_BACKENDS_CFILES) \
$(OPTIONAL_BACKENDS_CFILES)
! BUILD_CFILES = \
elf32-ia64.c elf64-ia64.c peigen.c pepigen.c
+ CFILES = $(SOURCE_CFILES) $(BUILD_CFILES)
+
## This is a list of all .h files which are in the source tree.
SOURCE_HFILES = \
aout-target.h aoutf1.h aoutx.h coffcode.h coffswap.h ecoffswap.h \
*************** SOURCE_HFILES = \
*** 497,512 ****
libaout.h libbfd.h libcoff.h libecoff.h libhppa.h \
libieee.h libnlm.h liboasys.h libpei.h netbsd.h nlm-target.h \
nlmcode.h nlmswap.h ns32k.h peicode.h som.h vms.h xcoff-target.h
- HFILES = \
- elf32-target.h elf64-target.h targmatch.h \
- $(SOURCE_HFILES)
-
- POTFILES = $(CFILES) $(HFILES)
-
- po/POTFILES.in: @MAINT@ Makefile $(POTFILES)
- for file in $(POTFILES); do echo $$file; done | sort > tmp \
- && mv tmp $(srcdir)/po/POTFILES.in
diststuff: info
--- 498,529 ----
libaout.h libbfd.h libcoff.h libecoff.h libhppa.h \
libieee.h libnlm.h liboasys.h libpei.h netbsd.h nlm-target.h \
nlmcode.h nlmswap.h ns32k.h peicode.h som.h vms.h xcoff-target.h
+
+ ## ... and all .h files which are in the build tree.
+ BUILD_HFILES = \
+ elf32-target.h elf64-target.h targmatch.h
+
+ HFILES = $(SOURCE_HFILES) $(BUILD_HFILES)
+
+ SRC_POTFILES = $(SOURCE_CFILES) $(SOURCE_HFILES)
+ BLD_POTFILES = $(BUILD_CFILES) $(BUILD_HFILES)
+
+ po/SRC-POTFILES.in: @MAINT@ Makefile $(SRC_POTFILES)
+ for file in $(SRC_POTFILES); do echo $$file; done | sort > tmp \
+ && mv tmp $(srcdir)/po/SRC-POTFILES.in
+
+ po/BLD-POTFILES.in: @MAINT@ Makefile $(BLD_POTFILES)
+ for file in $(BLD_POTFILES); do echo $$file; done | sort > tmp \
+ && mv tmp $(srcdir)/po/BLD-POTFILES.in
+
+ # The following target is retained for upgrade purposes.
+ # This target used to exist in older versions of this makefile, and was
+ # referenced by <builddir>/po/Makefile (which is created from <srcdir>/po/Make-in)
+ # So old versions of <builddir>/po/Makefile will try to regenerate themselves
+ # when make is next run, but that dependency cannot be completed without a build
+ # of po/POTFILES.in. Hence the presence of this rule.
+ po/POTFILES.in:
diststuff: info
*************** stmp-lcoff-h: $(LIBCOFF_H_FILES)
*** 714,724 ****
$(SHELL) $(srcdir)/../move-if-change libcoff.h-new $(srcdir)/libcoff.h
touch stmp-lcoff-h
! MOSTLYCLEANFILES = elf32-target.h elf64-target.h ofiles stamp-ofiles \
! targmatch.h
CLEANFILES = bfd.h dep.sed stmp-bfd-h DEP DEPA DEP1 DEP2 libbfd.a stamp-lib \
stmp-bin2-h stmp-lbfd-h stmp-lcoff-h
# We want to rerun configure if config.bfd or configure.host change.
config.status: $(srcdir)/configure $(srcdir)/config.bfd $(srcdir)/configure.host
--- 731,742 ----
$(SHELL) $(srcdir)/../move-if-change libcoff.h-new $(srcdir)/libcoff.h
touch stmp-lcoff-h
! MOSTLYCLEANFILES = ofiles stamp-ofiles
CLEANFILES = bfd.h dep.sed stmp-bfd-h DEP DEPA DEP1 DEP2 libbfd.a stamp-lib \
stmp-bin2-h stmp-lbfd-h stmp-lcoff-h
+
+ DISTCLEANFILES = $(BUILD_CFILES) $(BUILD_HFILES)
# We want to rerun configure if config.bfd or configure.host change.
config.status: $(srcdir)/configure $(srcdir)/config.bfd $(srcdir)/configure.host
Index: configure.in
===================================================================
RCS file: /cvs/src//src/bfd/configure.in,v
retrieving revision 1.48
diff -p -w -r1.48 configure.in
*** configure.in 2001/03/20 18:24:28 1.48
--- configure.in 2001/03/22 21:50:35
*************** esac
*** 750,753 ****
rm -f doc/config.status
AC_OUTPUT(Makefile doc/Makefile bfd-in3.h:bfd-in2.h po/Makefile.in:po/Make-in,
! [sed -e '/POTFILES =/r po/POTFILES' po/Makefile.in > po/Makefile])
--- 750,754 ----
rm -f doc/config.status
AC_OUTPUT(Makefile doc/Makefile bfd-in3.h:bfd-in2.h po/Makefile.in:po/Make-in,
! [sed -e '/SRC-POTFILES =/r po/SRC-POTFILES' -e '/BLD-POTFILES =/r po/BLD-POTFILES' po/Makefile.in > po/Makefile])
!
Index: po/Make-in
===================================================================
RCS file: /cvs/src//src/bfd/po/Make-in,v
retrieving revision 1.1.1.1
diff -p -w -r1.1.1.1 Make-in
*** Make-in 1999/05/03 07:28:58 1.1.1.1
--- Make-in 2001/03/22 21:50:35
*************** COMPILE = $(CC) -c $(DEFS) $(INCLUDES) $
*** 46,55 ****
SOURCES = cat-id-tbl.c
POFILES = @POFILES@
GMOFILES = @GMOFILES@
! DISTFILES = ChangeLog Makefile.in.in POTFILES.in $(PACKAGE).pot \
stamp-cat-id $(POFILES) $(GMOFILES) $(SOURCES)
! POTFILES = \
CATALOGS = @CATALOGS@
CATOBJEXT = @CATOBJEXT@
--- 46,61 ----
SOURCES = cat-id-tbl.c
POFILES = @POFILES@
GMOFILES = @GMOFILES@
! DISTFILES = ChangeLog Makefile.in.in SRC-POTFILES.in BLD-POTFILES.in $(PACKAGE).pot \
stamp-cat-id $(POFILES) $(GMOFILES) $(SOURCES)
! # Note - the following line gets processed by bfd/configure and amened
! # to contain the full list of source dir POTFILES.
! SRC-POTFILES = \
!
! # Note - the following line gets processed by bfd/configure and amened
! # to contain the full list of build dir POTFILES.
! BLD-POTFILES = \
CATALOGS = @CATALOGS@
CATOBJEXT = @CATOBJEXT@
*************** all: all-@USE_NLS@
*** 82,91 ****
all-yes: $(CATALOGS) @MAINT@ $(PACKAGE).pot
all-no:
! $(srcdir)/$(PACKAGE).pot: $(POTFILES)
! $(XGETTEXT) --default-domain=$(PACKAGE) --directory=$(top_srcdir) \
--add-comments --keyword=_ --keyword=N_ \
! --files-from=$(srcdir)/POTFILES.in
rm -f $(srcdir)/$(PACKAGE).pot
mv $(PACKAGE).po $(srcdir)/$(PACKAGE).pot
--- 88,100 ----
all-yes: $(CATALOGS) @MAINT@ $(PACKAGE).pot
all-no:
! $(srcdir)/$(PACKAGE).pot: $(SRC-POTFILES) $(BLD-POTFILES)
! $(XGETTEXT) --default-domain=$(PACKAGE) \
! --directory=$(top_srcdir) \
! --directory=.. \
--add-comments --keyword=_ --keyword=N_ \
! --files-from=$(srcdir)/SRC-POTFILES.in \
! --files-from=$(srcdir)/BLD-POTFILES.in
rm -f $(srcdir)/$(PACKAGE).pot
mv $(PACKAGE).po $(srcdir)/$(PACKAGE).pot
*************** mostlyclean:
*** 191,197 ****
clean: mostlyclean
distclean: clean
! rm -f Makefile Makefile.in POTFILES *.mo *.msg *.cat *.cat.m
maintainer-clean: distclean
@echo "This command is intended for maintainers to use;"
--- 200,207 ----
clean: mostlyclean
distclean: clean
! rm -f Makefile Makefile.in *.mo *.msg *.cat *.cat.m
! rm -f SRC-POTFILES BLD-POTFILES SRC-POTFILES.in BLD-POTFILES.in
maintainer-clean: distclean
@echo "This command is intended for maintainers to use;"
*************** update-po: Makefile
*** 225,247 ****
fi; \
done
! POTFILES: POTFILES.in
( if test 'x$(srcdir)' != 'x.'; then \
posrcprefix='$(top_srcdir)/'; \
else \
posrcprefix="../"; \
fi; \
rm -f $@-t $@ \
! && (sed -e '/^#/d' -e '/^[ ]*$$/d' \
-e "s@.*@ $$posrcprefix& \\\\@" < $(srcdir)/$@.in \
| sed -e '$$s/\\$$//') > $@-t \
&& chmod a-w $@-t \
&& mv $@-t $@ )
! POTFILES.in: @MAINT@ ../Makefile
! cd .. && $(MAKE) po/POTFILES.in
! Makefile: Make-in ../config.status POTFILES
cd .. \
&& CONFIG_FILES=$(subdir)/Makefile.in:$(subdir)/Make-in \
CONFIG_HEADERS= $(SHELL) ./config.status
--- 235,282 ----
fi; \
done
! SRC-POTFILES: SRC-POTFILES.in
( if test 'x$(srcdir)' != 'x.'; then \
posrcprefix='$(top_srcdir)/'; \
else \
posrcprefix="../"; \
fi; \
rm -f $@-t $@ \
! && (sed -e '/^#/d' \
! -e '/^[ ]*$$/d' \
-e "s@.*@ $$posrcprefix& \\\\@" < $(srcdir)/$@.in \
| sed -e '$$s/\\$$//') > $@-t \
&& chmod a-w $@-t \
&& mv $@-t $@ )
! BLD-POTFILES: BLD-POTFILES.in
! ( rm -f $@-t $@ \
! && (sed -e '/^#/d' \
! -e '/^[ ]*$$/d' \
! -e "s@.*@ ../& \\\\@" < $(srcdir)/$@.in \
! | sed -e '$$s/\\$$//') > $@-t \
! && chmod a-w $@-t \
! && mv $@-t $@ )
!
! SRC-POTFILES.in: @MAINT@ ../Makefile
! cd .. && $(MAKE) po/SRC-POTFILES.in
!
! BLD-POTFILES.in: @MAINT@ ../Makefile
! cd .. && $(MAKE) po/BLD-POTFILES.in
! # Note - The presence of SRC-POTFILES and BLD-POTFILES as dependencies
! # here breaks the implementation of the 'distclean' rule for maintainers.
! # This is because if 'make distclean' is run in the BFD directory, the
! # Makefile there will be deleted before 'distclean' is made here, and so
! # the dependency SRC-POTFILES -> SRC-POTFILES.in -> ../Makefile cannot
! # be satisfied.
! #
! # The SRC-POTFILES and BLD-POTFILES dependencies cannot be removed,
! # however since it is necessary that these files be built during
! # *configure* time, so that configure can insert them into the
! # po/Makefile that it is creating, so that the Makefile will have
! # the correct dependencies.
! Makefile: Make-in ../config.status SRC-POTFILES BLD-POTFILES
cd .. \
&& CONFIG_FILES=$(subdir)/Makefile.in:$(subdir)/Make-in \
CONFIG_HEADERS= $(SHELL) ./config.status
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: Maintainer mode and NLS requires srcdir = objdir?
2001-03-22 2:51 Hans-Peter Nilsson
@ 2001-03-22 9:10 ` H . J . Lu
2001-03-22 14:09 ` Nick Clifton
1 sibling, 0 replies; 7+ messages in thread
From: H . J . Lu @ 2001-03-22 9:10 UTC (permalink / raw)
To: Hans-Peter Nilsson; +Cc: binutils
On Thu, Mar 22, 2001 at 11:51:24AM +0100, Hans-Peter Nilsson wrote:
> Unless I'm missing something, like a new set of maintainer
> tools, the rules in bfd/po/Makefile for generating
> po/POTFILES.in from elf32-ia64.c elf64-ia64.c peigen.c pepigen.c
> elf32-target.h elf64-target.h and targmatch.h require that these
> files are in srcdir, while they're generated in objdir.
>
> To avoid building in srcdir, I temporarily use
> --enable-maintainer-mode --disable-nls.
>
> The question is, *should* maintainer builds be performed in
> srcdir? If not, is this a bug that should be fixed?
>
I think it is a bug. I have been fixing those which affect me.
H.J.
^ permalink raw reply [flat|nested] 7+ messages in thread
* Maintainer mode and NLS requires srcdir = objdir?
@ 2001-03-22 2:51 Hans-Peter Nilsson
2001-03-22 9:10 ` H . J . Lu
2001-03-22 14:09 ` Nick Clifton
0 siblings, 2 replies; 7+ messages in thread
From: Hans-Peter Nilsson @ 2001-03-22 2:51 UTC (permalink / raw)
To: binutils
Unless I'm missing something, like a new set of maintainer
tools, the rules in bfd/po/Makefile for generating
po/POTFILES.in from elf32-ia64.c elf64-ia64.c peigen.c pepigen.c
elf32-target.h elf64-target.h and targmatch.h require that these
files are in srcdir, while they're generated in objdir.
To avoid building in srcdir, I temporarily use
--enable-maintainer-mode --disable-nls.
The question is, *should* maintainer builds be performed in
srcdir? If not, is this a bug that should be fixed?
If srcdir is supposed to be objdir for such builds, then
I think README-maintainer-mode needs updating.
brgds, H-P
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2001-07-16 10:00 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-07-16 10:00 Maintainer mode and NLS requires srcdir = objdir? Golubev I. N.
-- strict thread matches above, loose matches on Subject: below --
2001-03-22 2:51 Hans-Peter Nilsson
2001-03-22 9:10 ` H . J . Lu
2001-03-22 14:09 ` Nick Clifton
2001-03-22 18:13 ` Hans-Peter Nilsson
2001-03-22 19:29 ` Nick Clifton
2001-03-22 20:06 ` Hans-Peter Nilsson
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).