summaryrefslogtreecommitdiff
path: root/Makefile.in
diff options
context:
space:
mode:
authorThomas Bushnell <thomas@gnu.org>1997-04-17 20:47:20 +0000
committerThomas Bushnell <thomas@gnu.org>1997-04-17 20:47:20 +0000
commit5989dac3caaa1e76896f8ec70128dba93a5ecccc (patch)
treeaca0a74be9ce85ddbfa2194ffd61f70ac41cd265 /Makefile.in
parentd3a30dc4c105f0ffc185030b0ba3a946369c015b (diff)
Wed Apr 16 16:55:36 1997 Marcus G. Daniels <marcus@cathcart.sysc.pdx.edu>
* configure.in: Replace AC_PROG_CC with AC_PROG_CC_LOCAL. If cross compiling do Lex/Yacc checks with BUILD_CC. Check CC and BUILD_CC for libraries having the needed support, and substitute discovery in installed_clib. * aclocal.m4: New file. These replacement macros are to handle the case where there is a cross compiler but no supporting files. * Makefile.in (installed-clib): Don't hardwire a Hurd libcrt.a. (cross_linkable): Only define cross-migcom variable when it will be possible to build it. (all, install): Use $(cross-migcom). (install): Install cross-migcom only if was to be built. (mkinstalldirs): Add $(bindir), $(includedir)/mach/exec (cross-lexxer.o lexxer.o): lexxer.o needs cpu.h. (./cross-migcom): Prevent dependency generation for cross-* MiG files unless they can actually be built.
Diffstat (limited to 'Makefile.in')
-rw-r--r--Makefile.in23
1 files changed, 18 insertions, 5 deletions
diff --git a/Makefile.in b/Makefile.in
index 9be046c..c549d8e 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -20,7 +20,7 @@ srcdir=@srcdir@
systype=@systype@
prefix=@prefix@
-installed-clib=$(prefix)/lib/libcrt.a
+installed-clib=@installed_clib@
exec_prefix=$(prefix)
bootdir=$(exec_prefix)/boot
@@ -31,6 +31,10 @@ bindir=$(exec_prefix)/bin
sysdep = $(srcdir)/$(systype)
cross_compiling=@cross_compiling@
+cross_linkable=@cross_linkable@
+ifeq ($(cross_linkable),yes)
+ cross-migcom = cross-migcom
+endif
# Programs found by configure.
AWK=@AWK@
@@ -275,7 +279,7 @@ CPPFLAGS += -nostdinc $(DEFINES) $(INCLUDES)
MIGFLAGS += $(CPPFLAGS)
-all: kernel cross-migcom cross-mig
+all: kernel $(cross-migcom) cross-mig
#
@@ -293,10 +297,10 @@ kernel: $(objfiles)
#
installed-headers-names = $(addprefix $(includedir)/,$(installed-headers))
installed-sysdep-headers-names = $(addprefix $(includedir)/,$($(systype)-installed-headers))
-install: mkinstalldirs kernel $(installed-headers-names) $(installed-sysdep-headers-names) cross-mig cross-migcom
+install: mkinstalldirs kernel $(installed-headers-names) $(installed-sysdep-headers-names) cross-mig $(cross-migcom)
$(INSTALL_PROGRAM) kernel $(bootdir)/gnumach
$(INSTALL_PROGRAM) cross-mig $(bindir)/mig
- $(INSTALL_PROGRAM) cross-migcom $(libexecdir)/mig
+ test -z "$(cross-migcom)" || $(INSTALL_PROGRAM) cross-migcom $(libexecdir)/mig
-ln -s $(systype) $(includedir)/mach/machine
$(installed-headers-names): $(includedir)/%: $(srcdir)/include/%
@@ -307,7 +311,8 @@ $(installed-sysdep-headers-names): $(includedir)/%: $(sysdep)/include/%
mkinstalldirs:
mkdir -p $(bootdir) $(includedir) $(includedir)/device \
- $(includedir)/mach $(includedir)/mach/$(systype) $(libexecdir)
+ $(includedir)/mach $(includedir)/mach/$(systype) \
+ $(libexecdir) $(includedir)/mach/exec $(bindir)
#
@@ -458,10 +463,13 @@ mig-othersrc = alloc.h boolean.h error.h global.h lexxer.h message.h \
mig_string.h routine.h statement.h type.h utils.h write.h \
lexxer.l parser.y mig.sh parser.h cpu.sym
+cross-lexxer.o lexxer.o: cpu.h
+
mig-files = $(mig-csrcfiles) $(mig-othersrc) ChangeLog
vpath cpu.sym $(srcdir)/mig
+ifeq ($(cross_linkable),yes)
# Don't use $(CPPFLAGS) here; MiG needs none of the Mach headers except
# what happens automagically to build cpu.h.
@@ -483,7 +491,12 @@ $(subst .o,.d,$(cross-mig-objfiles)): cross-%.d: $(srcdir)/mig/%.c
set -e; $(CC) $(CFLAGS) -M -MG -I. -I$(srcdir)/mig $< | \
sed > $@.new -e 's/$*\.o:/cross-$*.o $@:/'
mv -f $@.new $@
+endif
+./cross-mig: $(srcdir)/mig/mig.sh Makefile
+ sed -e 's,@MIGDIR@,$(libexecdir),g' \
+ -e 's,@CPP@,${CC} -x c-header -E,g' \
+ $< >$@.tmp && chmod +x $@.tmp && mv -f $@.tmp $@
ifeq ($(cross_compiling),yes)
# When cross compiling, we build two migcoms; one for our use and one to