[ 
https://issues.apache.org/jira/browse/THRIFT-2917?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14259675#comment-14259675
 ] 

Jens Geyer commented on THRIFT-2917:
------------------------------------

Root cause seems to be that the "clean" target removes the gen-c_glib folder 
including all contents, especially the hidden .deps folder created by 
configure. According to the [GNU 
guidelines|http://www.gnu.org/software/automake/manual/html_node/Clean.html#Clean]
 this should not be the case:

{quote}
As the GNU Standards aren’t always explicit as to which files should be removed 
by which rule, we’ve adopted a heuristic that we believe was first formulated 
by François Pinard: 

* If make built it, and it is commonly something that one would want to rebuild 
(for instance, a .o file), then mostlyclean should delete it. 
* Otherwise, *if make built it, then clean should delete it.* 
* *If configure built it, then distclean should delete it.*
* If the maintainer built it (for instance, a .info file), then 
maintainer-clean should delete it. However maintainer-clean should not delete 
anything that needs to exist in order to run ‘./configure && make’. 

We recommend that you follow this same set of heuristics in your Makefile.am. 
{quote}

As .deps is created by configure it should be deleted only by distclean, rather 
than clean.


> "make clean" breaks test/c_glib
> -------------------------------
>
>                 Key: THRIFT-2917
>                 URL: https://issues.apache.org/jira/browse/THRIFT-2917
>             Project: Thrift
>          Issue Type: Bug
>          Components: C glib - Library
>         Environment: openSUSE 13.2
>            Reporter: Jens Geyer
>
> Today I ran into a situation where I wanted to do a {{make clean}} in the 
> test/c_glib directory only. After that, the build was no longer possible and 
> always ended with:
> {code}
> $> make 
> Makefile:564: gen-c_glib/.deps/t_test_second_service.Plo: File or folder not 
> found
> Makefile:565: gen-c_glib/.deps/t_test_thrift_test.Plo: File or folder not 
> found
> Makefile:566: gen-c_glib/.deps/t_test_thrift_test_types.Plo: File or folder 
> not found
> make: *** No rule to make target 
> 'gen-c_glib/.deps/t_test_thrift_test_types.Plo'.  Stop.
> {code}
> After running ./configure again the problem went away. 



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to