diff --git a/Makefile.am b/Makefile.am index 9bf748a..c14aba1 100644 --- a/Makefile.am +++ b/Makefile.am @@ -27,7 +27,7 @@ bzip2recover_LDADD = libbz2.la bin_SCRIPTS = bzgrep bzmore bzdiff -man_MANS = bzip2.1 bzgrep.1 bzmore.1 bzdiff.1 +man_MANS = man/bzip2.1 man/bzgrep.1 man/bzmore.1 man/bzdiff.1 pkgconfigdir = $(libdir)/pkgconfig pkgconfig_DATA = bzip2.pc @@ -107,7 +107,6 @@ EXTRA_DIST = \ bz-fo.xsl \ bz-html.xsl \ bzip.css \ - bzip2.1.preformatted \ bzip2.pc.in \ bzip2.txt \ dlltest.c \ @@ -117,10 +116,12 @@ EXTRA_DIST = \ libbz2.def \ libbz2.dsp \ makefile.msc \ + man/bzip2.1.preformatted \ manual.html \ manual.pdf \ manual.ps \ manual.xml \ + man/meson.build \ meson.build \ meson_options.txt \ mk251.c \ diff --git a/bzdiff.1 b/man/bzdiff.1 similarity index 100% rename from bzdiff.1 rename to man/bzdiff.1 diff --git a/bzgrep.1 b/man/bzgrep.1 similarity index 100% rename from bzgrep.1 rename to man/bzgrep.1 diff --git a/bzip2.1 b/man/bzip2.1 similarity index 100% rename from bzip2.1 rename to man/bzip2.1 diff --git a/bzip2.1.preformatted b/man/bzip2.1.preformatted similarity index 100% rename from bzip2.1.preformatted rename to man/bzip2.1.preformatted diff --git a/bzmore.1 b/man/bzmore.1 similarity index 100% rename from bzmore.1 rename to man/bzmore.1 diff --git a/man/meson.build b/man/meson.build new file mode 100644 index 0000000..bf126b3 --- /dev/null +++ b/man/meson.build @@ -0,0 +1,19 @@ +install_man('bzip2.1', 'bzgrep.1', 'bzdiff.1', 'bzmore.1') + +# Install copies of some of the man files +man1dir = join_paths(get_option('prefix'), get_option('mandir'), 'man1') +foreach m : [['bzip2.1', ['bunzip2.1', 'bzcat']], + ['bzgrep.1', ['bzegrep.1', 'bzfgrep.1']], + ['bzmore.1', ['bzless.1']], + ['bzdiff.1', ['bzcmp.1']]] + _input = m[0] + foreach o : m[1] + configure_file( + input : _input, + output : o, + copy : true, + install : true, + install_dir : man1dir, + ) + endforeach +endforeach \ No newline at end of file diff --git a/meson.build b/meson.build index 4ef543a..79566e5 100644 --- a/meson.build +++ b/meson.build @@ -64,27 +64,6 @@ pkg.generate( ## install headers install_headers('bzlib.h') -## Install man files -install_man('bzip2.1', 'bzgrep.1', 'bzdiff.1', 'bzmore.1') - -# Install copies of some of the man files -man1dir = join_paths(get_option('prefix'), get_option('mandir'), 'man1') -foreach m : [['bzip2.1', ['bunzip2.1', 'bzcat']], - ['bzgrep.1', ['bzegrep.1', 'bzfgrep.1']], - ['bzmore.1', ['bzless.1']], - ['bzdiff.1', ['bzcmp.1']]] - _input = m[0] - foreach o : m[1] - configure_file( - input : _input, - output : o, - copy : true, - install : true, - install_dir : man1dir, - ) - endforeach -endforeach - # Generate manual files with xmlproc build_docs = get_option('docs') docs = find_program('xsltproc', required : build_docs).found() @@ -104,4 +83,5 @@ if docs and prog_sh.found() endforeach endif +subdir('man') subdir('tests') \ No newline at end of file