mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-12 13:06:18 +02:00
+ zipinstall
+ use upx if found * solve problems with PATH caused due the \ in the path
This commit is contained in:
parent
2f38be7291
commit
c4811947cc
@ -26,6 +26,9 @@ override RELEASEVER:=0.99.11
|
|||||||
# define inWinNT when running under WinNT
|
# define inWinNT when running under WinNT
|
||||||
#####################################################################
|
#####################################################################
|
||||||
|
|
||||||
|
# We want only / in the path !
|
||||||
|
override PATH:=$(subst \,/,$(PATH))
|
||||||
|
|
||||||
PWD=$(strip $(wildcard $(addsuffix /pwd.exe,$(subst ;, ,$(PATH)))))
|
PWD=$(strip $(wildcard $(addsuffix /pwd.exe,$(subst ;, ,$(PATH)))))
|
||||||
ifeq ($(PWD),)
|
ifeq ($(PWD),)
|
||||||
PWD=$(strip $(wildcard $(addsuffix /pwd,$(subst :, ,$(PATH)))))
|
PWD=$(strip $(wildcard $(addsuffix /pwd,$(subst :, ,$(PATH)))))
|
||||||
@ -250,6 +253,27 @@ SED:=$(subst \,/,$(firstword $(SED)))
|
|||||||
endif
|
endif
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
# Look if UPX is found for go32v2 and win32
|
||||||
|
ifeq ($(OS_TARGET),go32v2)
|
||||||
|
UPX=1
|
||||||
|
endif
|
||||||
|
ifeq ($(OS_TARGET),win32)
|
||||||
|
UPX=1
|
||||||
|
endif
|
||||||
|
ifdef UPX
|
||||||
|
UPX=$(strip $(wildcard $(addsuffix /upx.exe,$(subst ;, ,$(PATH)))))
|
||||||
|
ifeq ($(UPX),)
|
||||||
|
UPX=
|
||||||
|
endif
|
||||||
|
else
|
||||||
|
UPX=
|
||||||
|
endif
|
||||||
|
|
||||||
|
# Zip
|
||||||
|
ifndef ZIP
|
||||||
|
ZIP=zip -D9 -r
|
||||||
|
endif
|
||||||
|
|
||||||
|
|
||||||
#####################################################################
|
#####################################################################
|
||||||
# Default Directories
|
# Default Directories
|
||||||
@ -319,6 +343,11 @@ BININSTALLDIR=$(BASEINSTALLDIR)/bin/$(OS_TARGET)
|
|||||||
endif
|
endif
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
# set the directory where to install extra files
|
||||||
|
ifndef EXTRAINSTALLDIR
|
||||||
|
EXTRAINSTALLDIR=$(BININSTALLDIR)
|
||||||
|
endif
|
||||||
|
|
||||||
# Where the .msg files will be stored
|
# Where the .msg files will be stored
|
||||||
ifndef MSGINSTALLDIR
|
ifndef MSGINSTALLDIR
|
||||||
ifdef inlinux
|
ifdef inlinux
|
||||||
@ -410,6 +439,9 @@ override PPOPT+=$(addprefix -Fl,$(NEEDLIBDIR))
|
|||||||
endif
|
endif
|
||||||
|
|
||||||
# Object dirs
|
# Object dirs
|
||||||
|
ifdef OBJDIR
|
||||||
|
override PPOPT+=$(addprefix -Fo,$(OBJDIR))
|
||||||
|
endif
|
||||||
ifdef NEEDOBJDIR
|
ifdef NEEDOBJDIR
|
||||||
override PPOPT+=$(addprefix -Fo,$(NEEDOBJDIR))
|
override PPOPT+=$(addprefix -Fo,$(NEEDOBJDIR))
|
||||||
endif
|
endif
|
||||||
@ -631,6 +663,10 @@ install : all
|
|||||||
ifndef DEFAULTUNITS
|
ifndef DEFAULTUNITS
|
||||||
ifdef EXEOBJECTS
|
ifdef EXEOBJECTS
|
||||||
$(MKDIR) $(BININSTALLDIR)
|
$(MKDIR) $(BININSTALLDIR)
|
||||||
|
# Compress the exes if upx is defined
|
||||||
|
ifdef UPX
|
||||||
|
-$(UPX) $(EXEFILES)
|
||||||
|
endif
|
||||||
$(INSTALLEXE) $(EXEFILES) $(BININSTALLDIR)
|
$(INSTALLEXE) $(EXEFILES) $(BININSTALLDIR)
|
||||||
endif
|
endif
|
||||||
endif
|
endif
|
||||||
@ -643,6 +679,9 @@ else
|
|||||||
-$(INSTALL) $(UNITOFILES) $(UNITINSTALLDIR)
|
-$(INSTALL) $(UNITOFILES) $(UNITINSTALLDIR)
|
||||||
endif
|
endif
|
||||||
endif
|
endif
|
||||||
|
ifdef INSTALLEXTRA
|
||||||
|
$(INSTALL) $(INSTALLEXTRA) $(EXTRAINSTALLDIR)
|
||||||
|
endif
|
||||||
|
|
||||||
|
|
||||||
staticlibinstall: staticlib
|
staticlibinstall: staticlib
|
||||||
@ -662,6 +701,32 @@ sharedlibinstall: sharedlib
|
|||||||
libinstall: staticlibinstall sharedlibinstall
|
libinstall: staticlibinstall sharedlibinstall
|
||||||
|
|
||||||
|
|
||||||
|
#####################################################################
|
||||||
|
# Zip
|
||||||
|
#####################################################################
|
||||||
|
|
||||||
|
# Temporary path to pack a file
|
||||||
|
ifndef PACKDIR
|
||||||
|
PACKDIR=pack_tmp
|
||||||
|
endif
|
||||||
|
|
||||||
|
# Test dir if none specified
|
||||||
|
ifndef PACKAGEDIR
|
||||||
|
PACKAGEDIR=$(BASEDIR)
|
||||||
|
endif
|
||||||
|
|
||||||
|
zipinstall:
|
||||||
|
# Some checks first
|
||||||
|
ifndef ZIPNAME
|
||||||
|
@echo Please specify ZIPNAME!
|
||||||
|
@exit
|
||||||
|
endif
|
||||||
|
make install BASEINSTALLDIR=$(PACKDIR)
|
||||||
|
cd $(PACKDIR)
|
||||||
|
$(ZIP) $(PACKAGEDIR)/$(ZIPNAME) *
|
||||||
|
cd $(BASEDIR)
|
||||||
|
$(DELTREE) $(PACKDIR)
|
||||||
|
|
||||||
#####################################################################
|
#####################################################################
|
||||||
# Clean rules
|
# Clean rules
|
||||||
#####################################################################
|
#####################################################################
|
||||||
@ -707,6 +772,9 @@ cfginfo:
|
|||||||
@echo Pwd....... $(PWD)
|
@echo Pwd....... $(PWD)
|
||||||
ifdef SED
|
ifdef SED
|
||||||
@echo Sed....... $(SED)
|
@echo Sed....... $(SED)
|
||||||
|
endif
|
||||||
|
ifdef UPX
|
||||||
|
@echo Upx....... $(UPX)
|
||||||
endif
|
endif
|
||||||
@echo
|
@echo
|
||||||
|
|
||||||
@ -732,6 +800,7 @@ installinfo:
|
|||||||
@echo SharedLibInstallDir.. $(SHARED_LIBINSTALLDIR)
|
@echo SharedLibInstallDir.. $(SHARED_LIBINSTALLDIR)
|
||||||
@echo MsgInstallDir........ $(MSGINSTALLDIR)
|
@echo MsgInstallDir........ $(MSGINSTALLDIR)
|
||||||
@echo DocInstallDir........ $(DOCINSTALLDIR)
|
@echo DocInstallDir........ $(DOCINSTALLDIR)
|
||||||
|
@echo ExtraInstallDir...... $(EXTRAINSTALLDIR)
|
||||||
@echo
|
@echo
|
||||||
|
|
||||||
# try to get the files in the currentdir
|
# try to get the files in the currentdir
|
||||||
|
Loading…
Reference in New Issue
Block a user