summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
676f956)
if TARGETPLATFORM differs from HOSTPLATFORM, don't attempt to build
DerivedConstants,h, ghcautoconf.h and GHCConstants.h. If these aren't
present, emit a message to remind the user to copy them from the
target system. Hopefully this should make bootstrapping slightly less
error prone.
# definitions to avoid clashes), prepending some make variables specifying cpp
# platform variables.
# definitions to avoid clashes), prepending some make variables specifying cpp
# platform variables.
+ifneq "$(TARGETPLATFORM)" "$(HOSTPLATFORM)"
+
+$(H_CONFIG) :
+ @echo "*** Cross-compiling: please copy $(H_CONFIG) from the target system"
+ @exit 1
+
+else
+
$(H_CONFIG) : $(FPTOOLS_TOP)/mk/config.h $(FPTOOLS_TOP)/mk/config.mk
$(H_CONFIG) : Makefile
$(H_CONFIG) : $(FPTOOLS_TOP)/mk/config.h $(FPTOOLS_TOP)/mk/config.mk
$(H_CONFIG) : Makefile
@echo "#endif /* __GHCAUTOCONF_H__ */" >> $@
@echo "Done."
@echo "#endif /* __GHCAUTOCONF_H__ */" >> $@
@echo "Done."
$(H_PLATFORM) : Makefile
@echo "Creating $@..."
@$(RM) $@
$(H_PLATFORM) : Makefile
@echo "Creating $@..."
@$(RM) $@
all :: DerivedConstants.h
all :: DerivedConstants.h
+ifneq "$(TARGETPLATFORM)" "$(HOSTPLATFORM)"
+
+DerivedConstants.h :
+ @echo "*** Cross-compiling: please copy DerivedConstants.h from the target system"
+ @exit 1
+
+else
+
mkDerivedConstants.c : $(H_CONFIG)
mkDerivedConstantsHdr : mkDerivedConstants.o
mkDerivedConstants.c : $(H_CONFIG)
mkDerivedConstantsHdr : mkDerivedConstants.o
DerivedConstants.h : mkDerivedConstantsHdr
./mkDerivedConstantsHdr >$@
DerivedConstants.h : mkDerivedConstantsHdr
./mkDerivedConstantsHdr >$@
CLEAN_FILES += mkDerivedConstantsHdr$(exeext) DerivedConstants.h
# -----------------------------------------------------------------------------
CLEAN_FILES += mkDerivedConstantsHdr$(exeext) DerivedConstants.h
# -----------------------------------------------------------------------------
+ifneq "$(TARGETPLATFORM)" "$(HOSTPLATFORM)"
+
+GHCConstants.h :
+ @echo "*** Cross-compiling: please copy DerivedConstants.h from the target system"
+ @exit 1
+
+else
+
mkGHCConstants : mkGHCConstants.o
$(CC) -o $@ $(CC_OPTS) $(LD_OPTS) mkGHCConstants.o
mkGHCConstants : mkGHCConstants.o
$(CC) -o $@ $(CC_OPTS) $(LD_OPTS) mkGHCConstants.o
GHCConstants.h : mkGHCConstants
./mkGHCConstants >$@
GHCConstants.h : mkGHCConstants
./mkGHCConstants >$@
CLEAN_FILES += mkGHCConstants$(exeext) GHCConstants.h
# ---------------------------------------------------------------------------
CLEAN_FILES += mkGHCConstants$(exeext) GHCConstants.h
# ---------------------------------------------------------------------------