Makefile.in
author "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
Sun Jul 13 10:32:38 2008 +0000 (2008-07-13)
changeset 645 8e58024f8e37
parent 556 68c8c1b91269
child 899 da93630960d1
permissions -rw-r--r--
Ioannis E. VENETIS <venetis@mail.capsl.udel.edu> pointed out that GMP and MPFR were not used by gcc.
Turned out that none could use GMP and MPFR as the config option changed its name, but the change was not propagated to all users.

/trunk/scripts/build/binutils.sh | 2 1 1 0 +-
/trunk/scripts/build/debug/300-gdb.sh | 2 1 1 0 +-
/trunk/scripts/build/cc_gcc.sh | 6 3 3 0 +++---
3 files changed, 5 insertions(+), 5 deletions(-)
     1 # Makefile.in for building crosstool-NG
     2 # This file serves as source for the ./configure operation
     3 
     4 MAKEFLAGS += --no-print-directory --no-builtin-rules
     5 
     6 all: Makefile build
     7 
     8 # Check if Makefile is up to date:
     9 Makefile: Makefile.in
    10 	@echo "$< did changed: you must re-run './configure'"
    11 	@false
    12 
    13 ###############################################################################
    14 # Configuration variables
    15 
    16 VERSION:= @@VERSION@@
    17 BINDIR := @@BINDIR@@
    18 LIBDIR := @@LIBDIR@@
    19 DOCDIR := @@DOCDIR@@
    20 MANDIR := @@MANDIR@@
    21 DATE   := @@DATE@@
    22 LOCAL  := @@LOCAL@@
    23 MAKE   := $(shell which $(MAKE) || type -p $(MAKE) || echo /usr/bin/make)
    24 
    25 ###############################################################################
    26 # Global make rules
    27 
    28 TARGETS := bin lib doc man
    29 
    30 build: $(patsubst %,build-%,$(TARGETS))
    31 
    32 install: local-test build $(patsubst %,install-%,$(TARGETS))
    33 
    34 clean: $(patsubst %,clean-%,$(TARGETS))
    35 
    36 distclean: clean
    37 	@echo "  RM     'Makefile'"
    38 	@rm -f Makefile
    39 
    40 uninstall: local-test $(patsubst %,uninstall-%,$(TARGETS))
    41 
    42 ###############################################################################
    43 # Specific make rules
    44 
    45 #--------------------------------------
    46 # Build rules
    47 
    48 build-bin: ct-ng
    49 	@echo "  CHMOD  '$<'"
    50 	@chmod a+x $<
    51 
    52 build-lib:
    53 
    54 build-doc:
    55 
    56 build-man: docs/ct-ng.1.gz
    57 
    58 docs/ct-ng.1.gz: docs/ct-ng.1
    59 	@echo "  GZIP   '$@'"
    60 	@gzip -c9 $< >$@
    61 
    62 %: %.in Makefile
    63 	@echo "  SED    '$@'"
    64 	@sed -r -e 's,@@CT_MAKE@@,$(MAKE),g;'       \
    65 	        -e 's,@@CT_BINDIR@@,$(BINDIR),g;'   \
    66 	        -e 's,@@CT_LIBDIR@@,$(LIBDIR),g;'   \
    67 	        -e 's,@@CT_DOCDIR@@,$(DOCDIR),g;'   \
    68 	        -e 's,@@CT_MANDIR@@,$(MANDIR),g;'   \
    69 	        -e 's,@@CT_VERSION@@,$(VERSION),g;'	\
    70 	        -e 's,@@CT_DATE@@,$(DATE),g;'       \
    71 	     $@.in >$@
    72 
    73 #--------------------------------------
    74 # Clean rules
    75 
    76 clean-bin:
    77 	@echo "  RM     'ct-ng'"
    78 	@rm -f ct-ng
    79 
    80 clean-lib:
    81 
    82 clean-doc:
    83 
    84 clean-man:
    85 	@echo "  RM     'docs/ct-ng.1'"
    86 	@rm -f docs/ct-ng.1
    87 	@echo "  RM     'docs/ct-ng.1.gz'"
    88 	@rm -f docs/ct-ng.1.gz
    89 
    90 #--------------------------------------
    91 # Check for --local setup
    92 
    93 # If using locally, don't install
    94 local-test:
    95 	@if [ "$(LOCAL)" = "1" ]; then                                          \
    96 	     echo "You're using local copy as runtime. You can't (un)install."; \
    97 	     false;                                                             \
    98 	 fi
    99 
   100 #--------------------------------------
   101 # Install rules
   102 
   103 install-bin: $(BINDIR)
   104 	@echo "  INST   'ct-ng'"
   105 	@install -m 755 ct-ng "$(BINDIR)/ct-ng"
   106 
   107 # If one is hacking crosstool-NG, the patch set might change between any two
   108 # installations of the same VERSION, thus the patches must be removed prior
   109 # to being installed. It is simpler to remove the whole lib/ directory, as it
   110 # is the goal of the install-lib rule to install the lib/ directory...
   111 install-lib: uninstall-lib $(LIBDIR) install-lib-main install-lib-samples
   112 
   113 install-lib-main: $(LIBDIR)
   114 	@for src_dir in arch config kconfig patches scripts tools; do           \
   115 	     echo "  INST   '$${src_dir}/'";                                    \
   116 	     tar cf - --exclude=.svn $${src_dir} |(cd "$(LIBDIR)"; tar xf -);   \
   117 	 done
   118 	@rm -f "$(LIBDIR)/tools/addToolVersion.sh"
   119 	@echo "  INST   'steps.mk'"
   120 	@install -m 644 steps.mk "$(LIBDIR)/steps.mk"
   121 
   122 # Samples need a little love:
   123 #  - change every occurrence of CT_TOP_DIR to CT_LIB_DIR
   124 install-lib-samples: $(LIBDIR) install-lib-main
   125 	@echo "  INST   'samples/'"
   126 	@tar cf - --exclude=.svn samples |(cd "$(LIBDIR)"; tar xf -)
   127 	@for samp_file in "$(LIBDIR)/samples/"*"/crosstool.config"; do                          \
   128 	     sed -r -i -e 's,\$$\{CT_TOP_DIR\},\$$\{CT_LIB_DIR\},g;' $${samp_file};             \
   129 	     sed -r -i -e 's,^(CT_WORK_DIR)=.*,\1="\$${CT_TOP_DIR}/targets",;' $${samp_file};   \
   130 	 done
   131 
   132 install-doc: $(DOCDIR)
   133 	@for doc_file in docs/CREDITS docs/overview.txt; do \
   134 	     echo "  INST   '$${doc_file}'";                \
   135 	     install -m 644 "$${doc_file}" "$(DOCDIR)";     \
   136 	 done
   137 
   138 install-man: $(MANDIR)
   139 	@echo "  INST   'ct-ng.1.gz'"
   140 	@install -m 644 docs/ct-ng.1.gz "$(MANDIR)"
   141 
   142 $(sort $(BINDIR) $(LIBDIR) $(DOCDIR) $(MANDIR)):
   143 	@echo "  MKDIR  '$@'"
   144 	@install -m 755 -d "$@"
   145 
   146 
   147 #--------------------------------------
   148 # Uninstall rules
   149 
   150 uninstall-bin:
   151 	@echo "  RM     '$(BINDIR)/ct-ng'"
   152 	@rm -f "$(BINDIR)/ct-ng"
   153 
   154 uninstall-lib:
   155 	@echo "  RMDIR  '$(LIBDIR)/'"
   156 	@rm -rf "$(LIBDIR)"
   157 
   158 uninstall-doc:
   159 	@echo "  RMDIR  '$(DOCDIR)/'"
   160 	@rm -rf "$(DOCDIR)"
   161 
   162 uninstall-man:
   163 	@echo "  RM     '$(MANDIR)/ct-ng.1.gz'"
   164 	@rm -f "$(MANDIR)/ct-ng.1"{,.gz}