It's me again. I'm still not real sure I'm doing any of this right. So I
have three subdirs that need Makefiles - src, lib, and man. In src are
perl programs that get run through when configure runs for
substitutions, in lib are perl modules, in man are man files. What needs
to be done in src and lib when just 'make' is typed is:
        1) run 'perl -I../lib -c <perl script> for every perl script
        2) make _should_  run 'make docs' and do pod2man (outputting to man
directory)
and what needs to be done in man when just 'make' is typed is:
        1) nothing
Then when 'make install' is typed I want everything to be installed in
the appropriate places. Not too unreasonable I would think, but there's
oodles of problems.
        1) When 'make' is run it goes through src and lib and does nothing,
then hits man and errors with:

make[1]: *** No rule to make target `Pkg.3', needed by `all-am'.  Stop.
make[1]: Leaving directory `/sandbox/leggett/pkg-1.2.4/man'
make: *** [check-recursive] Error 1

        2) If I run 'make check' (basically the 'perl -I../lib -c <script>
part), it runs through src and modules correctly, but again gets the
same error.
        3) If I run 'make docs' (the pod2man stuff) it just says docs is up to
date
        4) Running 'make install' installs src and lib properly but not man
(above error)

Now I'm still not sure how to append rules to existing ones. I found out
that you can make rules that have "-local" appended to them to do this
but I'm not sure what rule to append this to. I tried making a
"all-local" rule in src that depends on check and docs but that errored
out with a similar error like in man. The _DATA suggestion mentioned in
my previous post didn't work and didn't seem right, but maybe I don't
understand completely. I'm attaching the appropriate Makefile.am's
below. Thanks for any help!

--- Begin Makefile.am ---

# If you want to build these components, please cd to their respective
# directories and type `make'.

SUBDIRS = src lib man

check:
        @list='$(SUBDIRS)'; for subdir in $$list; do \
          echo "Making test in $$subdir"; \
          (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $0); done

docs:
        @list='$(SUBDIRS)'; for subdir in $$list; do \
          echo "Making docs in $$subdir"; \
          (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) docs); done

--- End Makefile.am ---


--- Begin src/Makefile.am ---

EXTRA_DIST = README

bin_SCRIPTS = pkg-configure pkg-copyout pkg-empty pkg-env pkg-example
pkg-link\
pkg-local pkg-make pkg-makeinst pkg-new pkg-regression pkg-unlink
pkg-www pkg

CLEANFILES = $(bin_SCRIPTS)

check: $(bin_SCRIPTS)
        @list='$(bin_SCRIPTS)'; for p in $$list; do \
            $(PERLBIN) -I../modules -c $$p; done

docs: $(bin_SCRIPTS)
        @list='$(bin_SCRIPTS)'; for p in $$list; do \
          pod2man --section=1 --release="@PACKAGE@-@VERSION@"
--center="pkg Software\ Installation System" $$p > ../man/$$p.1; \
          pod2html --infile=$$p --outfile=../html/$$p.html --title=$$p;
\
          pod2text $$p > ../docs/$$p.txt; \
          rm -f pod2html-*cache; done

--- End src/Makefile.am ---


--- Begin lib/Makefile.am ---

libexecdir = @libdir@

libexec_SCRIPTS = Pkg.pm PkgConfig.pm PkgDebug.pm PkgSystem.pm

check: $(libexec_SCRIPTS)
        list='$(libexec_SCRIPTS)'; for p in $$list; do \
          perl -I./ -c $$p; done

docs: $(libexec_SCRIPTS)
        list='$(libexec_SCRIPTS)'; for p in $$list; do \
          pod2man --section=3 --release="@PACKAGE@-@VERSION@"
--center="pkg Software\ Installation System" $$p > ../docs/$$p.3; done

--- End lib/Makefile.am ---


--- Begin man/Makefile.am ---

man_MANS = pkg-configure.1 pkg-copyout.1 pkg-empty.1 pkg-env.1
pkg-example.1 pkg-link.1\ pkg-local.1 pkg-make.1 pkg-makeinst.1
pkg-new.1 pkg-regression.1 pkg-unlink.1 pkg-www.1\
pkg.1 Pkg.3 PkgConfig.3 PkgDebug.3 PkgSystem.3

CLEANFILE = $(man_MANS)

--- End man/Makefile.am ---

--
-Ti Leggett
[EMAIL PROTECTED]
[EMAIL PROTECTED]

Reply via email to