-
Notifications
You must be signed in to change notification settings - Fork 3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Date not set properly in manpage #2692
Comments
perl |
Yep I was just gonna figure out if perl was already used or ask if it's acceptable. Seems I'll go for that. BSD's stat and date are just ridiculously stupid. |
|
|
Created branch 2692_manpage_broken_date [6b8d17831de22ba2734d3a9ab4b88327885984a7]
Review, please. |
|
|
I'm afraid this change would break compilation on Mac, since that has that braindamaged 'date' and 'stat' commands. I don't have my Mac with me right now to verify this.
The solution could be to replace the date and stat commands with a perl script, as mentioned above; or to move the substitution of date (and maybe version number too) from the normal configure&&make phase to the autogen phase (which would still break on Mac for git version, but would keep tarballs working).
I'd be happy to write the perl program in a couple of days, just please hold on your current change until then ;) |
Oh wait... apparently you did get rid of date and stat??? You rock! |
Okay, we awaiting. |
Here's what I'm trying to do, since I cannot run ./autogen on my Mac:
on Linux:
copy the tarball over to Mac
on Mac:
Here's where it goes wrong:
The tarball does not contain the manpages - I guess this was broken by this branch; the tarball created from the main git branch is okay. |
Wow, no man-files in tarball, really. This my fail. Egmont, thanks for this good testing. I'll fix it ASAP. |
Fixed in latest commit of branch. review, please. |
"awk: calling undefined function strftime"
Two more notes:
date-of-man-include.am sets LC_TIME, but this can be overridden by LC_ALL if the user has that set, leading to incorrect language and even to incorrect charset. I think date-of-man-include.am should override LC_ALL instead.
For Hungarian (hu), the date format should be like "2012. március", that is,
Thanks! |
Egmont, try to check the latest changes in branch on MacOS. Now used just perl for setting the dates on man-pages.
Done. |
Date substitution now works great :)
"make install" puts the i18n manpages into ${prefix}/share/man/hu_HU/man1 and similar, instead of ${prefix}/share/man/hu/man1 - I guess this might cause problems with various man readers.
Also, could you please consider overriding LC_ALL instead of LC_TIME, as per the previous comment?
thanks! |
Oh, my fail. I errorneusly changed LANG variable. Fixed
Done. Thanks for testing! |
Perfect! Thanks sooo much! :) |
|
|
merged to master:
|
merged to stable:
|
Important
This issue was migrated from Trac:
egmont
(@egmontkob)After installing mc-4.8.1 the footer of the manpage says:
MC Version 4.8.1 @DATE_OF_MAN_PAGE@ MC(1)
Running just the configure script (and no make) already generates mc.1 from mc.1.in (and similarly for all other manpages) and substitutes all the varibables (like version number, path prefixes) except for the date.
Running make in that directory would substitute the version number too, but the target file is already more recent than the source, so this step is not executed. If you remove mc.1 or touch it back in time, then a make generates mc.1 with a proper date.
I don't know what the desired solution would be, but it seems currently that configure and make are working against each other, they both try to do the same thing (and do it differently). It should be the responsibility of one of them to generate the manpages from the corresponding *.in files.
Also note (moving here from ticket #2689) that the code that updates the date in the manpage uses "stat -c" and "date -d", both are apparently GNU/Linux stuff, not supported on Mac or probably on *BSD.
As a partial solution, maybe the best solution would be to substitute the version number and date when the dist tarball is created (as part of running autoconf/automake), so the user gets these ready. This way creating a tarball or compiling from git probably still wouldn't work on Mac, but at least compiling a tarball would go fine. (I'm wondering, I don't know: is there a best practice for this in other free software?)
I'll try to find the proper cross-OS command to print the timestamp of a file.
The text was updated successfully, but these errors were encountered: