~ubuntu-branches/ubuntu/lucid/openssl/lucid-security

« back to all changes in this revision

Viewing changes to Makefile

  • Committer: Bazaar Package Importer
  • Author(s): Kurt Roeckx
  • Date: 2006-05-15 16:00:58 UTC
  • mfrom: (1.1.3 upstream)
  • Revision ID: james.westby@ubuntu.com-20060515160058-pn9osix02x46r0iy
Tags: 0.9.8b-2
* Don't call gcc with -mcpu on i386, we already use -march, so no need for
  -mtune either.
* Always make all directories when building something:
  - The engines directory didn't get build for the static directory, so
    where missing in libcrypo.a
  - The apps directory didn't always get build, so we didn't have an openssl
    and a small part of the regression tests failed.
* Make the package fail to build if the regression tests fail.

Show diffs side-by-side

added added

removed removed

Lines of Context:
4
4
## Makefile for OpenSSL
5
5
##
6
6
 
7
 
VERSION=0.9.8a
 
7
VERSION=0.9.8b
8
8
MAJOR=0
9
9
MINOR=9.8
10
10
SHLIB_VERSION_NUMBER=0.9.8
102
102
KRB5_INCLUDES=
103
103
LIBKRB5=
104
104
 
 
105
# Zlib stuff
 
106
ZLIB_INCLUDE=
 
107
LIBZLIB=
 
108
 
105
109
DIRS=   crypto ssl engines apps tools
106
110
SHLIBDIRS= crypto ssl
107
111
 
127
131
MAN1=1
128
132
MAN3=3
129
133
MANSUFFIX=ssl
 
134
MANSECTION=SSL
130
135
SHELL=/bin/sh
131
136
 
132
137
TOP=    .
193
198
# MAKEOVERRIDES= effectively "equalizes" GNU-ish and SysV-ish make flavors,
194
199
# which in turn eliminates ambiguities in variable treatment with -e.
195
200
 
 
201
# BUILD_CMD is a generic macro to build a given target in a given
 
202
# subdirectory.  The target must be given through the shell variable
 
203
# `target' and the subdirectory to build in must be given through `dir'.
 
204
# This macro shouldn't be used directly, use RECURSIVE_BUILD_CMD or
 
205
# BUILD_ONE_CMD instead.
 
206
#
 
207
# BUILD_ONE_CMD is a macro to build a given target in a given
 
208
# subdirectory if that subdirectory is part of $(DIRS).  It requires
 
209
# exactly the same shell variables as BUILD_CMD.
 
210
#
 
211
# RECURSIVE_BUILD_CMD is a macro to build a given target in all
 
212
# subdirectories defined in $(DIRS).  It requires that the target
 
213
# is given through the shell variable `target'.
196
214
BUILD_CMD=  if [ -d "$$dir" ]; then \
197
215
            (   cd $$dir && echo "making $$target in $$dir..." && \
198
216
                $(CLEARENV) && $(MAKE) -e $(BUILDENV) TOP=.. DIR=$$dir $$target \
199
217
            ) || exit 1; \
200
218
            fi
201
219
RECURSIVE_BUILD_CMD=for dir in $(DIRS); do $(BUILD_CMD); done
 
220
BUILD_ONE_CMD=\
 
221
        if echo " $(DIRS) " | grep " $$dir " >/dev/null 2>/dev/null; then \
 
222
                $(BUILD_CMD); \
 
223
        fi
202
224
 
203
225
reflect:
204
226
        @[ -n "$(THIS)" ] && $(CLEARENV) && $(MAKE) $(THIS) -e $(BUILDENV)
209
231
build_libs: build_crypto build_ssl build_engines
210
232
 
211
233
build_crypto:
212
 
        @dir=crypto; target=all; $(BUILD_CMD)
 
234
        @dir=crypto; target=all; $(BUILD_ONE_CMD)
213
235
build_ssl:
214
 
        @dir=ssl; target=all; $(BUILD_CMD)
 
236
        @dir=ssl; target=all; $(BUILD_ONE_CMD)
215
237
build_engines:
216
 
        @dir=engines; target=all; $(BUILD_CMD)
 
238
        @dir=engines; target=all; $(BUILD_ONE_CMD)
217
239
build_apps:
218
 
        @dir=apps; target=all; $(BUILD_CMD)
 
240
        @dir=apps; target=all; $(BUILD_ONE_CMD)
219
241
build_tests:
220
 
        @dir=test; target=all; $(BUILD_CMD)
 
242
        @dir=test; target=all; $(BUILD_ONE_CMD)
221
243
build_tools:
222
 
        @dir=tools; target=all; $(BUILD_CMD)
 
244
        @dir=tools; target=all; $(BUILD_ONE_CMD)
223
245
 
224
246
all_testapps: build_libs build_testapps
225
247
build_testapps:
226
 
        @dir=crypto; target=testapps; $(BUILD_CMD)
 
248
        @dir=crypto; target=testapps; $(BUILD_ONE_CMD)
227
249
 
228
250
libcrypto$(SHLIB_EXT): libcrypto.a
229
251
        @if [ "$(SHLIB_TARGET)" != "" ]; then \
257
279
 
258
280
link-shared:
259
281
        @ set -e; for i in ${SHLIBDIRS}; do \
260
 
                $(MAKE) -f $(HERE)/Makefile.shared \
 
282
                $(MAKE) -f $(HERE)/Makefile.shared -e $(BUILDENV) \
261
283
                        LIBNAME=$$i LIBVERSION=${SHLIB_MAJOR}.${SHLIB_MINOR} \
262
284
                        LIBCOMPATVERSIONS=";${SHLIB_VERSION_HISTORY}" \
263
285
                        symlink.$(SHLIB_TARGET); \
540
562
                echo "installing man$$sec/$$fn.$${sec}$(MANSUFFIX)"; \
541
563
                (cd `$(PERL) util/dirname.pl $$i`; \
542
564
                sh -c "$$pod2man \
543
 
                        --section=$$sec --center=OpenSSL \
 
565
                        --section=$${sec}$(MANSECTION) --center=OpenSSL \
544
566
                        --release=$(VERSION) `basename $$i`") \
545
567
                        >  $(INSTALL_PREFIX)$(MANDIR)/man$$sec/$$fn.$${sec}$(MANSUFFIX); \
546
568
                $(PERL) util/extract-names.pl < $$i | \
557
579
                echo "installing man$$sec/$$fn.$${sec}$(MANSUFFIX)"; \
558
580
                (cd `$(PERL) util/dirname.pl $$i`; \
559
581
                sh -c "$$pod2man \
560
 
                        --section=$$sec --center=OpenSSL \
 
582
                        --section=$${sec}$(MANSECTION) --center=OpenSSL \
561
583
                        --release=$(VERSION) `basename $$i`") \
562
584
                        >  $(INSTALL_PREFIX)$(MANDIR)/man$$sec/$$fn.$${sec}$(MANSUFFIX); \
563
585
                $(PERL) util/extract-names.pl < $$i | \