| 1 | # $Id: Makefile.kmk 3482 2007-06-17 21:32:56Z bird $ | 
|---|
| 2 |  | 
|---|
| 3 | DEPTH = ../../.. | 
|---|
| 4 | include $(PATH_KBUILD)/header.kmk | 
|---|
| 5 | GMAKE ?= $(PATH_KBUILD_BIN)/kmk_gmake$(HOSTSUFF_EXE) | 
|---|
| 6 |  | 
|---|
| 7 |  | 
|---|
| 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' | 
|---|
| 15 | else | 
|---|
| 16 | EXTRAS += -Doptimize='-g -O2 -fno-omit-frame-pointer' | 
|---|
| 17 | endif | 
|---|
| 18 |  | 
|---|
| 19 | ifdef PERL_SH_DIR | 
|---|
| 20 | $(error This is gonna cause trouble: PERL_SH_DIR=$(PERL_SH_DIR)) | 
|---|
| 21 | endif | 
|---|
| 22 |  | 
|---|
| 23 | # | 
|---|
| 24 | # No parallel building her. | 
|---|
| 25 | # | 
|---|
| 26 | .NOTPARALLEL: | 
|---|
| 27 | GMAKE := $(GMAKE) -j1 | 
|---|
| 28 |  | 
|---|
| 29 |  | 
|---|
| 30 | # | 
|---|
| 31 | # The usual targets. | 
|---|
| 32 | # | 
|---|
| 33 | all_recursive: \ | 
|---|
| 34 | config \ | 
|---|
| 35 | build \ | 
|---|
| 36 | install | 
|---|
| 37 |  | 
|---|
| 38 | # configuring | 
|---|
| 39 | .PHONY: config | 
|---|
| 40 | .NOTPARALLEL: config | 
|---|
| 41 | config: | 
|---|
| 42 | $(RM) -f config.sh Policy.sh | 
|---|
| 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 \ | 
|---|
| 53 | -Dpager=/@unixroot/usr/bin/less.exe \ | 
|---|
| 54 | $(EXTRAS) \ | 
|---|
| 55 | -Dd_dirfd='undef' \ | 
|---|
| 56 | -Dcf_by='kNIX' | 
|---|
| 57 |  | 
|---|
| 58 |  | 
|---|
| 59 | # building | 
|---|
| 60 | .PHONY: build | 
|---|
| 61 | .NOTPARALLEL: build | 
|---|
| 62 | build: | 
|---|
| 63 | +$(GMAKE) MAKE=$(GMAKE) | 
|---|
| 64 |  | 
|---|
| 65 | # testing | 
|---|
| 66 | .PHONY: check test | 
|---|
| 67 | .NOTPARALLEL: check test | 
|---|
| 68 | check test: | 
|---|
| 69 | +$(GMAKE) MAKE=$(GMAKE) test | 
|---|
| 70 |  | 
|---|
| 71 | # installation | 
|---|
| 72 | .PHONY: install | 
|---|
| 73 | .NOTPARALLEL: install | 
|---|
| 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 | 
|---|
| 90 | .NOTPARALLEL: pass_packing | 
|---|
| 91 | pass_packing: defaultpacking | 
|---|
| 92 |  | 
|---|
| 93 |  | 
|---|
| 94 | # | 
|---|
| 95 | # perl specific. | 
|---|
| 96 | # | 
|---|
| 97 |  | 
|---|
| 98 | .PHONY: depend veryclean | 
|---|
| 99 | depend: | 
|---|
| 100 | $(RMDIR)  $(wildcard .depending ./*/.depending ./*/*/.depending ./*/*/*/.depending) | 
|---|
| 101 | +$(GMAKE) MAKE=$(GMAKE) depend | 
|---|
| 102 |  | 
|---|
| 103 | veryclean: | 
|---|
| 104 | +$(GMAKE) MAKE=$(GMAKE) veryclean | 
|---|
| 105 |  | 
|---|
| 106 | # | 
|---|
| 107 | # Misc helper targets. | 
|---|
| 108 | # | 
|---|
| 109 |  | 
|---|
| 110 | myclean: | 
|---|
| 111 | svn st --no-ignore | grep "^[I?]" | cut -b 8- | xargs rm -Rf | 
|---|
| 112 |  | 
|---|