]> sipb.mit.edu Git - ikiwiki.git/blob - doc/todo/Add_DESTDIR_to_the___39__pm__95__filter__39___and_use_MAKE_in___39__po__47__Makefile__39__.mdwn
providing the .po file so that it can be included
[ikiwiki.git] / doc / todo / Add_DESTDIR_to_the___39__pm__95__filter__39___and_use_MAKE_in___39__po__47__Makefile__39__.mdwn
1 The `PM_FILTER` doesn't include the `DESTDIR` variable.  This means that, if you use it with your build, it's incoherent to the rest of the build; i.e. the `INSTALLDIR_AUTOREPLACE` doesn't include it.  Honestly I can't recall what the final effect of that was but the following [[patch]] fixed it.
2
3 [[!format diff """
4 diff --git a/Makefile.PL b/Makefile.PL
5 index 5b0eb74..94adb0f 100755
6 --- a/Makefile.PL
7 +++ b/Makefile.PL
8 @@ -194,7 +194,7 @@ coverage:
9  WriteMakefile(
10         NAME            => 'IkiWiki',
11         PREFIX          => "/usr/local",
12 -       PM_FILTER       => './pm_filter $(PREFIX) $(VER) $(PROBABLE_INST_LIB)',
13 +       PM_FILTER       => './pm_filter $(DESTDIR)$(PREFIX) $(VER) $(PROBABLE_INST_LIB)',
14         MAN1PODS        => {},
15         PREREQ_PM       => {
16                 'XML::Simple'           => "0",
17 """]]
18
19 > This change certainly looks plausible, but I maintain a package
20 > of ikiwiki in a build system that sets `DESTDIR`, and I've not
21 > noticed any problems there. Would you be willing to do one more
22 > build in your environment without this change, so that we can
23 > understand the problem it's trying to fix? --[[schmonz]]
24 >> Thinking about this more and perhaps this is incorrect?  Or more accurately, I may have been using `DESTDIR` incorrectly.  I'm unsure.  I don't currently have access to the correct build environment but my best recollection is that I was using the `DESTDIR` to set base install directory for multiple working copies.  Of course, the `DESTDIR` is normally a staging install for the root directory (i.e. not normally visible during runtime).  I'm not 100% on the use of `DESTDIR` but perhaps you are?  Otherwise, leave this, and I'll adjust that build environment to rework the `PREFIX` variable instead.  -- [[ttw]]
25
26 >>> Maybe one of these explanations from
27 >>> [GNU](https://www.gnu.org/prep/standards/html_node/DESTDIR.html) or
28 >>> [pkgsrc](https://www.netbsd.org/docs/pkgsrc/fixes.html#destdir-support)
29 >>> clarifies `DESTDIR` for you. If you can narrow down a specific,
30 >>> reproducible problem that setting `DESTDIR` helps solve, please do
31 >>> report it here. Until then, marking this [[done]]. --[[schmonz]]
32
33 Also, the `po/Makefile` presumes the use of `make`, explicitly.  If you use another build tool it fails (ironically I was actually using `gmake` in non-gnu environment so it wasn't aliased to `make`).  Switch from the explicit call to the generic recall variable `$(MAKE)`.
34
35 [[!format diff """
36 diff --git a/po/Makefile b/po/Makefile
37 index 5ec4a15..4d1d33e 100644
38 --- a/po/Makefile
39 +++ b/po/Makefile
40 @@ -84,7 +84,7 @@ underlays: ../ikiwiki.out underlays_copy_stamp
41         ../ikiwiki.out -libdir .. -setup underlay.setup -refresh
42  
43  ../ikiwiki.out: ../Makefile
44 -       make -C .. ikiwiki.out
45 +       $(MAKE) -C .. ikiwiki.out
46  
47  ../Makefile: ../Makefile.PL
48         cd .. && ./Makefile.PL
49 """]]
50
51 > This change looks more obviously correct, and I understand exactly
52 > I haven't encountered the problem you have (my build system ensures
53 > that `make` gets me `gmake` for ikiwiki). Cherry-picked, with amended
54 > commit message. --[[schmonz]]
55
56 Note following comments by [[Joey]] via github
57
58 > These are not mergeable in their current state.
59 >
60 > *Pull 'DESTDIR' update to 'Makefile.PL' from mixed-master.*
61 >
62 > This doesn't explain
63 >
64 > * what the problem was
65 > * how the change fixed it
66 > * why the change is correct
67
68 >> No, I suppose not; I won't explain.  Hopefully the above clarifies.  -- [[ttw]]
69
70 > *Re-merge from 'joeyh' to new, clean head.*
71 >
72 > I have no idea what the above commit is doing, but it somehow makes changes to 432 files?!
73
74 >> Yeah, sort of.  I'm not very good with computers ... specifically, with `git` and stuff.  The diff between my `master` and your `master` is only two files so hopefully it *is* actually doing what's intended (that is, those changes are from your repository into my own -- I "rebased" my own in an attempt to simplify things).  Anyway. -- [[ttw]]
75
76 > *Pull the 'po/Makefile' change from the mixed-master.*
77 >
78 > This one is adding a $(MAKE) where there was a make. Which is fine, but the commit message is again, horrible. What is the mixed-master? Describe the change you are making, not your internal process for making it.
79
80 >> Note to others, `graft` from `hg` doesn't pull original commit messages the way you wish it did (or I did something wrong ... more likely). -- [[ttw]]
81
82 > Also, please don't use github pull requests for ikiwiki. Post todo items on ikiwiki.info with a link to your git repository and branches to be merged.
83
84 >> NP.  [[http://github.com/ttw/ikiwiki]]; `master` branch. -- [[ttw]]