Bug 54753 - template perl script error (--prefix)
Summary: template perl script error (--prefix)
Status: CLOSED INTENTIONAL
Alias: None
Product: kdevelop
Classification: Applications
Component: general (show other bugs)
Version: unspecified
Platform: unspecified Linux
: NOR normal
Target Milestone: ---
Assignee: KDevelop-Devel List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2003-02-17 13:41 UTC by Patrick Girard
Modified: 2003-03-04 09:09 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Patrick Girard 2003-02-17 13:41:09 UTC
Version:           Alpha3 (using KDE KDE 3.1)
Installed from:    Unlisted Binary Package
Compiler:          gcc3.2 
OS:          Linux

I installed Alpha3 using --prefix=/usr
and everything is fine except that if i try the template wizard i have to go change the
'script' file for every template because it did not change the -I/usr/local/kde/share/apps/kdevappwizard/template-common to (line 1)

-I/usr/share/apps/kdevappwizard/template-common/ (using the right prefix)

so i solved it manually but it sucks having to do that since the --prefix flag should do that for me.
Comment 1 Caleb Tennis 2003-02-23 15:50:46 UTC
I'm unsure of a way around this automatically using autotools.  I think the 
best solution is to run a "make distclean" on that directory, if not on 
kdevelop itself when changing installation directories. 
 
Caleb 
Comment 2 Caleb Tennis 2003-02-23 21:18:22 UTC
I think I found a way to fix this.  Should be updated in CVS. 
Comment 3 Chris Halls 2003-02-28 13:02:24 UTC
I'm afraid that the commits for this bug have broken the ability to do 'make
install DESTDIR=/path/to/dir', such as used when building .debs.  The reason is,
the generated Makefile.ins look like this:


install-data-local: script.local
        $(INSTALL_DATA) script.local $(DESTDIR)$(chellodir)/script
#>-     rm script.local
#>+ 1
        rm $(DESTDIR)script.local

So 'make install DESDIR=/path/to/dir' would end up trying to:
  rm /path/to/dirscript.local

Which doesn't exist, obviously.

Removing the 'rm' line in all the Makefile.am's works for me, but I'm not sure
why it was there in the first place and whether it is necessary.

Chris
Comment 4 Chris Halls 2003-02-28 13:04:41 UTC
I'm afraid that the commits for this bug have broken the ability to do 'make
install DESTDIR=/path/to/dir', such as used when building .debs.  The reason is,
the generated Makefile.ins look like this:


install-data-local: script.local
        $(INSTALL_DATA) script.local $(DESTDIR)$(chellodir)/script
#>-     rm script.local
#>+ 1
        rm $(DESTDIR)script.local

So 'make install DESDIR=/path/to/dir' would end up trying to:
  rm /path/to/dirscript.local

Which doesn't exist, obviously.

Removing the 'rm' line in all the Makefile.am's works for me, but I'm not sure
why it was there in the first place and whether it is necessary.

Chris
Comment 5 Caleb Tennis 2003-02-28 14:04:51 UTC
Ugh. 
 
It's there because if you rerun ./configure and change the --prefix directory, those changes 
do not get saved into the script.local files.  Removing them was a dirty hack in order to force 
them to be remade each time.  Someone with a better working knowledge of autotools might 
be able to help us out here.  
Comment 6 Caleb Tennis 2003-02-28 14:12:40 UTC
Could you check if using the following works: 
 
Instead of: 
 
rm script.local 
 
try 
 
rm ${srcdir}/script.local 
 
 
Comment 7 Chris Halls 2003-03-03 16:27:24 UTC
I don't think that will help either.  I get this in the generated Makefile.in:

#>-     rm ${srcdir}/script.local
#>+ 1
        rm $(DESTDIR)${srcdir}/script.local

BTW, looks like Ralf already removed these lines from the Makefile.am in CVS.
Comment 8 Chris Halls 2003-03-04 09:09:32 UTC
ok, my rebuild finished, and to confirm:

/bin/sh ../../../admin/mkinstalldirs
/home/challs/kde/kdevelop/debian/tmp/usr/share/apps/kdevappwizard/template-pyqt
mkdir -p --
/home/challs/kde/kdevelop/debian/tmp/usr/share/apps/kdevappwizard/template-pyqt
install -p -c -m 644 script.local
/home/challs/kde/kdevelop/debian/tmp/usr/share/apps/kdevappwizard/template-pyqt/script
rm /home/challs/kde/kdevelop/debian/tmp./script.local
rm: cannot remove `/home/challs/kde/kdevelop/debian/tmp./script.local': No such
file or directory
make[5]: *** [install-data-local] Error 1