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
77 "AR_FLAGS=$(AR_FLAGS)" \
78 "MAKEINFO=$(MAKEINFO)" \
81 "CROSS_CFLAGS=$(CROSS_CFLAGS)" \
82 "TARGET_CFLAGS=$(TARGET_CFLAGS)" \
83 "exec_prefix=$(exec_prefix)" \
85 "tooldir=$(tooldir)" \
86 "INSTALL=$(INSTALL)" \
87 "INSTALL_PROGRAM=$(INSTALL_PROGRAM)" \
88 "INSTALL_DATA=$(INSTALL_DATA)" \
92 @rootpre=`pwd`/; export rootpre; \
93 srcrootpre=`cd $(srcdir); pwd`/; export srcrootpre; \
94 $(MULTIDO) $(FLAGS_TO_PASS) multi-do DO=all
97 @rootpre=`pwd`/; export rootpre; \
98 srcrootpre=`cd $(srcdir); pwd`/; export srcrootpre; \
99 for dir in .. ${SUBDIRS}; do \
100 if [ x$$dir != x.. ]; then \
101 if [ -d $$dir ]; then \
102 (cd $$dir; $(MAKE) $(FLAGS_TO_PASS)); \
108 @rootpre=`pwd`/; export rootpre; \
109 srcrootpre=`cd $(srcdir); pwd`/; export srcrootpre; \
110 for dir in .. ${SUBDIRS}; do \
111 if [ x$$dir != x.. ]; then \
112 if [ -d $$dir ]; then \
113 (cd $$dir; $(MAKE) $(FLAGS_TO_PASS) install); \
117 @rootpre=`pwd`/; export rootpre; \
118 srcrootpre=`cd $(srcdir); pwd`/; export srcrootpre; \
119 $(MULTIDO) $(FLAGS_TO_PASS) multi-do DO=install
122 @rootpre=`pwd`/; export rootpre; \
123 srcrootpre=`cd $(srcdir); pwd`/; export srcrootpre; \
124 for dir in .. ${SUBDIRS}; do \
125 if [ x$$dir != x.. ]; then \
126 if [ -d $$dir ]; then \
127 (cd $$dir; $(MAKE) $(FLAGS_TO_PASS) test); \
131 @rootpre=`pwd`/; export rootpre; \
132 srcrootpre=`cd $(srcdir); pwd`/; export srcrootpre; \
133 $(MULTIDO) $(FLAGS_TO_PASS) multi-do DO=test
136 -rm -f *~ core *.o a.out xgdb *.x
138 clean mostlyclean: clean-here
139 rootpre=`pwd`/; export rootpre; \
140 srcrootpre=`cd $(srcdir); pwd`/; export srcrootpre; \
141 $(MAKE) DO=$@ DODIRS="$(SUBDIRS)" $(FLAGS_TO_PASS) subdir_do; \
142 $(MULTICLEAN) multi-clean DO=$@
144 distclean maintainer-clean realclean: clean-here
145 -rm -f Makefile config.cache config.log config.status
146 -rm -f *-init.exp site.*
147 -rm -fr *.log summary detail *.sum
148 rootpre=`pwd`/; export rootpre; \
149 srcrootpre=`cd $(srcdir); pwd`/; export srcrootpre; \
150 $(MAKE) DO=$@ DODIRS="$(SUBDIRS)" $(FLAGS_TO_PASS) subdir_do; \
151 $(MULTICLEAN) multi-clean DO=$@
153 .PHONY: info install-info clean-info
155 @rootpre=`pwd`/; export rootpre; \
156 srcrootpre=`cd $(srcdir); pwd`/; export srcrootpre; \
157 for i in .. $(DODIRS); do \
158 if [ x$$i != x.. ]; then \
159 if [ -f ./$$i/Makefile ]; then \
160 if (cd ./$$i; $(MAKE) $(FLAGS_TO_PASS) $(DO)); then \
170 rootpre=`pwd`/; export rootpre; \
171 srcrootpre=`cd $(srcdir); pwd`/; export srcrootpre; \
172 $(MAKE) DO=$@ DODIRS=doc $(FLAGS_TO_PASS) subdir_do
175 rootpre=`pwd`/; export rootpre; \
176 srcrootpre=`cd $(srcdir); pwd`/; export srcrootpre; \
177 $(MAKE) DO=$@ DODIRS=doc $(FLAGS_TO_PASS) subdir_do
183 Makefile: Makefile.in config.status @host_makefile_frag_path@
184 $(SHELL) config.status
186 config.status: configure
187 $(SHELL) config.status --recheck