[3195] | 1 | # $Id: Makefile.kmk 3482 2007-06-17 21:32:56Z bird $
|
---|
| 2 |
|
---|
[3199] | 3 | DEPTH = ../../..
|
---|
| 4 | include $(PATH_KBUILD)/header.kmk
|
---|
| 5 | GMAKE ?= $(PATH_KBUILD_BIN)/kmk_gmake$(HOSTSUFF_EXE)
|
---|
[3195] | 6 |
|
---|
[3223] | 7 |
|
---|
[3199] | 8 | EXTRAS :=
|
---|
| 9 | ifndef NOT_BOOTSTRAPPING_KNIX
|
---|
| 10 | EXTRAS := -Dgmake=$(GMAKE) \
|
---|
| 11 | -Dmake=$(GMAKE)
|
---|
| 12 | endif
|
---|
| 13 | ifeq ($(BUILD_TYPE),debug)
|
---|
| 14 | EXTRAS += -Doptimize='-g'
|
---|
[3310] | 15 | else
|
---|
| 16 | EXTRAS += -Doptimize='-g -O2 -fno-omit-frame-pointer'
|
---|
[3201] | 17 | endif
|
---|
[3199] | 18 |
|
---|
| 19 | ifdef PERL_SH_DIR
|
---|
| 20 | $(error This is gonna cause trouble: PERL_SH_DIR=$(PERL_SH_DIR))
|
---|
| 21 | endif
|
---|
| 22 |
|
---|
[3223] | 23 | #
|
---|
[3310] | 24 | # No parallel building her.
|
---|
| 25 | #
|
---|
| 26 | .NOTPARALLEL:
|
---|
| 27 | GMAKE := $(GMAKE) -j1
|
---|
| 28 |
|
---|
| 29 |
|
---|
| 30 | #
|
---|
[3223] | 31 | # The usual targets.
|
---|
| 32 | #
|
---|
[3298] | 33 | all_recursive: \
|
---|
| 34 | config \
|
---|
| 35 | build \
|
---|
| 36 | install
|
---|
[3223] | 37 |
|
---|
| 38 | # configuring
|
---|
| 39 | .PHONY: config
|
---|
[3298] | 40 | .NOTPARALLEL: config
|
---|
[3195] | 41 | config:
|
---|
[3201] | 42 | $(RM) -f config.sh Policy.sh
|
---|
[3195] | 43 | EMXSHELL="$(ASH)" \
|
---|
| 44 | ./Configure -des \
|
---|
| 45 | -Dprefix=/@unixroot/usr \
|
---|
| 46 | -Dvendorprefix=/@unixroot/usr \
|
---|
| 47 | -Dsiteprefix=/@unixroot/usr \
|
---|
| 48 | -Dscriptdir=/@unixroot/usr/bin \
|
---|
| 49 | -Dman1dir=/@unixroot/usr/share/man/man1 \
|
---|
| 50 | -Dman3dir=/@unixroot/usr/share/man/man3 \
|
---|
| 51 | -Dinstallman1dir=/@unixroot/usr/share/man/man1 \
|
---|
| 52 | -Dinstallman3dir=/@unixroot/usr/share/man/man3 \
|
---|
[3199] | 53 | -Dpager=/@unixroot/usr/bin/less.exe \
|
---|
| 54 | $(EXTRAS) \
|
---|
[3219] | 55 | -Dd_dirfd='undef' \
|
---|
[3195] | 56 | -Dcf_by='kNIX'
|
---|
[3298] | 57 |
|
---|
[3195] | 58 |
|
---|
[3223] | 59 | # building
|
---|
| 60 | .PHONY: build
|
---|
[3298] | 61 | .NOTPARALLEL: build
|
---|
[3195] | 62 | build:
|
---|
[3207] | 63 | +$(GMAKE) MAKE=$(GMAKE)
|
---|
[3195] | 64 |
|
---|
[3223] | 65 | # testing
|
---|
| 66 | .PHONY: check test
|
---|
[3298] | 67 | .NOTPARALLEL: check test
|
---|
[3205] | 68 | check test:
|
---|
[3207] | 69 | +$(GMAKE) MAKE=$(GMAKE) test
|
---|
[3205] | 70 |
|
---|
[3223] | 71 | # installation
|
---|
| 72 | .PHONY: install
|
---|
[3298] | 73 | .NOTPARALLEL: install
|
---|
[3223] | 74 | install:
|
---|
| 75 | +$(GMAKE) MAKE=$(GMAKE) \
|
---|
| 76 | INSTALLPREFIXEXP=$(PATH_INS)/usr \
|
---|
| 77 | bin=$(PATH_INS)/usr/bin \
|
---|
| 78 | scriptdir=$(PATH_INS)/usr/bin \
|
---|
| 79 | shrpdir=$(PATH_INS)/usr/lib/perl5/5.8.8/os2/CORE \
|
---|
| 80 | privlib=$(PATH_INS)/usr/lib/perl5/5.8.8 \
|
---|
| 81 | man1dir=$(PATH_INS)/usr/share/man/man1 \
|
---|
| 82 | man3dir=$(PATH_INS)/usr/share/man/man3 \
|
---|
| 83 | \
|
---|
| 84 | DESTDIR=$(PATH_INS) \
|
---|
| 85 | INSTALLFLAGS="-V" \
|
---|
| 86 | \
|
---|
| 87 | install
|
---|
| 88 | # packing
|
---|
| 89 | .PHONY: pass_packing
|
---|
[3298] | 90 | .NOTPARALLEL: pass_packing
|
---|
[3223] | 91 | pass_packing: defaultpacking
|
---|
| 92 |
|
---|
| 93 |
|
---|
| 94 | #
|
---|
| 95 | # perl specific.
|
---|
| 96 | #
|
---|
| 97 |
|
---|
[3300] | 98 | .PHONY: depend veryclean
|
---|
[3223] | 99 | depend:
|
---|
| 100 | $(RMDIR) $(wildcard .depending ./*/.depending ./*/*/.depending ./*/*/*/.depending)
|
---|
| 101 | +$(GMAKE) MAKE=$(GMAKE) depend
|
---|
| 102 |
|
---|
[3300] | 103 | veryclean:
|
---|
| 104 | +$(GMAKE) MAKE=$(GMAKE) veryclean
|
---|
[3298] | 105 |
|
---|
[3482] | 106 | #
|
---|
| 107 | # Misc helper targets.
|
---|
| 108 | #
|
---|
| 109 |
|
---|
| 110 | myclean:
|
---|
| 111 | svn st --no-ignore | grep "^[I?]" | cut -b 8- | xargs rm -Rf
|
---|
| 112 |
|
---|