{- output_on() if $disabled{makedepend}; "" -}
GENERATED={- join(" ", map { (my $x = $_) =~ s|\.S$|\.s|; $x } keys %{$unified_info{generate}}) -}
+{- output_off() if $disabled{apps}; "" -}
BIN_SCRIPTS=$(BLDDIR)/tools/c_rehash
MISC_SCRIPTS=$(SRCDIR)/tools/c_hash $(SRCDIR)/tools/c_info \
$(SRCDIR)/tools/c_issuer $(SRCDIR)/tools/c_name \
- $(BLDDIR)/apps/CA.pl $(SRCDIR)/apps/tsget
+ $(BLDDIR)/apps/CA.pl $(BLDDIR)/apps/tsget
+{- output_on() if $disabled{apps}; "" -}
SHLIB_INFO={- join(" ", map { "\"".shlib($_).";".shlib_simple($_)."\"" } @{$unified_info{libraries}}) -}
RCFLAGS={- $target{shared_rcflag} -}
DSO_CFLAGS={- $target{shared_cflag} || "" -}
DSO_LDFLAGS=$(LIB_LDFLAGS)
-BIN_CFLAGS={- "" -}
+BIN_CFLAGS={- $target{bin_cflags} -}
PERL={- $config{perl} -}
build_tests: configdata.pm build_tests_nodep depend
build_tests_nodep: $(TESTPROGS)
-test tests: build_tests_nodep build_apps_nodep build_engines_nodep \
- depend link-utils
+test: tests
+tests: build_tests_nodep build_apps_nodep build_engines_nodep \
+ depend link-utils
+ @ : {- output_off() if $disabled{tests}; "" -}
( cd test; \
SRCTOP=../$(SRCDIR) \
BLDTOP=../$(BLDDIR) \
EXE_EXT={- $exeext -} \
OPENSSL_ENGINES=../$(BLDDIR)/engines \
$(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}; "" -}
list-tests:
@TOP=$(SRCDIR) PERL=$(PERL) $(PERL) $(SRCDIR)/test/run_tests.pl list
rm -f core
rm -f tags TAGS
rm -f openssl.pc libcrypto.pc libssl.pc
- -rm -f `find . -type l`
+ -rm -f `find . -type l -a \! -path "./.git/*"`
rm -f $(TARFILE)
# This exists solely for those who still type 'make depend'
# concatenate only if that is true.
depend:
@: {- output_off() if $disabled{makedepend}; "" -}
- @if [ -z "`find $(DEPS) -newer Makefile 2>/dev/null; exit 0`" ]; then \
+ @if [ -n "`find $(DEPS) -newer Makefile 2>/dev/null; exit 0`" ]; then \
( sed -e '/^# DO NOT DELETE THIS LINE.*/,$$d' < Makefile; \
echo '# DO NOT DELETE THIS LINE -- make depend depends on it.'; \
echo; \
update: generate errors ordinals
-generate: generate_apps generate_crypto_bn generate_crypto_objects
+generate: generate_apps generate_crypto_bn generate_crypto_objects \
+ generate_crypto_conf generate_crypto_asn1
# Test coverage is a good idea for the future
#coverage: $(PROGRAMS) $(TESTPROGRAMS)
( cd $(SRCDIR); $(PERL) crypto/bn/bn_prime.pl > crypto/bn/bn_prime.h )
generate_crypto_objects:
- ( cd $(SRCDIR); $(PERL) crypto/objects/obj_dat.pl \
- include/openssl/obj_mac.h \
- crypto/objects/obj_dat.h )
( cd $(SRCDIR); $(PERL) crypto/objects/objects.pl \
crypto/objects/objects.txt \
crypto/objects/obj_mac.num \
include/openssl/obj_mac.h )
+ ( cd $(SRCDIR); $(PERL) crypto/objects/obj_dat.pl \
+ include/openssl/obj_mac.h \
+ crypto/objects/obj_dat.h )
( cd $(SRCDIR); $(PERL) crypto/objects/objxref.pl \
crypto/objects/obj_mac.num \
crypto/objects/obj_xref.txt \
> crypto/objects/obj_xref.h )
+generate_crypto_conf:
+ ( cd $(SRCDIR); $(PERL) crypto/conf/keysets.pl \
+ > crypto/conf/conf_def.h )
+
+generate_crypto_asn1:
+ ( cd $(SRCDIR); $(PERL) crypto/asn1/charmap.pl \
+ > crypto/asn1/charmap.h )
+
errors:
( cd $(SRCDIR); $(PERL) util/ck_errf.pl -strict */*.c */*/*.c )
( cd $(SRCDIR); $(PERL) util/mkerr.pl -recurse -write )
mkdir -p "$(BLDDIR)/util"; \
ln -sf "../$(SRCDIR)/util/shlib_wrap.sh" "$(BLDDIR)/util"; \
fi
-
FORCE:
# Building targets ###################################################
sub generatesrc {
my %args = @_;
my $generator = join(" ", @{$args{generator}});
+ my $generator_incs = join("", map { " -I".$_ } @{$args{generator_incs}});
my $incs = join("", map { " -I".$_ } @{$args{incs}});
- my $deps = join(" ", @{$args{deps}});
+ my $deps = join(" ", @{$args{generator_deps}}, @{$args{deps}});
if ($args{src} !~ /\.[sS]$/) {
return <<"EOF";
$args{src}: $args{generator}->[0] $deps
- \$(PERL) $generator > \$@
+ \$(PERL)$generator_incs $generator > \$@
EOF
} else {
if ($args{generator}->[0] =~ /\.pl$/) {
- $generator = 'CC="$(CC)" $(PERL) '.$generator;
+ $generator = 'CC="$(CC)" $(PERL)'.$generator_incs.' '.$generator;
} elsif ($args{generator}->[0] =~ /\.m4$/) {
- $generator = 'm4 -B 8192 '.$generator.' >'
+ $generator = 'm4 -B 8192'.$generator_incs.' '.$generator.' >'
} elsif ($args{generator}->[0] =~ /\.S$/) {
$generator = undef;
} else {
$target: $args{generator}->[0] $deps
( trap "rm -f \$@.*" INT 0; \\
$generator \$@.S; \\
- \$(CC) \$(CFLAGS) $incs -E -P \$@.S > \$@.i && mv -f \$@.i \$@ )
+ \$(CC) \$(CFLAGS) $incs -E \$@.S | \\
+ \$(PERL) -ne '/^#(line)?\\s*[0-9]+/ or print' > \$@.i && \\
+ mv -f \$@.i \$@ )
EOF
}
# Otherwise....
}
return <<"EOF";
$args{src}: $args{generator}->[0] $deps
- \$(CC) \$(CFLAGS) $incs -E -P \$< > \$@
+ \$(CC) \$(CFLAGS) $incs -E \$< | \\
+ \$(PERL) -ne '/^#(line)?\\s*[0-9]+/ or print' > \$@
EOF
}
}
my $srcs = join(" ", @srcs);
my $deps = join(" ", @srcs, @{$args{deps}});
my $incs = join("", map { " -I".$_ } @{$args{incs}});
+ unless ($disabled{zlib}) {
+ if ($withargs{zlib_include}) {
+ $incs .= " -I".$withargs{zlib_include};
+ }
+ }
my $ecflags = { lib => '$(LIB_CFLAGS)',
dso => '$(DSO_CFLAGS)',
bin => '$(BIN_CFLAGS)' } -> {$args{intent}};
my $objs = join(" ", map { $_.$objext } @{$args{objs}});
return <<"EOF";
$lib$libext: $objs
- \$(AR) \$\@ $objs
+ \$(AR) \$\@ \$\?
\$(RANLIB) \$\@ || echo Never mind.
EOF
}