Bug 110479

Summary: headers in noinst / install
Product: [Applications] kdevelop Reporter: Pablo Yaggi <pyaggi>
Component: Build tools: AutomakeAssignee: kdevelop-bugs-null
Status: RESOLVED INTENTIONAL    
Severity: normal CC: relanikas
Priority: NOR    
Version: 3.2.2   
Target Milestone: ---   
Platform: Mandriva RPMs   
OS: Linux   
Latest Commit: Version Fixed In:
Sentry Crash Report:

Description Pablo Yaggi 2005-08-09 19:35:41 UTC
Version:           3.2.2 (using KDE KDE 3.3.2)
Installed from:    Mandriva RPMs
Compiler:          gcc (GCC) 3.4.3 (Mandrakelinux 10.2 3.4.3-7mdk)  
OS:                Linux

When you create a target "header" with prefix "include" in a library project, with Automake Manager an new target with the name "Headers in install" appears, but when you right click on it and select the create new file option the new file (if you create a header) goes directly to "Headers in noinst", same thing happens with the header file if you user the "New class wizard".
If you use the option "add existing file" it works fine, so a work around
is to create a header (or use the wizard) and the add it to the "Headers in install" target and then delete it from "Headers in noinst".
You can also leave the header in "Headers in noinst" no harm is done, but automake doesn't requieres it, and managment gets heavy with a bunch of repeated files.
Comment 1 Jens Dagerbo 2007-01-06 08:55:48 UTC
Hmm.. I think this works reasonably well. 

The "headers in no-inst" is a pseudo-target that the Automake Manager uses in order to keep track of header files that are not in any other way listed in any Makefile.am file. This is done to have those files also "part of the project" which is needed, among other things, for the language parser to be aware of them.

Most of the time, you don't want to list the header file in the Makefile.am, so defaulting to "headers in noinst" creates the least bit of work for the user for the typical use case. If you want the header to be listed in install (or some other target) it is, as you say, just a matter of adding it to that target. The next time you load the project, the header will then only appear in the install target, not in the noinst target.

Yes, it would be slightly nicer if the header was removed from noinst when you added it somewhere else, but this would be inconsistent with other targets and adds further complexity to the AM. I simply doubt we want to do this for such a minor gain. WONTFIX.

Comment 2 Anon User 2008-12-29 13:14:02 UTC
1. if i create separate target for headers, name: headers, part/section: includes then it would create such target, and i would be able to add files to it, and it even would install everything correctly to /usr/include, but once you reopen project, every header appears in <blank>(headers noinst).

2. if i create headers in package includes(pkgincludes) then it doesn't seem to append package's name to /usr/include path...
and if i reopen project - all header files again in (headers noinst)

also Makefile.AM has a line like _HEADERS, or name_HEADERS for named header target. IIRC <blank>_HEADERS would even produce some compilation warning, like variable unused or smth..

i'm using version of kdevelop from debian unstable repositories(fetched ~week ago)