Relocating fmt and mapping files to simpler locations. Simpler symlink handling.

* lib/dist/fmt* moved to lib/fmt
* lib/dist/linuxdoc-tools/* moved to lib/mappings
* lib/mappings/{latin1,nippon}/mapping: use explicit symlinks instead
  of setting them from
* lib/ Use new locations if nothing is found in previous
* lib/dtd:
  - Add explicit linuxdoc.dtd and linuxdoctr.dtd symlinks
  - No longer set latin1 and nippon mappings symlinks
  - No longer set dtd/linuxdoc{,tr}.dtd symlinks here
  - No longer need to set all those linuxdoc* obsolete symlinks
parent 838a41b5
# $Id:,v 1.7 2002/01/28 17:43:59 sano Exp $
# Copyright 1996 Sven Rudolph
# Copyright (C) 1996 Sven Rudolph
# Copyright (C) 2008 Agustin Martin
......@@ -114,18 +112,12 @@ endif
ifeq ($(BUILD_SGMLSASP), true)
$(INSTALL_DATA) man/sgmlsasp.1 $(mandir1)/sgmlsasp.1
# Fix permissions in $(pkgdatadir)
find $(pkgdatadir) -type d -print | xargs chmod 755
find $(pkgdatadir) -type f -print | xargs chmod 644
(cd $(pkgdatadir)/dist/linuxdoc-tools/latin1; rm -f mapping; ln -s ../groff/mapping .)
(cd $(pkgdatadir)/dist/linuxdoc-tools/nippon; rm -f mapping; ln -s ../groff/tr-mapping ./mapping)
(cd $(pkgdatadir)/dist; rm -f linuxdoc; ln -s linuxdoc-tools linuxdoc)
(cd $(pkgdatadir)/dist; rm -f linuxdoctr; ln -s linuxdoc-tools linuxdoctr)
(cd $(pkgdatadir)/dist; rm -f linuxdoc96; ln -s linuxdoc-tools linuxdoc96)
(cd $(pkgdatadir)/dist; rm -f linuxdoctr96; ln -s linuxdoc-tools linuxdoctr96)
(cd $(pkgdatadir)/dist; rm -f linuxdoc97; ln -s linuxdoc-tools linuxdoc97)
(cd $(pkgdatadir)/dtd; rm -f linuxdoc.dtd; ln -s linuxdoc96.dtd linuxdoc.dtd)
(cd $(pkgdatadir)/dtd; rm -f linuxdoctr.dtd; ln -s linuxdoctr96.dtd linuxdoctr.dtd)
(cd $(bindir); for i in $(progs); do rm -f $$i; ln -s linuxdoc $$i;done)
@echo "Installing documentation in $(LINUXDOCDOC) ..."
(cd doc; PATH=${PATH}:$(bindir) PREFIX=$(prefix) BINDIR=$(bindir) \
DATADIR=$(datadir) bash
......@@ -327,7 +327,8 @@ sub init {
# including options for all formats.
my %locations = ();
foreach my $path ("$main::DataDir/site",
foreach my $location (<$path/fmt_*.pl>){
my $fmt = $location;
$fmt =~ s/^.*_//;
......@@ -594,12 +595,14 @@ sub process_file {
my $style = ($global->{style}) ?
my $mapping = ldt_searchfile(["$main::DataDir/site/$dtd/$global->{format}/mapping",
or die "$error_header: Could not find mapping file for $dtd/$global->{format}. Aborting ...\n";
$mapping = "$style $mapping" if $style;
......@@ -617,7 +620,7 @@ sub process_file {
if ($global->{format} eq "groff" or $global->{format} eq "latex2e"){
if ($dtd eq "linuxdoctr") {
$mapping = "$main::DataDir/dist/$dtd/$global->{format}/tr-mapping";
$mapping = "$main::DataDir/mappings/$global->{format}/tr-mapping";
\ No newline at end of file
\ No newline at end of file
\ No newline at end of file
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment