{"thread":{"id":"24831","subject":"Compiling git with makepp patch","startedAt":"2010-08-22T22:31:27Z","lastAt":"2010-08-26T00:20:46Z","messageCount":11,"participants":["Daniel Pfeiffer","Thomas Rast","Jakub Narebski","Ævar Arnfjörð Bjarmason","Jonathan Nieder","Andreas Schwab","Junio C Hamano"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"148723","messageId":"4C71A53F.2020108@t-online.de","threadId":"24831","inReplyTo":"84FD9808A65CDF4C959FDB41FC3D134CBCF306D6@MSSRVS4.atlas.de","subject":"Compiling git with makepp patch","fromName":"Daniel Pfeiffer","fromEmail":"occitan@t-online.de","sentAt":"2010-08-22T22:31:27Z","receivedAt":"2010-08-22T22:31:27Z","isPatch":false,"sender":{"key":"occitan@t-online.de","avatar":null},"body":"  Hi,\n\ngetting ready for the release of makepp version 2.0, I'm testing it for \nbuilding various popular open source software.\n\nGit has been giving our promise of Gnu make compatibility a hard time.  I have \njust checked in a series of small fixes, many which were needed to compile \nGit.  This includes things like:\n\n    * accepting an action-prefix of +\n    * implementing the cosmetic --no-print-directory directory option, which\n      in your usage is essential\n    * smarter MAKEFLAGS handling, because you unset it several times, but we\n      have more options, some must reach the submake\n    * allow special variables like $@ outside of rules — this used to be an error\n\nThere are however two things which I can hardly hope to fix:\n\nGIT-VERSION-FILE: FORCE\n      @$(SHELL_PATH) ./GIT-VERSION-GEN\n-include GIT-VERSION-FILE\n.PHONY: FORCE\n\nI don't know why you depend on a phony that has no rule — I also had to make \nthat possible.  The file needs to be built immediately so that it can be \nincluded, before reading the rest of the makefile.  But the dependency is only \nknown to be phony after running the rule.  Here you have a hen-egg problem, \nwhere I have no clue how Gnu make can cope (this is the one case where it \nrequires .PHONY).  Anyway, makepp needs the phony declaration before.\n\nThe other thing caused me quite a headache before I understood:\n\nPERL_PATH_SQ  = $(subst ','\\'',$(PERL_PATH))#'\n\nI suppose you added the comment for Emacs' syntax highlighting, to have an \neven number of unescaped quotes.  The problem is makepp parses this line just \nlike Emacs, so it doesn't find the comment, adding in the #' at the point of \nuse, which completely screws the sed command.  (You might want to apply my fix \nto a few other makefiles, which have SQ variables, albeit without the syntax \nhighlighting workaround, so they are only visually defect.)\n\ncoralament / best Grötens / liebe Grüße / best regards / elkorajn salutojn\nDaniel Pfeiffer\n\n-- \nlerne / learn / apprends / lär dig / ucz się    Esperanto:\n                     http://lernu.net   /http://ikurso.net\n\n\n\ndiff -wrup git-2010-08-21/git-gui/Makefile git-2010-08-21a/git-gui/Makefile\n--- git-2010-08-21/git-gui/Makefile\t2010-08-20 21:55:41.000000000 +0200\n+++ git-2010-08-21a/git-gui/Makefile\t2010-08-21 20:59:10.272785510 +0200\n@@ -7,6 +7,7 @@ all::\n # TCL_PATH must be vaild for this to work.\n #\n \n+.PHONY: FORCE\n GIT-VERSION-FILE: FORCE\n \t@$(SHELL_PATH) ./GIT-VERSION-GEN\n -include GIT-VERSION-FILE\n@@ -340,4 +341,3 @@ ifdef GITGUI_WINDOWS_WRAPPER\n endif\n \n .PHONY: all install uninstall dist-version clean\n-.PHONY: FORCE\ndiff -wrup git-2010-08-21/gitweb/Makefile git-2010-08-21a/gitweb/Makefile\n--- git-2010-08-21/gitweb/Makefile\t2010-08-20 21:55:41.000000000 +0200\n+++ git-2010-08-21a/gitweb/Makefile\t2010-08-21 21:09:47.499919056 +0200\n@@ -52,12 +52,15 @@ SHELL_PATH ?= $(SHELL)\n PERL_PATH  ?= /usr/bin/perl\n \n # Shell quote;\n-bindir_SQ = $(subst ','\\'',$(bindir))#'\n-gitwebdir_SQ = $(subst ','\\'',$(gitwebdir))#'\n-gitwebstaticdir_SQ = $(subst ','\\'',$(gitwebdir)/static)#'\n-SHELL_PATH_SQ = $(subst ','\\'',$(SHELL_PATH))#'\n-PERL_PATH_SQ  = $(subst ','\\'',$(PERL_PATH))#'\n-DESTDIR_SQ    = $(subst ','\\'',$(DESTDIR))#'\n+Q='\n+# ' This comment is only to appease IDEs like Emacs.\n+# The comment is on a new line, else makepp would see it as a quoted hash.\n+bindir_SQ = $(subst $Q,'\\'',$(bindir))\n+gitwebdir_SQ = $(subst $Q,'\\'',$(gitwebdir))\n+gitwebstaticdir_SQ = $(subst $Q,'\\'',$(gitwebdir)/static)\n+SHELL_PATH_SQ = $(subst $Q,'\\'',$(SHELL_PATH))\n+PERL_PATH_SQ  = $(subst $Q,'\\'',$(PERL_PATH))\n+DESTDIR_SQ    = $(subst $Q,'\\'',$(DESTDIR))\n \n # Quiet generation (unless V=1)\n QUIET_SUBDIR0  = +$(MAKE) -C # space to separate -C and subdir\ndiff -wrup git-2010-08-21/Makefile git-2010-08-21a/Makefile\n--- git-2010-08-21/Makefile\t2010-08-20 21:55:41.000000000 +0200\n+++ git-2010-08-21a/Makefile\t2010-08-21 21:02:07.676932693 +0200\n@@ -236,6 +236,7 @@ all::\n #\n # Define NATIVE_CRLF if your platform uses CRLF for line endings.\n \n+.PHONY: FORCE\n GIT-VERSION-FILE: FORCE\n \t@$(SHELL_PATH) ./GIT-VERSION-GEN\n -include GIT-VERSION-FILE\n@@ -2217,7 +2218,7 @@ endif\n \n .PHONY: all install clean strip\n .PHONY: shell_compatibility_test please_set_SHELL_PATH_to_a_more_modern_shell\n-.PHONY: FORCE TAGS tags cscope\n+.PHONY: TAGS tags cscope\n \n ### Check documentation\n #\n\n"},{"id":"148731","messageId":"201008230947.06777.trast@student.ethz.ch","threadId":"24831","inReplyTo":"4C71A53F.2020108@t-online.de","subject":"Re: Compiling git with makepp patch","fromName":"Thomas Rast","fromEmail":"trast@student.ethz.ch","sentAt":"2010-08-23T07:47:06Z","receivedAt":"2010-08-23T07:47:06Z","isPatch":false,"sender":{"key":"tr@thomasrast.ch","avatar":"https://avatars.githubusercontent.com/u/153510?v=4"},"body":"Daniel Pfeiffer wrote:\n> [Attachment: git-makepp.patch]\n\nPlease read Documentation/SubmittingPatches for next time.\n\n> There are however two things which I can hardly hope to fix:\n[...]\n> PERL_PATH_SQ  = $(subst ','\\'',$(PERL_PATH))#'\n> \n> [...] makepp parses this line just like Emacs, so it doesn't find\n> the comment, adding in the #' at the point of use, which completely\n> screws the sed command.\n[...]\n>  # Shell quote;\n> -bindir_SQ = $(subst ','\\'',$(bindir))#'\n> -gitwebdir_SQ = $(subst ','\\'',$(gitwebdir))#'\n> -gitwebstaticdir_SQ = $(subst ','\\'',$(gitwebdir)/static)#'\n> -SHELL_PATH_SQ = $(subst ','\\'',$(SHELL_PATH))#'\n> -PERL_PATH_SQ  = $(subst ','\\'',$(PERL_PATH))#'\n> -DESTDIR_SQ    = $(subst ','\\'',$(DESTDIR))#'\n> +Q='\n> +# ' This comment is only to appease IDEs like Emacs.\n> +# The comment is on a new line, else makepp would see it as a quoted hash.\n> +bindir_SQ = $(subst $Q,'\\'',$(bindir))\n> +gitwebdir_SQ = $(subst $Q,'\\'',$(gitwebdir))\n> +gitwebstaticdir_SQ = $(subst $Q,'\\'',$(gitwebdir)/static)\n> +SHELL_PATH_SQ = $(subst $Q,'\\'',$(SHELL_PATH))\n> +PERL_PATH_SQ  = $(subst $Q,'\\'',$(PERL_PATH))\n> +DESTDIR_SQ    = $(subst $Q,'\\'',$(DESTDIR))\n\nConfusingly, you talk about comments above, but the real issue is that\nyour makepp apparently gives the ' special meaning.  For once \"info\nmake\" and \"man 1p make\" on my system agree on the semantics of ': none\nat all.  From the latter:\n\n  Early proposals stated that an \"unquoted\" number sign  was  treated  as  the\n  start of a comment. The make utility does not pay any attention to quotes. A\n  number sign starts a comment regardless of its surroundings.\n\nSo can you quote chapter and verse to show that there is anything to\nfix?\n\n-- \nThomas Rast\ntrast@{inf,student}.ethz.ch\n"},{"id":"148734","messageId":"m3k4nhogbr.fsf@localhost.localdomain","threadId":"24831","inReplyTo":"201008230947.06777.trast@student.ethz.ch","subject":"Re: Compiling git with makepp patch","fromName":"Jakub Narebski","fromEmail":"jnareb@gmail.com","sentAt":"2010-08-23T09:00:04Z","receivedAt":"2010-08-23T09:00:04Z","isPatch":false,"sender":{"key":"jnareb@gmail.com","avatar":"https://avatars.githubusercontent.com/u/2706?v=4"},"body":"Thomas Rast <trast@student.ethz.ch> writes:\n> Daniel Pfeiffer wrote:\n> > [Attachment: git-makepp.patch]\n> \n> Please read Documentation/SubmittingPatches for next time.\n> \n> > There are however two things which I can hardly hope to fix:\n> [...]\n> > PERL_PATH_SQ  = $(subst ','\\'',$(PERL_PATH))#'\n> > \n> > [...] makepp parses this line just like Emacs, so it doesn't find\n> > the comment, adding in the #' at the point of use, which completely\n> > screws the sed command.\n> [...]\n> >  # Shell quote;\n> > -bindir_SQ = $(subst ','\\'',$(bindir))#'\n> > -gitwebdir_SQ = $(subst ','\\'',$(gitwebdir))#'\n> > -gitwebstaticdir_SQ = $(subst ','\\'',$(gitwebdir)/static)#'\n> > -SHELL_PATH_SQ = $(subst ','\\'',$(SHELL_PATH))#'\n> > -PERL_PATH_SQ  = $(subst ','\\'',$(PERL_PATH))#'\n> > -DESTDIR_SQ    = $(subst ','\\'',$(DESTDIR))#'\n> > +Q='\n> > +# ' This comment is only to appease IDEs like Emacs.\n> > +# The comment is on a new line, else makepp would see it as a quoted hash.\n> > +bindir_SQ = $(subst $Q,'\\'',$(bindir))\n> > +gitwebdir_SQ = $(subst $Q,'\\'',$(gitwebdir))\n> > +gitwebstaticdir_SQ = $(subst $Q,'\\'',$(gitwebdir)/static)\n> > +SHELL_PATH_SQ = $(subst $Q,'\\'',$(SHELL_PATH))\n> > +PERL_PATH_SQ  = $(subst $Q,'\\'',$(PERL_PATH))\n> > +DESTDIR_SQ    = $(subst $Q,'\\'',$(DESTDIR))\n> \n> Confusingly, you talk about comments above, but the real issue is that\n> your makepp apparently gives the ' special meaning.  For once \"info\n> make\" and \"man 1p make\" on my system agree on the semantics of ': none\n> at all.  From the latter:\n> \n>   Early proposals stated that an \"unquoted\" number sign  was  treated  as  the\n>   start of a comment. The make utility does not pay any attention to quotes. A\n>   number sign starts a comment regardless of its surroundings.\n> \n> So can you quote chapter and verse to show that there is anything to\n> fix?\n\nNevertheless using\n\n  Q='\n  SQ='\\''\n  bindir_SQ = $(subst $Q,$(SQ),$(bindir))\n\ncould make substitution more clear ('make' behavior nothwithstanding).\n\n-- \nJakub Narebski\nPoland\nShadeHawk on #git\n"},{"id":"148779","messageId":"AANLkTinbTph=cggp4V=avorzrf9BT7vPtpanDtDtXm=q@mail.gmail.com","threadId":"24831","inReplyTo":"4C71A53F.2020108@t-online.de","subject":"Re: Compiling git with makepp patch","fromName":"Ævar Arnfjörð Bjarmason","fromEmail":"avarab@gmail.com","sentAt":"2010-08-23T20:27:30Z","receivedAt":"2010-08-23T20:27:30Z","isPatch":false,"sender":{"key":"avarab@gmail.com","avatar":"https://avatars.githubusercontent.com/u/45301?v=4"},"body":"On Sun, Aug 22, 2010 at 22:31, Daniel Pfeiffer <occitan@t-online.de> wrote:\n\n> Git has been giving our promise of Gnu make compatibility a hard\n> time.\n\nAside from our bugs you can't make that promise if projects like Git\nneed patches to work with makepp :)\n\n> The other thing caused me quite a headache before I understood:\n>\n> PERL_PATH_SQ  = $(subst ','\\'',$(PERL_PATH))#'\n>\n> I suppose you added the comment for Emacs' syntax highlighting, to have an\n> even number of unescaped quotes.\n\nThat was added by John 'Warthog9' Hawley, I wonder if that also came\nwith a M-x report-emacs-bug, e.g. cperl-mode deals with that case,\nsounds like an easy-to-fix bug in makefile-gmake-mode.\n\n> The problem is makepp parses this line\n> just like Emacs, so it doesn't find the comment, adding in the #' at the\n> point of use, which completely screws the sed command.  (You might want to\n> apply my fix to a few other makefiles, which have SQ variables, albeit\n> without the syntax highlighting workaround, so they are only visually\n> defect.)\n\nThe reason Emacs has issues is because it uses an ad-hoc regexp based\nparser that favours speed above correctness for syntax\nhighlighting.\n\nI'm surprised you've gotten this far with makepp if you don't tokenize\ncomments and throw their contents away.\n"},{"id":"148811","messageId":"20100824043220.GA20037@burratino","threadId":"24831","inReplyTo":"4C71A53F.2020108@t-online.de","subject":"Re: Compiling git with makepp patch","fromName":"Jonathan Nieder","fromEmail":"jrnieder@gmail.com","sentAt":"2010-08-24T04:32:20Z","receivedAt":"2010-08-24T04:32:20Z","isPatch":false,"sender":{"key":"jrnieder@gmail.com","avatar":"https://avatars.githubusercontent.com/u/281595?v=4"},"body":"Hi,\n\nDaniel Pfeiffer wrote:\n\n> .PHONY: FORCE\n> \n> I don't know why you depend on a phony that has no rule — I also had\n> to make that possible.\n\nSurely the name explains it. :)\n\n> The file needs to be built immediately so\n> that it can be included, before reading the rest of the makefile.\n> But the dependency is only known to be phony after running the rule.\n> Here you have a hen-egg problem, where I have no clue how Gnu make\n> can cope (this is the one case where it requires .PHONY).\n\nGNU make, unlike, say, pmake, reads all the rules before it runs\nanything iirc.  So you can have\n\n -include foo\n\n foo:\n\techo bar: >foo\n\techo '\techo hi' >>foo\n\nand it will cope okay.\n\nAnyway, the git makefile is very far from topologically sorted; if\nyou are suggesting we change that, that's fine with me, as long as\nthe new rule is somehow justified and consistent.\n\nHope that helps,\nJonathan\n"},{"id":"148991","messageId":"4C758016.8070104@t-online.de","threadId":"24831","inReplyTo":"20100824043220.GA20037@burratino","subject":"Re: Compiling git with makepp patch","fromName":"Daniel Pfeiffer","fromEmail":"occitan@t-online.de","sentAt":"2010-08-25T20:41:58Z","receivedAt":"2010-08-25T20:41:58Z","isPatch":false,"sender":{"key":"occitan@t-online.de","avatar":null},"body":"  la 08/24/2010 06:32 AM Jonathan Nieder skribis:\n> Hi,\n>\n> Daniel Pfeiffer wrote:\n>> The file needs to be built immediately so\n>> that it can be included, before reading the rest of the makefile.\n>> But the dependency is only known to be phony after running the rule.\n>> Here you have a hen-egg problem, where I have no clue how Gnu make\n>> can cope (this is the one case where it requires .PHONY).\n> GNU make, unlike, say, pmake, reads all the rules before it runs\n> anything iirc.  So you can have\n>\n>   -include foo\n>\n>   foo:\n> \techo bar:>foo\n> \techo '\techo hi'>>foo\n>\n> and it will cope okay.\nWhile that is not the usual use-case for -include, the file might very well \ndefine some macros, and the rest of the makefile, indeed the foo-rule itself \nmight depend on those macros.  Better to have things in a clear order!\n\n> Anyway, the git makefile is very far from topologically sorted; if\n> you are suggesting we change that, that's fine with me, as long as\n> the new rule is somehow justified and consistent.\n\ncoralament / best Grötens / liebe Grüße / best regards / elkorajn salutojn\nDaniel Pfeiffer\n\n-- \nlerne / learn / apprends / lär dig / ucz się    Esperanto:\n                     http://lernu.net  /  http://ikurso.net\n"},{"id":"148998","messageId":"4C7583DB.6010001@t-online.de","threadId":"24831","inReplyTo":"AANLkTinbTph=cggp4V=avorzrf9BT7vPtpanDtDtXm=q@mail.gmail.com","subject":"Re: Compiling git with makepp patch","fromName":"Daniel Pfeiffer","fromEmail":"occitan@t-online.de","sentAt":"2010-08-25T20:58:03Z","receivedAt":"2010-08-25T20:58:03Z","isPatch":false,"sender":{"key":"occitan@t-online.de","avatar":null},"body":"  la 08/23/2010 10:27 PM Ævar Arnfjörð Bjarmason skribis:\n> On Sun, Aug 22, 2010 at 22:31, Daniel Pfeiffer<occitan@t-online.de>  wrote:\n>\n>> Git has been giving our promise of Gnu make compatibility a hard\n>> time.\n> Aside from our bugs you can't make that promise if projects like Git\n> need patches to work with makepp :)\nJust two little things in your big makefiles.  The compatibility is just an \nadded bonus, we have many other real strengths in makepp.\n\n>> The other thing caused me quite a headache before I understood:\n>>\n>> PERL_PATH_SQ  = $(subst ','\\'',$(PERL_PATH))#'\n>>\n>> I suppose you added the comment for Emacs' syntax highlighting, to have an\n>> even number of unescaped quotes.\n> That was added by John 'Warthog9' Hawley, I wonder if that also came\n> with a M-x report-emacs-bug, e.g. cperl-mode deals with that case,\n> sounds like an easy-to-fix bug in makefile-gmake-mode.\nHardly, if you look at my example below!\n\n>> The problem is makepp parses this line\n>> just like Emacs, so it doesn't find the comment, adding in the #' at the\n>> point of use, which completely screws the sed command.  (You might want to\n>> apply my fix to a few other makefiles, which have SQ variables, albeit\n>> without the syntax highlighting workaround, so they are only visually\n>> defect.)\n> The reason Emacs has issues is because it uses an ad-hoc regexp based\n> parser that favours speed above correctness for syntax\n> highlighting.\nWell, gmake rules are very twisted:  a and b don't do the same thing, because \nfile functions shall respect quoting (though to my mind that should then be \nonly one funny file name, which gmake gets wrong, splitting it up anyway), and \nc causes gmake to choke:\n\nall: a b\na:\n     echo : $(dir 'a # b/c/d') :\n\nB = 'a # b/c/d'\nb:\n     echo : $(dir $B) :\n\nC = $(dir 'a # b/c/d')\nc:\n     echo : $C :\n\n> I'm surprised you've gotten this far with makepp if you don't tokenize\n> comments and throw their contents away.\nThere are a few subtle differences, which mostly don't hurt.\n\ncoralament / best Grötens / liebe Grüße / best regards / elkorajn salutojn\nDaniel Pfeiffer\n\n-- \nlerne / learn / apprends / lär dig / ucz się    Esperanto:\n                     http://lernu.net  /  http://ikurso.net\n"},{"id":"148999","messageId":"4C75865E.5050804@t-online.de","threadId":"24831","inReplyTo":"201008230947.06777.trast@student.ethz.ch","subject":"Re: Compiling git with makepp patch","fromName":"Daniel Pfeiffer","fromEmail":"occitan@t-online.de","sentAt":"2010-08-25T21:08:46Z","receivedAt":"2010-08-25T21:08:46Z","isPatch":false,"sender":{"key":"occitan@t-online.de","avatar":null},"body":"  la 08/23/2010 09:47 AM Thomas Rast skribis:\n> Daniel Pfeiffer wrote:\n>>   # Shell quote;\n>> -bindir_SQ = $(subst ','\\'',$(bindir))#'\n>> -gitwebdir_SQ = $(subst ','\\'',$(gitwebdir))#'\n>> -gitwebstaticdir_SQ = $(subst ','\\'',$(gitwebdir)/static)#'\n>> -SHELL_PATH_SQ = $(subst ','\\'',$(SHELL_PATH))#'\n>> -PERL_PATH_SQ  = $(subst ','\\'',$(PERL_PATH))#'\n>> -DESTDIR_SQ    = $(subst ','\\'',$(DESTDIR))#'\n>> +Q='\n>> +# ' This comment is only to appease IDEs like Emacs.\n>> +# The comment is on a new line, else makepp would see it as a quoted hash.\n>> +bindir_SQ = $(subst $Q,'\\'',$(bindir))\n>> +gitwebdir_SQ = $(subst $Q,'\\'',$(gitwebdir))\n>> +gitwebstaticdir_SQ = $(subst $Q,'\\'',$(gitwebdir)/static)\n>> +SHELL_PATH_SQ = $(subst $Q,'\\'',$(SHELL_PATH))\n>> +PERL_PATH_SQ  = $(subst $Q,'\\'',$(PERL_PATH))\n>> +DESTDIR_SQ    = $(subst $Q,'\\'',$(DESTDIR))\n> Confusingly, you talk about comments above, but the real issue is that\n> your makepp apparently gives the ' special meaning.  For once \"info\n> make\" and \"man 1p make\" on my system agree on the semantics of ': none\n> at all.  From the latter:\n>\n>    Early proposals stated that an \"unquoted\" number sign  was  treated  as  the\n>    start of a comment. The make utility does not pay any attention to quotes. A\n>    number sign starts a comment regardless of its surroundings.\nIf you look at the example I just sent to Ævar, that contains examples of how \ncrazy the situation really is in gmake.  What you cite here is wrong!\n\n> So can you quote chapter and verse to show that there is anything to\n> fix?\nWell, I pointed you to makepp, which is subtly different from gmake, which you \ncould.  If you choose not to use it, please yourself!\n\ncoralament / best Grötens / liebe Grüße / best regards / elkorajn salutojn\nDaniel Pfeiffer\n\n-- \nlerne / learn / apprends / lär dig / ucz się    Esperanto:\n                     http://lernu.net  /  http://ikurso.net\n"},{"id":"149006","messageId":"m262yyuzk4.fsf@igel.home","threadId":"24831","inReplyTo":"4C758016.8070104@t-online.de","subject":"Re: Compiling git with makepp patch","fromName":"Andreas Schwab","fromEmail":"schwab@linux-m68k.org","sentAt":"2010-08-25T21:56:11Z","receivedAt":"2010-08-25T21:56:11Z","isPatch":false,"sender":{"key":"schwab@linux-m68k.org","avatar":"https://avatars.githubusercontent.com/u/2175493?v=4"},"body":"Daniel Pfeiffer <occitan@t-online.de> writes:\n\n>  la 08/24/2010 06:32 AM Jonathan Nieder skribis:\n>> Hi,\n>>\n>> Daniel Pfeiffer wrote:\n>>> The file needs to be built immediately so\n>>> that it can be included, before reading the rest of the makefile.\n>>> But the dependency is only known to be phony after running the rule.\n>>> Here you have a hen-egg problem, where I have no clue how Gnu make\n>>> can cope (this is the one case where it requires .PHONY).\n>> GNU make, unlike, say, pmake, reads all the rules before it runs\n>> anything iirc.  So you can have\n>>\n>>   -include foo\n>>\n>>   foo:\n>> \techo bar:>foo\n>> \techo '\techo hi'>>foo\n>>\n>> and it will cope okay.\n> While that is not the usual use-case for -include, the file might very\n> well define some macros, and the rest of the makefile, indeed the foo-rule\n> itself might depend on those macros.\n\nGNU make will restart reading all makefiles when any of them was remade.\n\nAndreas.\n\n-- \nAndreas Schwab, schwab@linux-m68k.org\nGPG Key fingerprint = 58CA 54C7 6D53 942B 1756  01D3 44D5 214B 8276 4ED5\n\"And now for something completely different.\"\n"},{"id":"149017","messageId":"7v8w3upan6.fsf@alter.siamese.dyndns.org","threadId":"24831","inReplyTo":"m262yyuzk4.fsf@igel.home","subject":"Re: Compiling git with makepp patch","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2010-08-25T22:53:17Z","receivedAt":"2010-08-25T22:53:17Z","isPatch":false,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Andreas Schwab <schwab@linux-m68k.org> writes:\n\n>>> GNU make, unlike, say, pmake, reads all the rules before it runs\n>>> anything iirc.  So you can have\n>>>\n>>>   -include foo\n>>>\n>>>   foo:\n>>> \techo bar:>foo\n>>> \techo '\techo hi'>>foo\n>>>\n>>> and it will cope okay.\n>> While that is not the usual use-case for -include, the file might very\n>> well define some macros, and the rest of the makefile, indeed the foo-rule\n>> itself might depend on those macros.\n>\n> GNU make will restart reading all makefiles when any of them was remade.\n\nI am not sure about the \"reread\" part, but shouldn't all POSIX compliant\nmake be topology driven (i.e. \" reads all the rules before it runs\nanything\")?\n"},{"id":"149023","messageId":"20100826002045.GC2850@burratino","threadId":"24831","inReplyTo":"7v8w3upan6.fsf@alter.siamese.dyndns.org","subject":"Re: Compiling git with makepp patch","fromName":"Jonathan Nieder","fromEmail":"jrnieder@gmail.com","sentAt":"2010-08-26T00:20:46Z","receivedAt":"2010-08-26T00:20:46Z","isPatch":false,"sender":{"key":"jrnieder@gmail.com","avatar":"https://avatars.githubusercontent.com/u/281595?v=4"},"body":"Junio C Hamano wrote:\n>>> Jonathan Nieder wrote:\n\n>>>> GNU make, unlike, say, pmake, reads all the rules before it runs\n>>>> anything iirc.\n[...]\n> I am not sure about the \"reread\" part, but shouldn't all POSIX compliant\n> make be topology driven (i.e. \" reads all the rules before it runs\n> anything\")?\n\nYes, you are right.\n\nI was thinking of something else, namely that\n\n-- 8< --\n#!/bin/sh\n\ncat <<\\EOF >Makefile &&\n.foo.bar:\n\tcp $< $@\n\n.SUFFIXES: .foo .bar\nEOF\n\necho hello >test.foo &&\npmake test.bar\n-- >8 --\n\nfails while the corresponding script for GNU make succeeds.\n"}]}