[fpc-devel] svn and make install

Ludo Brands ludo.brands at free.fr
Sat Aug 6 13:43:18 CEST 2011


Dear all,

On windows, "make install" copies .svn subdirectories from the
packages/xxx/examples/ directories to the new examples/xxx/ directories.
First time examples/xxx/ doesn't exist and all is fine. Second make install
causes following error:
...
make[5]: Leaving directory `C:/lazarus/fpc/svn/packages/regexpr/examples'
C:/lazarus/fpc/2.4.3/bin/i386-win32/ginstall.exe -m 755 -d
C:\lazarus\fpc\svn/examples/regexpr
C:/lazarus/fpc/2.4.3/bin/i386-win32/cp.exe -Rfp examples/*
C:\lazarus\fpc\svn/examples/regexpr
cp.exe: cannot remove old link to
`C:/lazarus/fpc/svn/examples/regexpr/.svn/all-wcprops': Permission denied
cp.exe: cannot remove old link to
`C:/lazarus/fpc/svn/examples/regexpr/.svn/dir-prop-base': Permission denied
cp.exe: cannot remove old link to
`C:/lazarus/fpc/svn/examples/regexpr/.svn/entries': Permission denied
cp.exe: cannot remove old link to
`C:/lazarus/fpc/svn/examples/regexpr/.svn/prop-base/Makefile.fpc.svn-base':
Permission denied
...

The permission denied comes probably from the read-only attribute of .svn
files. 

The easiest solution I've found is to delete the examples directory before
running make install.

A more lasting solution would be to change the makefile to execute instead
of; 

C:/lazarus/fpc/2.4.3/bin/i386-win32/ginstall.exe -m 755 -d
C:\lazarus\fpc\svn/examples/regexpr
C:/lazarus/fpc/2.4.3/bin/i386-win32/cp.exe -Rfp examples/*
C:\lazarus\fpc\svn/examples/regexpr

the following:

C:/lazarus/fpc/2.4.3/bin/i386-win32/ginstall.exe -m 755 -d
C:\lazarus\fpc\svn/examples/regexpr
C:/lazarus/fpc/2.4.3/bin/i386-win32/rm.exe -rf
C:\lazarus\fpc\svn/examples/regexpr
C:/lazarus/fpc/2.4.3/bin/i386-win32/cp.exe -Rfp examples/*
C:\lazarus\fpc\svn/examples/regexpr

Something along the lines of ( added $(DELTREE) $(INSTALL_EXAMPLEDIR) ):

fpc_exampleinstall: $(addsuffix _distclean,$(TARGET_EXAMPLEDIRS))
ifdef HASEXAMPLES
	$(MKDIR) $(INSTALL_EXAMPLEDIR)
	$(DELTREE) $(INSTALL_EXAMPLEDIR) 
endif
ifdef EXAMPLESOURCEFILES
	$(COPY) $(EXAMPLESOURCEFILES) $(INSTALL_EXAMPLEDIR)
endif
ifdef TARGET_EXAMPLEDIRS
	$(COPYTREE) $(addsuffix /*,$(TARGET_EXAMPLEDIRS))
$(INSTALL_EXAMPLEDIR)
endif

Ludo




More information about the fpc-devel mailing list