SHELL = /bin/sh
MAKEINFO=makeinfo
+TEXI2ROFF=texi2roff
# Distribution version
VERSION=1.91
#\f
## The rules
-all: $(ADDL_LIBS) $(PROGS) binutils.info
+all: $(ADDL_LIBS) $(PROGS)
+
+all-info: binutils.info
#$(BFD):$(LIBDIR)/../common/*.c
# (cd $(LIBDIR); make)
$(MAKEINFO) -o binutils.info $(srcdir)/binutils.texi
# different targets for -ms, -mm, -me
-# (we don't use a variable because we don't trust all makes to handle
-# a var in the target name right).
+# Try to use a recent texi2roff. v2 was put on prep in jan91.
+# If you want an index, see texi2roff doc for postprocessing
+# and add -i to texi2roff invocations below.
+# Workarounds for texi2roff-2 (probably fixed in later texi2roff's, delete
+# correspondint -e lines when later texi2roff's are current)
+# + @ifinfo's deleted explicitly due to texi2roff-2 bug w nested constructs.
+# + @c's deleted explicitly because texi2roff sees texinfo commands in them
+# + @ (that's at-BLANK) not recognized by texi2roff, turned into blank
+# + @alphaenumerate is ridiculously new, turned into @enumerate
+
# roff output (-ms)
binutils.ms: $(srcdir)/binutils.texi
sed -e '/\\input texinfo/d' \
-e '/@c TEXI2ROFF-KILL/,/@c END TEXI2ROFF-KILL/d' \
+ -e '/^@ifinfo/,/^@end ifinfo/d' \
+ -e '/^@c/d' \
-e 's/{.*,,/{/' \
+ -e 's/@ / /g' \
+ -e 's/^@alphaenumerate/@enumerate/g' \
+ -e 's/^@end alphaenumerate/@end enumerate/g' \
$(srcdir)/binutils.texi | \
- texi2roff -ms >binutils.ms
+ texi2roff -ms | \
+ sed -e 's/---/\\(em/g' \
+ >binutils.ms
# roff output (-mm)
+# '@noindent's removed due to texi2roff-2 mm bug; if yours is newer,
+# try leaving them in
binutils.mm: $(srcdir)/binutils.texi
sed -e '/\\input texinfo/d' \
-e '/@c TEXI2ROFF-KILL/,/@c END TEXI2ROFF-KILL/d' \
+ -e '/^@ifinfo/,/^@end ifinfo/d' \
+ -e '/^@c/d' \
-e 's/{.*,,/{/' \
-e '/@noindent/d' \
+ -e 's/@ / /g' \
+ -e 's/^@alphaenumerate/@enumerate/g' \
+ -e 's/^@end alphaenumerate/@end enumerate/g' \
$(srcdir)/binutils.texi | \
texi2roff -mm | \
sed -e 's/---/\\(em/g' \
binutils.me: $(srcdir)/binutils.texi
sed -e '/\\input texinfo/d' \
-e '/@c TEXI2ROFF-KILL/,/@c END TEXI2ROFF-KILL/d' \
+ -e '/^@ifinfo/,/^@end ifinfo/d' \
+ -e '/^@c/d' \
-e 's/{.*,,/{/' \
+ -e 's/@ / /g' \
+ -e 's/^@alphaenumerate/@enumerate/g' \
+ -e 's/^@end alphaenumerate/@end enumerate/g' \
$(srcdir)/binutils.texi | \
- texi2roff -me >binutils.me
+ texi2roff -me | \
+ sed -e 's/---/\\(em/g' \
+ >binutils.me
######################################################################
realclean: clean
-rm -f $(STAGESTUFF) TAGS
-install: $(PROGS)
+install: all
for i in $(PROGS) ; do \
(cp $$i $(bindir)/$$i.new \
&& mv -f $(bindir)/$$i.new $(bindir)/$$i) \
&& mv -f $(mandir)/man1/$$i.new $(mandir)/man1/$$i) \
|| exit 1 ; \
done
+
+install-info: all-info
for i in *.info* ; do \
(cp $$i $(idestdir)/info/$$i.new \
&& mv -f $(idestdir)/info/$$i.new $(idestdir)/info/$$i) \