Le 2 févr. 2004, à 14:32, Bertrand Lupart a écrit :
There is no "fink way of doing it" nor a "Linux way of doing it", just a "man way of handling locales".
........
I've found no fink's man, sorry, just manconf which is for Jaguar update and manedit, a graphical editor.Just install a more recent man (fink's one for example) and it will display localised man pages, following your environment settings.
Worked for me with fink's man 1.5k.
Anyway, my purpose is not to add French local man pages to my Fink's installation (that, I can do it manually), but to install some localized man pages from within a Makefile for a package and I cannot demand the user to install a Fink's man package I cannot even find for that purpose. Moreover it should work also on other systems (RPM and Linux at the moment, but BSD is on its way too).
I know theoretically how to do it, but I lack dramatically knowledge on languages used in Makefike.
As of now, I've ended up in having a man directory below the topsrcdir with the English man page in it at top level, then a fr subdirectory with the same man page translated into French.
Then I've merely duplicated the original install-man part of the main Makefile.in, changing it as follows for French part, idem for uninstall and adding the necessary variables in all other parts where man is used (phony, ...):
frman1dir = $(mandir)/fr/man1
install-frman1: $(frman1_MANS) $(frman_MANS)
@$(NORMAL_INSTALL)
$(mkinstalldirs) $(DESTDIR)$(frman1dir)
@list='$(frman1_MANS) $(dist_frman1_MANS) $(nodist_frman1_MANS)'; \
l2='$(frman_MANS) $(dist_frman_MANS) $(nodist_frman_MANS)'; \
for i in $$l2; do \
case "$$i" in \
*.1*) list="$$list $$i" ;; \
esac; \
done; \
for i in $$list; do \
if test -f $(srcdir)/man/fr/$$i; then file=$(srcdir)/man/fr/$$i; \
else file=$$i; fi; \
ext=`echo $$i | sed -e 's/^.*\\.//'`; \
case "$$ext" in \
1*) ;; \
*) ext='1' ;; \
esac; \
inst=`echo $$i | sed -e 's/\\.[0-9a-z]*$$//'`; \
inst=`echo $$inst | sed -e 's/^.*\///'`; \
inst=`echo $$inst | sed '$(transform)'`.$$ext; \
echo " $(INSTALL_DATA) $$file $(DESTDIR)$(frman1dir)/$$inst"; \
$(INSTALL_DATA) $$file $(DESTDIR)$(frman1dir)/$$inst; \
done
It works but it's very inelegant, and I'm not sure how to parameterize it with a MANLANGDIRS = . fr es array for example. Something along this:
for d in $(MANLANGDIRS); do mandir=$(mandir)/$(MANLANGDIRS)/man1 ....
Michèle <http://micmacfr.homeunix.org>
------------------------------------------------------- The SF.Net email is sponsored by EclipseCon 2004 Premiere Conference on Open Tools Development and Integration See the breadth of Eclipse activity. February 3-5 in Anaheim, CA. http://www.eclipsecon.org/osdn _______________________________________________ Fink-devel mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/fink-devel