mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-11 09:26:15 +02:00
* zipinstall wrapper
This commit is contained in:
parent
f2c918935a
commit
5161e326cc
File diff suppressed because it is too large
Load Diff
@ -49,6 +49,14 @@ else
|
|||||||
SRCEXEEXT=.exe
|
SRCEXEEXT=.exe
|
||||||
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
|
# The path which is searched separated by spaces
|
||||||
ifdef inUnix
|
ifdef inUnix
|
||||||
SEARCHPATH=$(subst :, ,$(PATH))
|
SEARCHPATH=$(subst :, ,$(PATH))
|
||||||
@ -1262,18 +1270,48 @@ USETAR=1
|
|||||||
endif
|
endif
|
||||||
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.bat
|
||||||
|
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:
|
fpc_zipinstall:
|
||||||
ifndef ZIPNAME
|
ifndef ZIPNAME
|
||||||
@$(ECHO) "Please specify ZIPNAME!"
|
@$(ECHO) "Please specify ZIPNAME!"
|
||||||
@exit 1
|
@exit 1
|
||||||
else
|
else
|
||||||
$(MAKE) $(ZIPTARGET) PREFIXINSTALLDIR=$(PACKDIR)
|
$(MAKE) $(ZIPTARGET) PREFIXINSTALLDIR=$(PACKDIR)
|
||||||
ifdef USETAR
|
$(DEL) $(ZIPDESTFILE)
|
||||||
$(DEL) $(DESTZIPDIR)/$(ZIPNAME)$(TAREXT)
|
ifdef USEZIPWRAPPER
|
||||||
cd $(PACKDIR) ; $(TARPROG) cf$(TAROPT) $(DESTZIPDIR)/$(ZIPNAME)$(TAREXT) * ; cd $(BASEDIR)
|
ifneq ($(ECHO),echo)
|
||||||
|
$(ECHO) "$(ZIPCMD_CDPACK)" > $(ZIPWRAPPER)
|
||||||
|
$(ECHO) "$(ZIPCMD_ZIP)" >> $(ZIPWRAPPER)
|
||||||
|
$(ECHO) "$(ZIPCMD_CDBASE)" >> $(ZIPWRAPPER)
|
||||||
else
|
else
|
||||||
$(DEL) $(DESTZIPDIR)/$(ZIPNAME)$(ZIPEXT)
|
$(ECHO) $(ZIPCMD_CDPACK) > $(ZIPWRAPPER)
|
||||||
cd $(PACKDIR) ; $(ZIPPROG) -Dr $(ZIPOPT) $(DESTZIPDIR)/$(ZIPNAME)$(ZIPEXT) * ; cd $(BASEDIR)
|
$(ECHO) $(ZIPCMD_ZIP) >> $(ZIPWRAPPER)
|
||||||
|
$(ECHO) $(ZIPCMD_CDBASE) >> $(ZIPWRAPPER)
|
||||||
|
endif
|
||||||
|
ifdef inUnix
|
||||||
|
/bin/sh $(ZIPWRAPPER)
|
||||||
|
else
|
||||||
|
$(ZIPWRAPPER)
|
||||||
|
endif
|
||||||
|
$(DEL) $(ZIPWRAPPER)
|
||||||
|
else
|
||||||
|
$(ZIPCMD_CDPACK) ; $(ZIPCMD_ZIP) ; $(ZIPCMD_CDBASE)
|
||||||
endif
|
endif
|
||||||
$(DELTREE) $(PACKDIR)
|
$(DELTREE) $(PACKDIR)
|
||||||
endif
|
endif
|
||||||
|
Loading…
Reference in New Issue
Block a user