X-Git-Url: https://git.openssl.org/gitweb/?p=openssl.git;a=blobdiff_plain;f=Configurations%2Funix-Makefile.tmpl;h=f60a11f6c33e32841edb40eba062877e904c1cf8;hp=117c404ff27b7adb264e5446d3e25dac99aecfb5;hb=04e2a527379ad12ca512aef4e838f94af22d7f79;hpb=4def90c5de3465bd4bc69d069d5f50367108ab27 diff --git a/Configurations/unix-Makefile.tmpl b/Configurations/unix-Makefile.tmpl index 117c404ff2..f60a11f6c3 100644 --- a/Configurations/unix-Makefile.tmpl +++ b/Configurations/unix-Makefile.tmpl @@ -220,6 +220,7 @@ test tests: build_tests_nodep build_apps_nodep build_engines_nodep depend SRCTOP=../$(SRCDIR) \ BLDTOP=../$(BLDDIR) \ EXE_EXT={- $exeext -} \ + OPENSSL_ENGINES=../$(BLDDIR)/engines \ $(PERL) ../$(SRCDIR)/test/run_tests.pl $(TESTS) ) list-tests: @@ -256,32 +257,15 @@ clean: libclean # This exists solely for those who still type 'make depend' # # We check if any depfile is newer than Makefile and decide to -# concatenate only if that is true, or if 'test' (a.k.a [ ) -# doesn't have the option to figure it out (-nt). -# -# To check if test has the file age comparison operator, we -# simply try, and rely test to exit with 0 if the comparison -# was true, 1 if false, and most importantly, 2 if it doesn't -# recognise the operator. +# concatenate only if that is true. depend: @: {- output_off() if $disabled{makedepend}; "" -} - @catdepends=false; \ - if [ Makefile -nt Makefile ] 2>/dev/null || [ $$? = 1 ]; then \ - for d in $(DEPS); do \ - if [ $$d -nt Makefile ]; then \ - catdepends=true; \ - break; \ - fi; \ - done; \ - else \ - catdepends=true; \ - fi; \ - if [ $$catdepends = true ]; then \ + @if [ -z "`find $(DEPS) -newer Makefile`" ]; then \ ( sed -e '/^# DO NOT DELETE THIS LINE.*/,$$d' < Makefile; \ echo '# DO NOT DELETE THIS LINE -- make depend depends on it.'; \ echo; \ - for d in $(DEPS); do \ - if [ -f $$d ]; then cat $$d; fi; \ + for f in $(DEPS); do \ + if [ -f $$f ]; then cat $$f; fi; \ done ) > Makefile.new; \ if cmp Makefile.new Makefile >/dev/null 2>&1; then \ rm -f Makefile.new; \ @@ -633,7 +617,7 @@ generate: generate_apps generate_crypto_bn generate_crypto_objects lint: lint -DLINT $(INCLUDES) $(SRCS) -generate_apps: $(SRCDIR)/apps/openssl-vms.cnf $(SRCDIR)/apps/progs.h +generate_apps: $(SRCDIR)/apps/openssl-vms.cnf generate_crypto_bn: $(SRCDIR)/crypto/bn/bn_prime.h @@ -711,17 +695,6 @@ $(SRCDIR)/apps/openssl-vms.cnf: $(SRCDIR)/apps/openssl.cnf $(PERL) $(SRCDIR)/VMS/VMSify-conf.pl \ < $(SRCDIR)/apps/openssl.cnf > $(SRCDIR)/apps/openssl-vms.cnf -{- # because the program apps/openssl has object files as sources, and - # they then have the corresponding C files as source, we need to chain - # the lookups in %unified_info - my $apps_openssl = catfile("apps","openssl"); - our @openssl_source = map { @{$unified_info{sources}->{$_}} } - @{$unified_info{sources}->{$apps_openssl}}; - ""; -} -$(SRCDIR)/apps/progs.h: - $(RM) $@ - $(PERL) $(SRCDIR)/apps/progs.pl {- join(" ", @openssl_source) -} > $@ - $(SRCDIR)/crypto/bn/bn_prime.h: $(SRCDIR)/crypto/bn/bn_prime.pl $(PERL) $(SRCDIR)/crypto/bn/bn_prime.pl > $(SRCDIR)/crypto/bn/bn_prime.h @@ -797,7 +770,7 @@ openssl.pc: # wasn't passed down automatically. It's quite safe to use it like we do # below; if it doesn't exist, the result will be empty and 'make' will pick # up $(MAKEFLAGS) which is passed down as an environment variable. -configdata.pm: {- $config{build_file_template} -} $(SRCDIR)/Configurations/common.tmpl $(SRCDIR)/Configure $(SRCDIR)/config {- join(" ", @{$config{build_infos}}) -} +configdata.pm: $(SRCDIR)/Configurations/unix-Makefile.tmpl $(SRCDIR)/Configurations/common.tmpl $(SRCDIR)/Configure $(SRCDIR)/config {- join(" ", @{$config{build_infos}}) -} @echo "Detected changed: $?" @echo "Reconfiguring..." $(SRCDIR)/Configure reconf @@ -892,7 +865,7 @@ $obj$depext: $deps rm -f \$\@.tmp; touch \$\@.tmp -\$(MAKEDEPEND) -f\$\@.tmp -o"|$obj$objext" -- \$(CFLAGS) $ecflags$incs -- $srcs \\ 2>/dev/null - perl -i -pe 's/^.*\\|//; s/ \\/(\\\\.|[^ ])*//; \$\$_ = undef if (/: *\$\$/ || /^(#.*| *)\$\$/); \$\$_.="\\n" unless !defined(\$\$_) or /\\R\$\$/g;' \$\@.tmp + -\$(PERL) -i -pe 's/^.*\\|//; s/ \\/(\\\\.|[^ ])*//; \$\$_ = undef if (/: *\$\$/ || /^(#.*| *)\$\$/); \$\$_.="\\n" unless !defined(\$\$_) or /\\R\$\$/g;' \$\@.tmp \@if cmp \$\@.tmp \$\@ > /dev/null 2> /dev/null; then \\ rm -f \$\@.tmp; \\ else \\