|
@@ -1,5 +1,5 @@
|
|
|
#
|
|
|
-# Makefile generated by fpcmake v1.00 [2000/12/19]
|
|
|
+# Makefile generated by fpcmake v1.00 [2001/01/30]
|
|
|
#
|
|
|
|
|
|
defaultrule: all
|
|
@@ -50,6 +50,25 @@ else
|
|
|
SRCEXEEXT=.exe
|
|
|
endif
|
|
|
|
|
|
+# The extension of batch files / scripts
|
|
|
+ifdef inUnix
|
|
|
+BATCHEXT=.sh
|
|
|
+else
|
|
|
+ifdef inOS2
|
|
|
+BATCHEXT=.cmd
|
|
|
+else
|
|
|
+BATCHEXT=.bat
|
|
|
+endif
|
|
|
+endif
|
|
|
+
|
|
|
+# Path Separator, the subst trick is necessary for the \ that can't exists
|
|
|
+# at the end of a line
|
|
|
+ifdef inUnix
|
|
|
+PATHSEP=/
|
|
|
+else
|
|
|
+PATHSEP=$(subst /,\,/)
|
|
|
+endif
|
|
|
+
|
|
|
# The path which is searched separated by spaces
|
|
|
ifdef inUnix
|
|
|
SEARCHPATH=$(subst :, ,$(PATH))
|
|
@@ -296,15 +315,7 @@ LD=ld
|
|
|
endif
|
|
|
|
|
|
# ppas.bat / ppas.sh
|
|
|
-ifdef inUnix
|
|
|
-PPAS=ppas.sh
|
|
|
-else
|
|
|
-ifdef inOS2
|
|
|
-PPAS=ppas.cmd
|
|
|
-else
|
|
|
-PPAS=ppas.bat
|
|
|
-endif
|
|
|
-endif
|
|
|
+PPAS=ppas$(BATCHEXT)
|
|
|
|
|
|
# ldconfig to rebuild .so cache
|
|
|
ifdef inUnix
|
|
@@ -1018,13 +1029,14 @@ override INSTALLPPUFILES+=$(addsuffix $(PPUEXT),$(EXTRAINSTALLUNITS))
|
|
|
endif
|
|
|
|
|
|
ifdef INSTALLPPUFILES
|
|
|
-override INSTALLPPUFILES:=$(addprefix $(UNITTARGETDIRPREFIX),$(INSTALLPPUFILES))
|
|
|
ifdef PPUFILES
|
|
|
-INSTALLPPULINKFILES:=$(shell $(PPUFILES) -S -O $(INSTALLPPUFILES))
|
|
|
+override INSTALLPPUFILES:=$(addprefix $(UNITTARGETDIRPREFIX),$(INSTALLPPUFILES))
|
|
|
+override INSTALLPPULINKFILES:=$(addprefix $(UNITTARGETDIRPREFIX),$(shell $(PPUFILES) -S -O $(INSTALLPPUFILES)))
|
|
|
else
|
|
|
-INSTALLPPULINKFILES:=$(wildcard $(subst $(PPUEXT),$(OEXT),$(INSTALLPPUFILES)) $(addprefix $(LIBPREFIX),$(subst $(PPUEXT),$(STATICLIBEXT),$(INSTALLPPUFILES))))
|
|
|
+override INSTALLPPULINKFILES:=$(subst $(PPUEXT),$(OEXT),$(INSTALLPPUFILES)) $(addprefix $(LIBPREFIX),$(subst $(PPUEXT),$(STATICLIBEXT),$(INSTALLPPUFILES)))
|
|
|
+override INSTALLPPUFILES:=$(addprefix $(UNITTARGETDIRPREFIX),$(INSTALLPPUFILES))
|
|
|
+override INSTALLPPULINKFILES:=$(wildcard $(addprefix $(UNITTARGETDIRPREFIX),$(INSTALLPPULINKFILES)))
|
|
|
endif
|
|
|
-override INSTALLPPULINKFILES:=$(addprefix $(UNITTARGETDIRPREFIX),$(INSTALLPPULINKFILES))
|
|
|
endif
|
|
|
|
|
|
ifdef INSTALLEXEFILES
|
|
@@ -1135,7 +1147,7 @@ endif
|
|
|
# Temporary path to pack a file
|
|
|
ifndef PACKDIR
|
|
|
ifndef inUnix
|
|
|
-PACKDIR=$(BASEDIR)/pack_tmp
|
|
|
+PACKDIR=$(BASEDIR)/../pack_tmp
|
|
|
else
|
|
|
PACKDIR=/tmp/fpc-pack
|
|
|
endif
|
|
@@ -1155,18 +1167,48 @@ USETAR=1
|
|
|
endif
|
|
|
endif
|
|
|
|
|
|
+# Use a wrapper script by default for OS/2
|
|
|
+ifdef inOS2
|
|
|
+USEZIPWRAPPER=1
|
|
|
+endif
|
|
|
+
|
|
|
+# Create commands to create the zip/tar file
|
|
|
+ZIPWRAPPER=$(DESTZIPDIR)/fpczip$(BATCHEXT)
|
|
|
+ZIPCMD_CDPACK:=cd $(subst /,$(PATHSEP),$(PACKDIR))
|
|
|
+ZIPCMD_CDBASE:=cd $(subst /,$(PATHSEP),$(BASEDIR))
|
|
|
+ifdef USETAR
|
|
|
+ZIPDESTFILE:=$(DESTZIPDIR)/$(ZIPNAME)$(TAREXT)
|
|
|
+ZIPCMD_ZIP:=$(TARPROG) cf$(TAROPT) $(ZIPDESTFILE) *
|
|
|
+else
|
|
|
+ZIPDESTFILE:=$(DESTZIPDIR)/$(ZIPNAME)$(ZIPEXT)
|
|
|
+ZIPCMD_ZIP:=$(subst /,$(PATHSEP),$(ZIPPROG)) -Dr $(ZIPOPT) $(ZIPDESTFILE) *
|
|
|
+endif
|
|
|
+
|
|
|
fpc_zipinstall:
|
|
|
ifndef ZIPNAME
|
|
|
@$(ECHO) "Please specify ZIPNAME!"
|
|
|
@exit 1
|
|
|
else
|
|
|
$(MAKE) $(ZIPTARGET) PREFIXINSTALLDIR=$(PACKDIR)
|
|
|
-ifdef USETAR
|
|
|
- $(DEL) $(DESTZIPDIR)/$(ZIPNAME)$(TAREXT)
|
|
|
- cd $(PACKDIR) ; $(TARPROG) cf$(TAROPT) $(DESTZIPDIR)/$(ZIPNAME)$(TAREXT) * ; cd $(BASEDIR)
|
|
|
+ $(DEL) $(ZIPDESTFILE)
|
|
|
+ifdef USEZIPWRAPPER
|
|
|
+ifneq ($(ECHO),echo)
|
|
|
+ $(ECHO) "$(ZIPCMD_CDPACK)" > $(ZIPWRAPPER)
|
|
|
+ $(ECHO) "$(ZIPCMD_ZIP)" >> $(ZIPWRAPPER)
|
|
|
+ $(ECHO) "$(ZIPCMD_CDBASE)" >> $(ZIPWRAPPER)
|
|
|
+else
|
|
|
+ $(ECHO) $(ZIPCMD_CDPACK) > $(ZIPWRAPPER)
|
|
|
+ $(ECHO) $(ZIPCMD_ZIP) >> $(ZIPWRAPPER)
|
|
|
+ $(ECHO) $(ZIPCMD_CDBASE) >> $(ZIPWRAPPER)
|
|
|
+endif
|
|
|
+ifdef inUnix
|
|
|
+ /bin/sh $(ZIPWRAPPER)
|
|
|
+else
|
|
|
+ $(ZIPWRAPPER)
|
|
|
+endif
|
|
|
+ $(DEL) $(ZIPWRAPPER)
|
|
|
else
|
|
|
- $(DEL) $(DESTZIPDIR)/$(ZIPNAME)$(ZIPEXT)
|
|
|
- cd $(PACKDIR) ; $(ZIPPROG) -Dr $(ZIPOPT) $(DESTZIPDIR)/$(ZIPNAME)$(ZIPEXT) * ; cd $(BASEDIR)
|
|
|
+ $(ZIPCMD_CDPACK) ; $(ZIPCMD_ZIP) ; $(ZIPCMD_CDBASE)
|
|
|
endif
|
|
|
$(DELTREE) $(PACKDIR)
|
|
|
endif
|