Changeset 996 in kBuild
- Timestamp:
- May 29, 2007 9:18:10 PM (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/bootstrap.gmk
r995 r996 28 28 # 29 29 # ASSUMES: 30 # - BUILD_TARGET, BUILD_PLATFORM_ARCH, BUILD_PLATFORM_CPU in the env.30 # - BUILD_TARGET, BUILD_PLATFORM_ARCH, BUILD_PLATFORM_CPU and BUILD_TYPE in the env. 31 31 # - PATH_KBUILD points to ./kBuild with an absolute path. 32 # - PATH_KBUILD_BIN must *NOT* be defined anywhere. 32 33 # - Current directory == bootstrap.gmk directory. 33 34 # - mkdir -p works. … … 36 37 # - cd somedir && command works. 37 38 # - echo done > file works. 39 # - GNU make implements CURDIR, if not please define SRCDIR. 38 40 # 39 41 # Tip. kBuild/env.sh (g)make -f bootstrap.kmk … … 47 49 # 48 50 49 srcdir = . 50 OUTDIR = $( srcdir)/out/$(BUILD_PLATFORM).$(BUILD_PLATFORM_ARCH)/$(BUILD_TYPE)/bootstrap51 SRCDIR = $(CURDIR) 52 OUTDIR = $(SRCDIR)/out/$(BUILD_PLATFORM).$(BUILD_PLATFORM_ARCH)/$(BUILD_TYPE)/bootstrap 51 53 52 .NOTPARALLEL:53 54 54 .PHONEY: allstage1 stage255 all: stage1 55 all: stage1 stage2 56 56 57 57 58 # … … 63 64 $(OUTDIR)/kmk/kmk_ash \ 64 65 $(OUTDIR)/kmk/kmk_sed \ 65 $( srcdir)/src/kmk/config.h.$(BUILD_TARGET) \66 $( srcdir)/src/sed/config.h.$(BUILD_TARGET)66 $(SRCDIR)/src/kmk/config.h.$(BUILD_TARGET) \ 67 $(SRCDIR)/src/sed/config.h.$(BUILD_TARGET) 67 68 68 69 # kmk 69 $(OUTDIR)/kmk/: 70 mkdir -p $@ 71 72 $(OUTDIR)/kmk/ts-autoreconf: $(OUTDIR)/kmk/ 73 cd $(srcdir)/src/kmk && autoreconf -i -v 74 echo done > $@ 70 $(OUTDIR)/kmk/ts-autoreconf: 71 mkdir -p $(@D) 72 cd $(SRCDIR)/src/kmk && autoreconf -i -v 73 echo done > $@ 75 74 76 75 $(OUTDIR)/kmk/ts-configured: $(OUTDIR)/kmk/ts-autoreconf 77 cd $(OUTDIR)/kmk && $(srcdir)/src/kmk/configure78 76 cd $(OUTDIR)/kmk && $(SRCDIR)/src/kmk/configure 77 echo done > $@ 79 78 80 79 $(OUTDIR)/kmk/config.h: $(OUTDIR)/kmk/ts-configured 81 80 82 $( srcdir)/src/kmk/config.h.$(BUILD_TARGET): $(OUTDIR)/kmk/config.h83 cp -f $(OUTDIR)/kmk/config.h $(srcdir)/src/kmk/config.h.$(BUILD_TARGET)81 $(SRCDIR)/src/kmk/config.h.$(BUILD_TARGET): $(OUTDIR)/kmk/config.h 82 cp -f $(OUTDIR)/kmk/config.h $(SRCDIR)/src/kmk/config.h.$(BUILD_TARGET) 84 83 85 84 $(OUTDIR)/kmk/kmk: $(OUTDIR)/kmk/ts-configured 86 85 $(MAKE) -C $(@D) 87 86 88 87 # sed 89 $(OUTDIR)/sed/: 90 mkdir -p $@ 91 92 $(OUTDIR)/sed/ts-autoreconf: $(OUTDIR)/sed/ 93 cd $(srcdir)/src/sed && autoreconf -i -v 94 echo done > $@ 88 $(OUTDIR)/sed/ts-autoreconf: 89 mkdir -p $(@D) 90 @# only required on OS/2, so skip it. 91 @# cd $(SRCDIR)/src/sed && autoreconf -i -v 92 echo done > $@ 95 93 96 94 $(OUTDIR)/sed/ts-configured: $(OUTDIR)/sed/ts-autoreconf 97 cd $(OUTDIR)/sed && $(srcdir)/src/sed/configure --without-libintl --disable-nls98 95 cd $(OUTDIR)/sed && $(SRCDIR)/src/sed/configure --without-libintl --disable-nls 96 echo done > $@ 99 97 100 98 $(OUTDIR)/sed/config.h: $(OUTDIR)/sed/ts-configured 101 99 102 $( srcdir)/src/sed/config.h.$(BUILD_TARGET): $(OUTDIR)/sed/config.h103 100 $(SRCDIR)/src/sed/config.h.$(BUILD_TARGET): $(OUTDIR)/sed/config.h 101 cp -f $< $@ 104 102 105 $(OUTDIR)/sed/s rc/sed: $(OUTDIR)/sed/ts-configured106 $(MAKE) -C $(@D) 103 $(OUTDIR)/sed/sed/sed: $(OUTDIR)/sed/ts-configured 104 $(MAKE) -C $(@D)/.. 107 105 108 $(OUTDIR)/kmk/kmk_sed: $(OUTDIR)/sed/s rc/sed109 106 $(OUTDIR)/kmk/kmk_sed: $(OUTDIR)/sed/sed/sed 107 cp -f $< $@ 110 108 111 109 $(OUTDIR)/kmk/kmk_ash: 112 110 ln -s /bin/sh $@ 113 111 114 112 # … … 120 118 $(OUTDIR)/ts-stage2-install 121 119 122 $(OUTDIR)/ts-stage2-build: 123 PATH_KBUILD_BIN=$(OUTDIR)/kmk $(OUTDIR)/kmk -C $(srcdir) 124 echo done > $@ 120 $(OUTDIR)/ts-stage2-build: \ 121 $(SRCDIR)/src/kmk/config.h.$(BUILD_TARGET) \ 122 $(SRCDIR)/src/sed/config.h.$(BUILD_TARGET) \ 123 $(OUTDIR)/kmk/kmk 124 $(OUTDIR)/kmk/kmk -C $(SRCDIR) 125 echo done > $@ 125 126 126 $(OUTDIR)/ts-stage2-install: 127 PATH_KBUILD_BIN=$(OUTDIR)/kmk $(OUTDIR)/kmk -C $(srcdir) PATH_INS=$(srcdir)install128 127 $(OUTDIR)/ts-stage2-install: $(OUTDIR)/ts-stage2-build 128 $(OUTDIR)/kmk/kmk -C $(SRCDIR) PATH_INS=`pwd` install 129 echo done > $@ 129 130 131 132 ## 133 ## Clean the output files... 134 ## 135 #clean: 136 # rm -Rf $(OUTDIR) 137 138 139 # can't hurt... 140 .NOTPARALLEL: 141
Note:
See TracChangeset
for help on using the changeset viewer.