1.1 --- a/Makefile.in Thu Sep 29 12:27:54 2011 +1300
1.2 +++ b/Makefile.in Mon Nov 07 22:28:40 2011 +0100
1.3 @@ -38,39 +38,40 @@
1.4 ###############################################################################
1.5 # Configuration variables
1.6
1.7 -VERSION:= @@VERSION@@
1.8 -BINDIR := @@BINDIR@@
1.9 -LIBDIR := @@LIBDIR@@
1.10 -DOCDIR := @@DOCDIR@@
1.11 -MANDIR := @@MANDIR@@
1.12 -PROG_PFX:=@@PROG_PFX@@
1.13 -PROG_SFX:=@@PROG_SFX@@
1.14 -PROG_SED:=@@PROG_SED@@
1.15 -DATE := @@DATE@@
1.16 -LOCAL := @@LOCAL@@
1.17 -
1.18 -# Paths found by ./configure
1.19 -install := @@install@@
1.20 -bash := @@bash@@
1.21 -grep := @@grep@@
1.22 -make := @@make@@
1.23 -sed := @@sed@@
1.24 -libtool := @@libtool@@
1.25 -libtoolize:= @@libtoolize@@
1.26 -objcopy := @@objcopy@@
1.27 -objdump := @@objdump@@
1.28 -readelf := @@readelf@@
1.29 -patch := @@patch@@
1.30 +# Stuff found by ./configure
1.31 +DATE := @DATE@
1.32 +LOCAL := @enable_local@
1.33 +PROG_SED := @program_transform_name@
1.34 +PACKAGE_TARNAME := @PACKAGE_TARNAME@
1.35 +VERSION := @PACKAGE_VERSION@
1.36 +prefix := @prefix@
1.37 +exec_prefix := @exec_prefix@
1.38 +bindir := @bindir@
1.39 +libdir := @libdir@@sublibdir@
1.40 +docdir := @docdir@@subdocdir@
1.41 +datarootdir := @datarootdir@
1.42 +mandir := @mandir@
1.43 +install := @INSTALL@
1.44 +bash := @_BASH@
1.45 +grep := @EGREP@
1.46 +make := @MAKE@
1.47 +sed := @SED@
1.48 +libtool := @LIBTOOL@
1.49 +libtoolize := @LIBTOOLIZE@
1.50 +objcopy := @OBJCOPY@
1.51 +objdump := @OBJDUMP@
1.52 +readelf := @READELF@
1.53 +patch := @PATCH@
1.54
1.55 # config options to push down to kconfig
1.56 -KCONFIG:= @@KCONFIG@@
1.57 +KCONFIG:= @kconfig_options@
1.58
1.59 ###############################################################################
1.60 # Non-configure variables
1.61 MAN_SECTION := 1
1.62 MAN_SUBDIR := /man$(MAN_SECTION)
1.63
1.64 -PROG_NAME := $(shell echo '$(PROG_PFX)ct-ng$(PROG_SFX)' |sed -e '$(PROG_SED)' )
1.65 +PROG_NAME := $(shell echo 'ct-ng' |$(sed) -r -e '$(PROG_SED)' )
1.66
1.67 ###############################################################################
1.68 # Sanity checks
1.69 @@ -106,7 +107,7 @@
1.70 endif
1.71
1.72 MAKEFLAGS += $(CT_MAKEFLAGS)
1.73 -build install clean distclean uninstall:
1.74 +build install clean distclean mrproper uninstall:
1.75 @$(MAKE) $@
1.76
1.77 else
1.78 @@ -124,6 +125,10 @@
1.79 @echo " RM 'Makefile'"
1.80 @rm -f Makefile
1.81
1.82 +mrproper: distclean
1.83 + @echo " RM 'autostuff'"
1.84 + @ rm -rf autom4te.cache config.log config.status configure
1.85 +
1.86 uninstall: real-uninstall
1.87
1.88 ###############################################################################
1.89 @@ -147,13 +152,10 @@
1.90
1.91 define sed_it
1.92 @echo " SED '$@'"
1.93 - @$(sed) -r -e 's,@@CT_BINDIR@@,$(BINDIR),g;' \
1.94 - -e 's,@@CT_LIBDIR@@,$(LIBDIR),g;' \
1.95 - -e 's,@@CT_DOCDIR@@,$(DOCDIR),g;' \
1.96 - -e 's,@@CT_MANDIR@@,$(MANDIR),g;' \
1.97 - -e 's,@@CT_PROG_PFX@@,$(PROG_PFX),g;' \
1.98 - -e 's,@@CT_PROG_SFX@@,$(PROG_SFX),g;' \
1.99 - -e 's,@@CT_PROG_SED@@,$(PROG_SED),g;' \
1.100 + @$(sed) -r -e 's,@@CT_BINDIR@@,$(bindir),g;' \
1.101 + -e 's,@@CT_LIBDIR@@,$(libdir),g;' \
1.102 + -e 's,@@CT_DOCDIR@@,$(docdir),g;' \
1.103 + -e 's,@@CT_MANDIR@@,$(mandir),g;' \
1.104 -e 's,@@CT_PROG_NAME@@,$(PROG_NAME),g;' \
1.105 -e 's,@@CT_VERSION@@,$(VERSION),g;' \
1.106 -e 's,@@CT_DATE@@,$(DATE),g;' \
1.107 @@ -238,7 +240,7 @@
1.108 #--------------------------------------
1.109 # Check for --local setup
1.110
1.111 -ifeq ($(strip $(LOCAL)),y)
1.112 +ifeq ($(strip $(LOCAL)),yes)
1.113
1.114 real-install:
1.115 @true
1.116 @@ -253,68 +255,68 @@
1.117
1.118 real-install: $(patsubst %,install-%,$(TARGETS)) install-post
1.119
1.120 -install-bin: $(DESTDIR)$(BINDIR)
1.121 +install-bin: $(DESTDIR)$(bindir)
1.122 @echo " INST '$(PROG_NAME)'"
1.123 - @$(install) -m 755 $(PROG_NAME) "$(DESTDIR)$(BINDIR)/$(PROG_NAME)"
1.124 + @$(install) -m 755 $(PROG_NAME) "$(DESTDIR)$(bindir)/$(PROG_NAME)"
1.125
1.126 # If one is hacking crosstool-NG, the patch set might change between any two
1.127 # installations of the same VERSION, thus the patches must be removed prior
1.128 # to being installed. It is simpler to remove the whole lib/ directory, as it
1.129 # is the goal of the install-lib rule to install the lib/ directory...
1.130 -install-lib: uninstall-lib $(DESTDIR)$(LIBDIR) install-lib-main install-lib-samples
1.131 +install-lib: uninstall-lib $(DESTDIR)$(libdir) install-lib-main install-lib-samples
1.132
1.133 LIB_SUB_DIR := config contrib kconfig patches scripts
1.134 -$(patsubst %,install-lib-%-copy,$(LIB_SUB_DIR)): $(DESTDIR)$(LIBDIR)
1.135 +$(patsubst %,install-lib-%-copy,$(LIB_SUB_DIR)): $(DESTDIR)$(libdir)
1.136 @echo " INSTDIR '$(patsubst install-lib-%-copy,%,$(@))/'"
1.137 @tar cf - --exclude='*.sh.in' $(patsubst install-lib-%-copy,%,$(@)) \
1.138 - |(cd "$(DESTDIR)$(LIBDIR)"; tar xf -)
1.139 + |(cd "$(DESTDIR)$(libdir)"; tar xf -)
1.140
1.141 # Huh? It seems we need at least one command to make this rule kick-in.
1.142 install-lib-%: install-lib-%-copy; @true
1.143
1.144 # Huh? that one does not inherit the -opy dependency, above...
1.145 install-lib-scripts: install-lib-scripts-copy
1.146 - @chmod a+x $(DESTDIR)$(LIBDIR)/scripts/crosstool-NG.sh
1.147 - @chmod a+x $(DESTDIR)$(LIBDIR)/scripts/saveSample.sh
1.148 - @rm -f "$(DESTDIR)$(LIBDIR)/scripts/addToolVersion.sh"
1.149 + @chmod a+x $(DESTDIR)$(libdir)/scripts/crosstool-NG.sh
1.150 + @chmod a+x $(DESTDIR)$(libdir)/scripts/saveSample.sh
1.151 + @rm -f "$(DESTDIR)$(libdir)/scripts/addToolVersion.sh"
1.152
1.153 -install-lib-main: $(DESTDIR)$(LIBDIR) $(patsubst %,install-lib-%,$(LIB_SUB_DIR))
1.154 +install-lib-main: $(DESTDIR)$(libdir) $(patsubst %,install-lib-%,$(LIB_SUB_DIR))
1.155 @echo " INST 'steps.mk'"
1.156 - @$(install) -m 644 steps.mk "$(DESTDIR)$(LIBDIR)/steps.mk"
1.157 + @$(install) -m 644 steps.mk "$(DESTDIR)$(libdir)/steps.mk"
1.158 @echo " INST 'paths.mk'"
1.159 - @$(install) -m 644 paths.mk "$(DESTDIR)$(LIBDIR)/paths.mk"
1.160 + @$(install) -m 644 paths.mk "$(DESTDIR)$(libdir)/paths.mk"
1.161
1.162 # Samples need a little love:
1.163 # - change every occurrence of CT_TOP_DIR to CT_LIB_DIR
1.164 -install-lib-samples: $(DESTDIR)$(LIBDIR) install-lib-main
1.165 +install-lib-samples: $(DESTDIR)$(libdir) install-lib-main
1.166 @echo " INSTDIR 'samples/'"
1.167 @for samp_dir in samples/*/; do \
1.168 - mkdir -p "$(DESTDIR)$(LIBDIR)/$${samp_dir}"; \
1.169 + mkdir -p "$(DESTDIR)$(libdir)/$${samp_dir}"; \
1.170 $(sed) -r -e 's:\$$\{CT_TOP_DIR\}:\$$\{CT_LIB_DIR\}:;' \
1.171 -e 's:^(CT_WORK_DIR)=.*:\1="\$${CT_TOP_DIR}/.build":;' \
1.172 $${samp_dir}/crosstool.config \
1.173 - >"$(DESTDIR)$(LIBDIR)/$${samp_dir}/crosstool.config"; \
1.174 + >"$(DESTDIR)$(libdir)/$${samp_dir}/crosstool.config"; \
1.175 $(install) -m 644 "$${samp_dir}/reported.by" \
1.176 - "$(DESTDIR)$(LIBDIR)/$${samp_dir}"; \
1.177 + "$(DESTDIR)$(libdir)/$${samp_dir}"; \
1.178 for libc_cfg in "$${samp_dir}/"*libc*.config; do \
1.179 [ -f "$${libc_cfg}" ] || continue; \
1.180 $(install) -m 644 "$${libc_cfg}" \
1.181 - "$(DESTDIR)$(LIBDIR)/$${samp_dir}"; \
1.182 + "$(DESTDIR)$(libdir)/$${samp_dir}"; \
1.183 done; \
1.184 done
1.185 - @$(install) -m 644 samples/samples.mk "$(DESTDIR)$(LIBDIR)/samples/samples.mk"
1.186 + @$(install) -m 644 samples/samples.mk "$(DESTDIR)$(libdir)/samples/samples.mk"
1.187
1.188 -install-doc: $(DESTDIR)$(DOCDIR)
1.189 +install-doc: $(DESTDIR)$(docdir)
1.190 @echo " INST 'docs/*.txt'"
1.191 @for doc_file in docs/*.txt; do \
1.192 - $(install) -m 644 "$${doc_file}" "$(DESTDIR)$(DOCDIR)"; \
1.193 + $(install) -m 644 "$${doc_file}" "$(DESTDIR)$(docdir)"; \
1.194 done
1.195
1.196 -install-man: $(DESTDIR)$(MANDIR)$(MAN_SUBDIR)
1.197 +install-man: $(DESTDIR)$(mandir)$(MAN_SUBDIR)
1.198 @echo " INST '$(PROG_NAME).1.gz'"
1.199 - @$(install) -m 644 docs/$(PROG_NAME).1.gz "$(DESTDIR)$(MANDIR)$(MAN_SUBDIR)"
1.200 + @$(install) -m 644 docs/$(PROG_NAME).1.gz "$(DESTDIR)$(mandir)$(MAN_SUBDIR)"
1.201
1.202 -$(sort $(DESTDIR)$(BINDIR) $(DESTDIR)$(LIBDIR) $(DESTDIR)$(DOCDIR) $(DESTDIR)$(MANDIR)$(MAN_SUBDIR)):
1.203 +$(sort $(DESTDIR)$(bindir) $(DESTDIR)$(libdir) $(DESTDIR)$(docdir) $(DESTDIR)$(mandir)$(MAN_SUBDIR)):
1.204 @echo " MKDIR '$@/'"
1.205 @$(install) -m 755 -d "$@"
1.206
1.207 @@ -329,20 +331,20 @@
1.208 real-uninstall: $(patsubst %,uninstall-%,$(TARGETS))
1.209
1.210 uninstall-bin:
1.211 - @echo " RM '$(DESTDIR)$(BINDIR)/$(PROG_NAME)'"
1.212 - @rm -f "$(DESTDIR)$(BINDIR)/$(PROG_NAME)"
1.213 + @echo " RM '$(DESTDIR)$(bindir)/$(PROG_NAME)'"
1.214 + @rm -f "$(DESTDIR)$(bindir)/$(PROG_NAME)"
1.215
1.216 uninstall-lib:
1.217 - @echo " RMDIR '$(DESTDIR)$(LIBDIR)/'"
1.218 - @rm -rf "$(DESTDIR)$(LIBDIR)"
1.219 + @echo " RMDIR '$(DESTDIR)$(libdir)/'"
1.220 + @rm -rf "$(DESTDIR)$(libdir)"
1.221
1.222 uninstall-doc:
1.223 - @echo " RMDIR '$(DESTDIR)$(DOCDIR)/'"
1.224 - @rm -rf "$(DESTDIR)$(DOCDIR)"
1.225 + @echo " RMDIR '$(DESTDIR)$(docdir)/'"
1.226 + @rm -rf "$(DESTDIR)$(docdir)"
1.227
1.228 uninstall-man:
1.229 - @echo " RM '$(DESTDIR)$(MANDIR)$(MAN_SUBDIR)/$(PROG_NAME).1.gz'"
1.230 - @rm -f "$(DESTDIR)$(MANDIR)$(MAN_SUBDIR)/$(PROG_NAME).1"{,.gz}
1.231 + @echo " RM '$(DESTDIR)$(mandir)$(MAN_SUBDIR)/$(PROG_NAME).1.gz'"
1.232 + @rm -f "$(DESTDIR)$(mandir)$(MAN_SUBDIR)/$(PROG_NAME).1"{,.gz}
1.233
1.234 endif # Not --local
1.235