Use a wrapper for pod2html
[openssl.git] / Configurations / unix-Makefile.tmpl
index 62ca26dde589c6173fb0f99f5105d9af431fc599..51ba10f62af6ded44b8daa063e1252bc224cf0df 100644 (file)
@@ -464,16 +464,13 @@ all: build_sw build_docs
 test: tests
 {- dependmagic('tests'); -}: build_programs_nodep build_modules_nodep link-utils
        @ : {- output_off() if $disabled{tests}; "" -}
-       ( cd test; \
-         mkdir -p test-runs; \
-         SRCTOP=../$(SRCDIR) \
-         BLDTOP=../$(BLDDIR) \
-         RESULT_D=test-runs \
+       ( SRCTOP=$(SRCDIR) \
+         BLDTOP=$(BLDDIR) \
          PERL="$(PERL)" \
          EXE_EXT={- platform->binext() -} \
-         OPENSSL_ENGINES=`cd ../$(BLDDIR)/engines 2>/dev/null && pwd` \
-         OPENSSL_MODULES=`cd ../$(BLDDIR)/providers 2>/dev/null && pwd` \
-         $(PERL) ../$(SRCDIR)/test/run_tests.pl $(TESTS) )
+         OPENSSL_ENGINES=`cd $(BLDDIR)/engines 2>/dev/null && pwd` \
+         OPENSSL_MODULES=`cd $(BLDDIR)/providers 2>/dev/null && pwd` \
+         $(PERL) $(SRCDIR)/test/run_tests.pl $(TESTS) )
        @ : {- if ($disabled{tests}) { output_on(); } else { output_off(); } "" -}
        @echo "Tests are not supported with your chosen Configure options"
        @ : {- output_on() if !$disabled{tests}; "" -}
@@ -516,7 +513,7 @@ clean: libclean
        -$(RM) `find . -name '*{- platform->depext() -}' \! -name '.*' \! -type d -print`
        -$(RM) `find . -name '*{- platform->objext() -}' \! -name '.*' \! -type d -print`
        $(RM) core
-       $(RM) tags TAGS doc-nits
+       $(RM) tags TAGS doc-nits cmd-nits
        $(RM) -r test/test-runs
        $(RM) openssl.pc libcrypto.pc libssl.pc
        -$(RM) `find . -type l \! -name '.*' -print`
@@ -950,9 +947,12 @@ update: generate errors ordinals
 generate: generate_apps generate_crypto_bn generate_crypto_objects \
           generate_crypto_conf generate_crypto_asn1 generate_fuzz_oids
 
-.PHONY: doc-nits
+.PHONY: doc-nits cmd-nits
 doc-nits: build_generated
-       (cd $(SRCDIR); $(PERL) util/find-doc-nits -n -l -e )
+       $(PERL) $(SRCDIR)/util/find-doc-nits -n -l -e
+
+cmd-nits: build_generated apps/openssl
+       $(PERL) $(SRCDIR)/util/find-doc-nits -c
 
 # Test coverage is a good idea for the future
 #coverage: $(PROGRAMS) $(TESTPROGRAMS)
@@ -1187,10 +1187,7 @@ reconfigure reconf:
          my $pod = $args{generator}->[0];
          return <<"EOF";
 $args{src}: $pod
-       pod2html "--podroot=\$(SRCDIR)/doc" --htmldir=.. \\
-                --podpath=man1:man3:man5:man7 --infile=$pod "--title=$title" \\
-       | \$(PERL) -pe 's|href="http://man\\.he\\.net/(man\\d/[^"]+)(?:\\.html)?"|href="../\$1.html|g;' \\
-       > \$\@
+       \$(PERL) \$(SRCDIR)/util/mkpod2html.pl -i "$pod" -o \$\@ -t "$title" -r "\$(SRCDIR)/doc"
 EOF
       } elsif ($args{src} =~ /\.(\d)$/) {
          my $section = $1;
@@ -1199,8 +1196,7 @@ EOF
          return <<"EOF";
 $args{src}: $pod
        pod2man --name=$name --section=$section --center=OpenSSL \\
-               --release=\$(VERSION) $pod \\
-       > \$\@
+               --release=\$(VERSION) $pod >\$\@
 EOF
       } elsif (platform->isdef($args{src})) {
           my $target = platform->def($args{src});