Ensure configured module specific and application specific defines are used
[openssl.git] / Configurations / unix-Makefile.tmpl
index 7705b03b8e286df29b61e98849665c2453a31091..dfae9afd0e6e7555e1ae459aac709fc88076aada 100644 (file)
@@ -231,8 +231,8 @@ LIB_CPPFLAGS={- our $lib_cppflags =
                 join(' ', $target{lib_cppflags} || (),
                           $target{shared_cppflag} || (),
                           (map { '-D'.$_ }
-                               @{$config{lib_defines}},
-                               @{$config{shared_defines}}),
+                               @{$config{lib_defines} || ()},
+                               @{$config{shared_defines} || ()}),
                           @{$config{lib_cppflags}},
                           @{$config{shared_cppflag}});
                 join(' ', $lib_cppflags,
@@ -256,6 +256,9 @@ LIB_LDFLAGS={- join(' ', $target{shared_ldflag} || (),
 LIB_EX_LIBS=$(CNF_EX_LIBS) $(EX_LIBS)
 DSO_CPPFLAGS={- join(' ', $target{dso_cppflags} || (),
                           $target{module_cppflags} || (),
+                          (map { '-D'.$_ }
+                               @{$config{dso_defines} || ()},
+                               @{$config{module_defines} || ()}),
                           @{$config{dso_cppflags}},
                           @{$config{module_cppflags}},
                           '$(CNF_CPPFLAGS)', '$(CPPFLAGS)') -}
@@ -276,6 +279,7 @@ DSO_LDFLAGS={- join(' ', $target{dso_ldflags} || (),
                          '$(CNF_LDFLAGS)', '$(LDFLAGS)') -}
 DSO_EX_LIBS=$(CNF_EX_LIBS) $(EX_LIBS)
 BIN_CPPFLAGS={- join(' ', $target{bin_cppflags} || (),
+                          (map { '-D'.$_ } @{$config{bin_defines} || ()}),
                           @{$config{bin_cppflags}},
                           '$(CNF_CPPFLAGS)', '$(CPPFLAGS)') -}
 BIN_CFLAGS={- join(' ', $target{bin_cflags} || (),
@@ -622,7 +626,7 @@ install_runtime_libs: build_libs
                : {- output_off() unless windowsdll(); "" -}; \
                $(ECHO) "install $$s -> $(DESTDIR)$(INSTALLTOP)/bin/$$fn"; \
                cp $$s $(DESTDIR)$(INSTALLTOP)/bin/$$fn.new; \
-               chmod 644 $(DESTDIR)$(INSTALLTOP)/bin/$$fn.new; \
+               chmod 755 $(DESTDIR)$(INSTALLTOP)/bin/$$fn.new; \
                mv -f $(DESTDIR)$(INSTALLTOP)/bin/$$fn.new \
                      $(DESTDIR)$(INSTALLTOP)/bin/$$fn; \
                : {- output_on() unless windowsdll(); "" -}{- output_off() if windowsdll(); "" -}; \
@@ -721,7 +725,7 @@ generate: generate_apps generate_crypto_bn generate_crypto_objects \
           generate_crypto_conf generate_crypto_asn1 generate_fuzz_oids
 
 .PHONY: doc-nits
-doc-nits:
+doc-nits: build_generated
        (cd $(SRCDIR); $(PERL) util/find-doc-nits -n -p ) >doc-nits
        @if [ -s doc-nits ] ; then cat doc-nits ; exit 1; \
        else echo 'doc-nits: no errors.'; rm doc-nits ; fi