1 # Top level makefile for libgloss
3 # Copyright (c) 1995, 1996 Cygnus Support
5 # The authors hereby grant permission to use, copy, modify, distribute,
6 # and license this software and its documentation for any purpose, provided
7 # that existing copyright notices are retained in all copies and that this
8 # notice is included verbatim in any distributions. No written agreement,
9 # license, or royalty fee is required for any of the authorized uses.
10 # Modifications to this software may be copyrighted by their authors
11 # and need not follow the licensing terms described here, provided that
12 # the new terms are clearly indicated on the first page of each file where
20 srcroot = $(srcdir)/../..
21 objroot = $(objdir)/../..
24 exec_prefix = @exec_prefix@
26 host_alias = @host_alias@
27 target_alias = @target_alias@
31 tooldir = $(exec_prefix)/$(target_alias)
36 # Multilib support variables.
37 # TOP is used instead of MULTI{BUILD,SRC}TOP.
46 INSTALL_PROGRAM = @INSTALL_PROGRAM@
47 INSTALL_DATA = @INSTALL_DATA@
67 # Host specific makefile fragment comes in here.
70 # These are roughly topologically sorted in order to make porting more
75 "CFLAGS_FOR_TARGET=$(CFLAGS_FOR_TARGET)" \
76 "CCASFLAGS=$(CCASFLAGS)" \
79 "AR_FLAGS=$(AR_FLAGS)" \
80 "MAKEINFO=$(MAKEINFO)" \
83 "CROSS_CFLAGS=$(CROSS_CFLAGS)" \
84 "TARGET_CFLAGS=$(TARGET_CFLAGS)" \
85 "exec_prefix=$(exec_prefix)" \
87 "tooldir=$(tooldir)" \
88 "infodir=$(infodir)" \
90 "top_toollibdir=$(toollibdir)" \
91 "INSTALL=$(INSTALL)" \
92 "INSTALL_PROGRAM=$(INSTALL_PROGRAM)" \
93 "INSTALL_DATA=$(INSTALL_DATA)" \
97 +@rootpre=`pwd`/; export rootpre; \
98 srcrootpre=`cd $(srcdir); pwd`/; export srcrootpre; \
99 $(MULTIDO) $(FLAGS_TO_PASS) multi-do DO=all
102 @rootpre=`pwd`/; export rootpre; \
103 srcrootpre=`cd $(srcdir); pwd`/; export srcrootpre; \
104 for dir in .. ${SUBDIRS}; do \
105 if [ x$$dir != x.. ]; then \
106 if [ -d $$dir ]; then \
107 (cd $$dir; $(MAKE) $(FLAGS_TO_PASS)); \
113 @rootpre=`pwd`/; export rootpre; \
114 srcrootpre=`cd $(srcdir); pwd`/; export srcrootpre; \
115 for dir in .. ${SUBDIRS}; do \
116 if [ x$$dir != x.. ]; then \
117 if [ -d $$dir ]; then \
118 (cd $$dir; $(MAKE) $(FLAGS_TO_PASS) install); \
122 @rootpre=`pwd`/; export rootpre; \
123 srcrootpre=`cd $(srcdir); pwd`/; export srcrootpre; \
124 $(MULTIDO) $(FLAGS_TO_PASS) multi-do DO=install
127 @rootpre=`pwd`/; export rootpre; \
128 srcrootpre=`cd $(srcdir); pwd`/; export srcrootpre; \
129 for dir in .. ${SUBDIRS}; do \
130 if [ x$$dir != x.. ]; then \
131 if [ -d $$dir ]; then \
132 (cd $$dir; $(MAKE) $(FLAGS_TO_PASS) test); \
136 @rootpre=`pwd`/; export rootpre; \
137 srcrootpre=`cd $(srcdir); pwd`/; export srcrootpre; \
138 $(MULTIDO) $(FLAGS_TO_PASS) multi-do DO=test
141 -rm -f *~ core *.o a.out xgdb *.x
143 clean mostlyclean: clean-here
144 rootpre=`pwd`/; export rootpre; \
145 srcrootpre=`cd $(srcdir); pwd`/; export srcrootpre; \
146 $(MAKE) DO=$@ DODIRS="$(SUBDIRS)" $(FLAGS_TO_PASS) subdir_do; \
147 $(MULTICLEAN) multi-clean DO=$@
149 distclean maintainer-clean realclean: clean-here
150 -rm -f Makefile config.cache config.log config.status
151 -rm -f *-init.exp site.*
152 -rm -fr *.log summary detail *.sum
153 rootpre=`pwd`/; export rootpre; \
154 srcrootpre=`cd $(srcdir); pwd`/; export srcrootpre; \
155 $(MAKE) DO=$@ DODIRS="$(SUBDIRS)" $(FLAGS_TO_PASS) subdir_do; \
156 $(MULTICLEAN) multi-clean DO=$@
158 .PHONY: info install-info clean-info
160 @rootpre=`pwd`/; export rootpre; \
161 srcrootpre=`cd $(srcdir); pwd`/; export srcrootpre; \
162 for i in .. $(DODIRS); do \
163 if [ x$$i != x.. ]; then \
164 if [ -f ./$$i/Makefile ]; then \
165 if (cd ./$$i; $(MAKE) $(FLAGS_TO_PASS) $(DO)); then \
175 rootpre=`pwd`/; export rootpre; \
176 srcrootpre=`cd $(srcdir); pwd`/; export srcrootpre; \
177 $(MAKE) DO=$@ DODIRS=doc $(FLAGS_TO_PASS) subdir_do
180 rootpre=`pwd`/; export rootpre; \
181 srcrootpre=`cd $(srcdir); pwd`/; export srcrootpre; \
182 $(MAKE) DO=$@ DODIRS=doc $(FLAGS_TO_PASS) subdir_do
188 Makefile: Makefile.in config.status @host_makefile_frag_path@
189 $(SHELL) config.status
191 config.status: configure
192 $(SHELL) config.status --recheck