Bug 17008 - Fix build and cleanup of .dir and parts files
Summary: Fix build and cleanup of .dir and parts files
Status: RESOLVED FIXED
Alias: None
Product: xkeyboard-config
Classification: Unclassified
Component: General (show other bugs)
Version: unspecified
Hardware: Other All
: medium normal
Assignee: xkb
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-08-06 07:44 UTC by Igor Stirbu
Modified: 2008-08-07 01:47 UTC (History)
1 user (show)

See Also:
i915 platform:
i915 features:


Attachments
Fix .dir build and cleanup (1.19 KB, patch)
2008-08-06 07:44 UTC, Igor Stirbu
Details | Splinter Review

Description Igor Stirbu 2008-08-06 07:44:33 UTC
Created attachment 18155 [details] [review]
Fix .dir build and cleanup

Hello,

I've attached a proposal for fixing the issues with
building and cleanup of .dir and generated/temporary
parts files.


Thanks,
Igor
Comment 1 Sergey V. Udaltsov 2008-08-06 15:57:58 UTC
Thanks, that's a good patch. Except for the .PHONY for *.dir files. Since they are real files, why did you mark this target as .PHONY?

I already made some small change to xkbrules.am - but still I'd add .PHONY if you convince me:)

The rest is committed.
Comment 2 Igor Stirbu 2008-08-07 00:29:27 UTC
Hello Sergey,

(In reply to comment #1)
> I already made some small change to xkbrules.am - but still I'd add .PHONY if
> you convince me:)

Maybe I will not convince you, but I'll try to explain.

It's really hard to compute the dependencies of every .dir
file and create a general rule that would fit all the cases
(you know that :). The .PHONY is a trick to force make into
building $(subdir).dir file every time make is run.

make, by default, treats all targets as files and .PHONY marks
targets as 'not files'. If you have a file called 'all' or 
'clean', make would see that file and because the corresponding
target has no dependencies, it would not run the commands (unless
you mark it as .PHONY). Besides this, I see .PHONY as a good way
to 'optimize' Makefiles in order to get rid of redundant stat()s.

Thanks,
Igor


Comment 3 Igor Stirbu 2008-08-07 01:42:13 UTC
Hello Sergey,

(In reply to comment #1)
> I already made some small change to xkbrules.am

I've looked through your change and it seems to be
a better solution that .PHONY. I did not choose the
solution with dir_data because I was not sure if
all the dependencies are known.

Regarding the command in xkbrules.am there xkbcomp
is called, all that stuff with 'here' and 'pwd' is
redundant because all the paths become relative to
the place where it is sourced.

Thanks,
Igor
Comment 4 Sergey V. Udaltsov 2008-08-07 01:47:42 UTC
> I've looked through your change and it seems to be
> a better solution that .PHONY. I did not choose the
> solution with dir_data because I was not sure if
> all the dependencies are known.
Ok, now that everbody's happy, let's leave it as it is.

> Regarding the command in xkbrules.am there xkbcomp
> is called, all that stuff with 'here' and 'pwd' is
> redundant because all the paths become relative to
> the place where it is sourced.
What if the source directory is different from the build directory? Some distributions have that practice...


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.