Browse Source

* better check for makefile.fpc
* check if cmp exists

peter 26 years ago
parent
commit
8a7250cdc6
2 changed files with 43 additions and 9 deletions
  1. 18 1
      base/makefile.fpc
  2. 25 8
      compiler/Makefile

+ 18 - 1
base/makefile.fpc

@@ -235,6 +235,16 @@ export DIFF:=$(firstword $(DIFF))
 endif
 endif
 
+# cmp
+ifndef CMP
+CMP=$(strip $(wildcard $(addsuffix /cmp$(EXEEXT),$(SEARCHPATH))))
+ifeq ($(CMP),)
+CMP=
+else
+export CMP:=$(firstword $(CMP))
+endif
+endif
+
 # echo
 ifndef ECHO
 ECHO=$(strip $(wildcard $(addsuffix /echo$(EXEEXT),$(SEARCHPATH))))
@@ -888,6 +898,9 @@ endif
 ifdef DIFF
 	@$(ECHO)  Diff...... $(DIFF)
 endif
+ifdef CMP
+	@$(ECHO)  Cmp....... $(CMP)
+endif
 ifdef UPX
 	@$(ECHO)  Upx....... $(UPX)
 endif
@@ -955,7 +968,11 @@ endif #NODEFAULTRULES
 
 #
 # $Log$
-# Revision 1.8  1999-03-09 01:35:47  peter
+# Revision 1.9  1999-03-11 17:54:00  peter
+#   * better check for makefile.fpc
+#   * check if cmp exists
+#
+# Revision 1.8	1999/03/09 01:35:47  peter
 #   * makefile.fpc updates and defaultfpcdir var
 #
 #

+ 25 - 8
compiler/Makefile

@@ -74,6 +74,11 @@ EXTRAINSTALL=myinstall
 #####################################################################
 
 # test if FPCMAKE is still valid
+ifndef FPCMAKE
+ifdef FPCDIR
+FPCMAKE=$(FPCDIR)/makefile.fpc
+endif
+endif
 ifdef FPCMAKE
 ifeq ($(strip $(wildcard $(FPCMAKE))),)
 FPCDIR=
@@ -96,13 +101,19 @@ endif
 endif
 
 override FPCMAKE:=$(strip $(wildcard $(FPCMAKE)))
-ifeq ($(FPCMAKE),)
-nofpcmake:
+ifndef FPCMAKE
+testfpcmake:
 	@echo makefile.fpc not found!
 	@echo Check the FPCMAKE and FPCDIR environment variables.
-	@exit
+	@stopnow
+ifndef NODEFAULTALL
+all: testfpcmake
+endif
+install: testfpcmake
+clean: testfpcmake
 else
 include $(FPCMAKE)
+testfpcmake:
 endif
 
 
@@ -133,7 +144,9 @@ override RTLOPTS+=$(OPT)
 MSGFILE=error$(LANGUAGE).msg
 
 ifeq ($(OS_TARGET),win32)
-override DIFF=cmp -i138
+ifdef CMP
+override DIFF:=$(CMP) -i138
+endif
 endif
 
 # Used to avoid unnecessary steps in remake3
@@ -167,7 +180,7 @@ MSG2INC=msg2inc$(EXEEXT)
 # Default makefile
 #####################################################################
 
-all: $(EXENAME)
+all: testfpcmake $(EXENAME)
 	$(MAKE) echotime
 
 ifeq ($(MAKELEVEL),0)
@@ -204,7 +217,7 @@ next :
 	$(MAKE) all
 endif
 
-clean :
+clean : testfpcmake
 	-$(DEL) *$(OEXT) *$(PPUEXT) *$(ASMEXT) *$(STATICLIBEXT) $(EXENAME)
 	-$(DELTREE) $(SMARTEXT)
 
@@ -277,7 +290,7 @@ $(TEMPNAME3) : $(TEMPNAME2)
 	-$(DEL) $(TEMPNAME3)
 	$(MOVE) $(EXENAME) $(TEMPNAME3)
 
-cycle:
+cycle: testfpcmake
 	$(MAKE) clean
 	$(MAKE) -C $(RTLDIR) libsclean
 	$(MAKE) -C $(RTLDIR) 'OPT=$(RTLOPTS)' all
@@ -361,7 +374,11 @@ $(M68KEXENAME): $(PASFILES) $(INCFILES)
 
 #
 # $Log$
-# Revision 1.19  1999-03-10 12:30:12  pierre
+# Revision 1.20  1999-03-11 17:54:01  peter
+#   * better check for makefile.fpc
+#   * check if cmp exists
+#
+# Revision 1.19  1999/03/10 12:30:12  pierre
 #  + override EXECPPAS if LOCALOPT contains win32
 #
 # Revision 1.18  1999/03/09 01:35:48  peter