Welcome to mirror list, hosted at ThFree Co, Russian Federation.

multi-build.in « libgloss - cygwin.com/git/newlib-cygwin.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 52aeeec26d6221059c5e9fec6769ca370b0d15ec (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
PWD_COMMAND=$${PWDCMD-pwd}

# FIXME: There should be an @-sign in front of the `if'.
# Leave out until this is tested a bit more.
multi-do:
	if [ -z "$(MULTIDIRS)" ]; then \
	  true; \
	else \
	  rootpre=`${PWD_COMMAND}`/; export rootpre; \
	  srcrootpre=`cd $(srcdir); ${PWD_COMMAND}`/; export srcrootpre; \
	  lib=`echo "$${rootpre}" | sed -e 's,^.*/\([^/][^/]*\)/$$,\1,'`; export lib; \
	  compiler="$(CC)"; \
	  for dir in $(MULTIDIRS); do \
	    if [ "$${dir}" = "." ]; then \
	      true; \
	    else \
	      destpre=`echo $${rootpre}/$${dir}`/; export destpre; \
	      if ! test -d $${destpre} ; then \
		mkdir -p $${destpre}; \
		cd $${destpre}; \
		config_cmd=`../config.status --config | sed -re "s:--srcdir=([^/]):--srcdir=../\1:"`; \
		$(SHELL) -c "$(SHELL) $${srcrootpre}/configure $${config_cmd}";\
		sed -e "s:^MULTIDIRS[[:space:]]*+=.*$$:MULTIDIRS = :" \
		    -e "s:^MULTILIBNAME[[:space:]]*=.*$$:MULTILIBNAME = MULTIDIR_$${dir}_NAME:" \
		    -e "s:^MULTI_FLAGS_FOR_TARGET[[:space:]]*=.*$$:MULTI_FLAGS_FOR_TARGET = MULTIDIR_$${dir}_FLAGS:" \
		    -e "s:^objdir[[:space:]]*=.*$$:objdir = ..:" \
			Makefile > Makefile.tem; \
		rm -f Makefile; \
		mv Makefile.tem Makefile; \
	      else \
		cd $${destpre}; \
	      fi; \
	      if ($(MAKE) $(FLAGS_TO_PASS) \
		    CFLAGS="$(CFLAGS)" \
		    CCASFLAGS="$(CCASFLAGS)" \
		    FCFLAGS="$(FCFLAGS)" \
		    FFLAGS="$(FFLAGS)" \
		    ADAFLAGS="$(ADAFLAGS)" \
		    prefix="$(prefix)" \
		    exec_prefix="$(exec_prefix)" \
		    GCJFLAGS="$(GCJFLAGS)" \
		    GOCFLAGS="$(GOCFLAGS)" \
		    CXXFLAGS="$(CXXFLAGS)" \
		    LIBCFLAGS="$(LIBCFLAGS)" \
		    LIBCXXFLAGS="$(LIBCXXFLAGS)" \
		    LDFLAGS="$(LDFLAGS)" \
		    MULTIFLAGS="" \
		    DESTDIR="$(DESTDIR)" \
		    SOURCE="${srcdir}/" \
		    INSTALL="$(INSTALL)" \
		    INSTALL_DATA="$(INSTALL_DATA)" \
		    INSTALL_PROGRAM="$(INSTALL_PROGRAM)" \
		    INSTALL_SCRIPT="$(INSTALL_SCRIPT)" \
		    $(DO)); then \
		cd $${rootpre}; \
	      else \
		exit 1; \
	      fi; \
	    fi; \
	  done; \
	fi