Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / fpc-pascal / 2007-08

fpcmake: setting names of zip files

3 messages · 2 people · –

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Marc Santhoff

Hi again,

how can the name of the files created by the targets "zipinstall" and "zipsourceinstall" be influenced?

I've tried this way:

<Makefile.fpc>
[prerules]
pretest:
echo $(ZIPNAME)
echo $(ZIP_ZIPNAME)

[target]
programs=cnfdat2h5

[package]
name=cnfdat2h5
version=0.1

[compiler]
options=-B
targetdir=obj

[dist]
destdir=$(BASEDIR)/dist
#destdir=$(shell pwd)/dist

[default]
fpcdir=/home/marc/fpc/share/src/fpc-2.0.2

[zip]
zipname=MyZipName
</Makefile.fpc>

to no avail:

<console>
$ fpcmake
Processing Makefile.fpc
freebsd-i386 requires: rtl
freebsd-m68k requires: rtl
freebsd-x86_64 requires: rtl
Writing Makefile
$ gmake pretest
echo cnfdat2h5freebsd
cnfdat2h5freebsd
echo

$
</console>

Running the zipinstall and zipsourceinstall targets give me files with the unchanged standard name. The final goal would be to have a name formed like

$(PACKAGE_NAME)-$(PACKAGE_VERSION).tar.gz

for distribution.

How can it be done?

TIA,
Marc

Peter Vreman
to Marc Santhoff
Show quoted text 61 lines
Hi again, how can the name of the files created by the targets "zipinstall" and "zipsourceinstall" be influenced? I've tried this way: <Makefile.fpc> [prerules] pretest: echo $(ZIPNAME) echo $(ZIP_ZIPNAME) [target] programs=cnfdat2h5 [package] name=cnfdat2h5 version=0.1 [compiler] options=-B targetdir=obj [dist] destdir=$(BASEDIR)/dist #destdir=$(shell pwd)/dist [default] fpcdir=/home/marc/fpc/share/src/fpc-2.0.2 [zip] zipname=MyZipName </Makefile.fpc> to no avail: <console> $ fpcmake Processing Makefile.fpc freebsd-i386 requires: rtl freebsd-m68k requires: rtl freebsd-x86_64 requires: rtl Writing Makefile $ gmake pretest echo cnfdat2h5freebsd cnfdat2h5freebsd echo $ </console> Running the zipinstall and zipsourceinstall targets give me files with the unchanged standard name. The final goal would be to have a name formed like $(PACKAGE_NAME)-$(PACKAGE_VERSION).tar.gz for distribution. How can it be done?

The variable FULLZIPNAME can be set for this.

See the generated Makefile how the variables are set and which default values are taken.

Peter

Marc Santhoff
to Peter Vreman
Peter Vreman wrote 13 lines
> Running the zipinstall and zipsourceinstall targets give me files with > the unchanged standard name. The final goal would be to have a name > formed like > > $(PACKAGE_NAME)-$(PACKAGE_VERSION).tar.gz > > for distribution. > > How can it be done? The variable FULLZIPNAME can be set for this. See the generated Makefile how the variables are set and which default values are taken.

So there is no reserved section and keyword for this task.

Actually I had to use $ZIPNAME for making it work, but it is done now. I think that's a matter of using fpc 2.0.2 and 2.0.4 ...

If anyone is interested:
ZIPNAME=$(ZIPPREFIX)$(PACKAGE_NAME)-$(PACKAGE_VERSION).$(ZIPSUFFIX)

gives me the desired name plus the obvious "freebsd" for target OS or "src" inserted, which I'm happy with.

One (hopefully) last question:
How is the [zip] section and the "name" keyword I tried expected to work, what does it do?

Many thanks,
Marc