EXPLAINING: DESTDIR and autoconf/automake

W. Tasin tasin at e-technik.fh-muenchen.de
Thu Mar 2 22:32:58 UTC 2000

Hello together,

Ralf Funken asked me to explain him the problem with ktranslator and the
problem about creating rpm-binaries with it. I think it is something you
all should know because we have to look at it for the new project

Makefile.am and own written "install" rules inside.
For example:
   $(mkinstalldirs) $(kde_appsdir)/Applications/
   $(INSTALL_DATA) ktranslator.kdelnk
as you can see this take no care of DESTDIR.

it should be at the end (means in the Makefile):
   $(mkinstalldirs) $(DESTDIR)$(kde_appsdir)/Applications/
   $(INSTALL_DATA) ktranslator.kdelnk
Now you may ask: Why kdevelop doesn´t have a problem with this, there
are also own written install-data-local rules? 
The answer is the magic "perl am_edit" call. This call modifies all the
Makefile.in, which are generated by "automake"....

"perl automoc" (which is used in some of our templates) doesn´t do

If you want to use "perl am_edit", so don´t forget to make new rule for
creation of a distribution, I mean the "make dist" call.

So you have to insert at the top-level Makefile.am the following lines
at the beginning of the file:
        perl am_edit

I found out another possibility to do this. Instead of writing an own
install-data-local rule, it is also possible to do the following in the
Makefile.am (but I think it is only for automake 1.4):

applnk_DATA = ktranslator.kdelnk
applnkdir = $(kde_appsdir)/Applications

another example of Makefile.am I used for the "new" ktranslator:


EXTRA_DIST =  $(wildcard *.xpm) $(wildcard *.gif)
toolbar_DATA = header.xpm copy-string.xpm prev-fuzzy.xpm mosearch.xpm \
               posearch.xpm next-fuzzy.xpm spellcheck.xpm idea.xpm
toolbardir = $(kde_toolbardir)
iconsmini_DATA = mini-cross.xpm  mini-exp.xpm mini-exclam.xpm
iconsminidir = $(kde_icondir)/mini/
icon_DATA = ktranslator.xpm
icondir = $(kde_icondir)
pics_DATA = about.gif
picsdir =

That´s all folks


oohhh sveglia.... il mondo e' ammalato, ma x colpa di chi.........
:-------W. Tasin, FB 04,
<Key-Fingerprint: 1610 835F 0080 32F4 6140  6CF7 A7D0 44CD 7961A645>

More information about the KDevelop-devel mailing list