<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: porting Makefile in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/porting-makefile/m-p/4295536#M688835</link>
    <description>&lt;!--!*#--&gt;If I had a problem on HP-UX, I'd probably ask&lt;BR /&gt;about it in an HP-UX forum.&lt;BR /&gt;&lt;BR /&gt;&amp;gt; Can we assume that you're using GNU make &lt;BR /&gt;&amp;gt; on HP-UX [...]&lt;BR /&gt;&lt;BR /&gt;Why would we assume this (or anything)?&lt;BR /&gt;&lt;BR /&gt;&amp;gt; [...] a Makefile written for&lt;BR /&gt;Tru64 Unix V5 with this code:&lt;BR /&gt;&lt;BR /&gt;We can't see your "make" macro values, so we&lt;BR /&gt;can't know what "make" is trying to do.  (At&lt;BR /&gt;least we non-psychics can't know...)&lt;BR /&gt;&lt;BR /&gt;&amp;gt; I tested the code changing it this way&lt;BR /&gt;&lt;BR /&gt;There was a reason for all those "\"&lt;BR /&gt;characters on the action line in the original&lt;BR /&gt;"make" file.&lt;BR /&gt;&lt;BR /&gt;&amp;gt; echo $var&lt;BR /&gt;&lt;BR /&gt;"make" eats that "$".&lt;BR /&gt;&lt;BR /&gt;A simple test "make" file seems to work as&lt;BR /&gt;expected on my HP-UX system:&lt;BR /&gt;&lt;BR /&gt;dyi # cat makefile&lt;BR /&gt;target :&lt;BR /&gt;        for var in one two three ; do \&lt;BR /&gt;            echo $$var ; \&lt;BR /&gt;        done&lt;BR /&gt;&lt;BR /&gt;dyi # make&lt;BR /&gt;        for var in one two three ; do \&lt;BR /&gt;            echo $var ; \&lt;BR /&gt;        done&lt;BR /&gt;one&lt;BR /&gt;two&lt;BR /&gt;three&lt;BR /&gt;dyi # &lt;BR /&gt;&lt;BR /&gt;Note that "$$var" in the "make" file becomes&lt;BR /&gt;"$var" for the shell.  Note also that with&lt;BR /&gt;the "\" characters, that's one "make" action&lt;BR /&gt;line, so only the first physical line really&lt;BR /&gt;needs to begin with a Tab, but it looks&lt;BR /&gt;better when all three physical lines begin&lt;BR /&gt;with a Tab.&lt;BR /&gt;&lt;BR /&gt;dyi # uname -a&lt;BR /&gt;HP-UX dyi B.11.31 U ia64 4235313755 unlimited-user license&lt;BR /&gt;&lt;BR /&gt;dyi # type make&lt;BR /&gt;make is hashed (/usr/bin/make)&lt;BR /&gt;&lt;BR /&gt;You might try some "make" options like "-d"&lt;BR /&gt;or "-p" to see if they tell you anything.&lt;BR /&gt;Or, you could add some "echo" action lines to&lt;BR /&gt;show what's true:&lt;BR /&gt;&lt;BR /&gt;dyi # cat makefile2&lt;BR /&gt;LIST=one two three&lt;BR /&gt;&lt;BR /&gt;target :&lt;BR /&gt;        echo "LIST: &amp;gt;$(LIST)&amp;lt;"&lt;BR /&gt;        for var in $(LIST) ; do \&lt;BR /&gt;            echo $$var ; \&lt;BR /&gt;        done&lt;BR /&gt;&lt;BR /&gt;dyi # make -f makefile2&lt;BR /&gt;        echo "LIST: &amp;gt;one two three&amp;lt;"&lt;BR /&gt;LIST: &amp;gt;one two three&amp;lt;&lt;BR /&gt;        for var in one two three ; do \&lt;BR /&gt;            echo $var ; \&lt;BR /&gt;        done&lt;BR /&gt;one&lt;BR /&gt;two&lt;BR /&gt;three&lt;BR /&gt;dyi #</description>
    <pubDate>Tue, 28 Oct 2008 17:51:52 GMT</pubDate>
    <dc:creator>Steven Schweda</dc:creator>
    <dc:date>2008-10-28T17:51:52Z</dc:date>
    <item>
      <title>porting Makefile</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/porting-makefile/m-p/4295534#M688833</link>
      <description>I am trying to port to HP-UX 11i v3 system an application &lt;BR /&gt;in C++ language written for a Tru64 Unix V5.&lt;BR /&gt;&lt;BR /&gt;I am trying to execute on HP-UX 11i v3 a Makefile written for &lt;BR /&gt;Tru64 Unix V5 with this code:&lt;BR /&gt;&lt;BR /&gt;$(TARGET_MORE): $(DEPEND_FILE) $(SOURCE_MORE.cc) $(LIBS)&lt;BR /&gt; @for i in $(TARGET_MORE); do \&lt;BR /&gt;  $(LINK_MORE); \&lt;BR /&gt; done&lt;BR /&gt;&lt;BR /&gt;The for instruction and the instrutions under has a tab on the front.&lt;BR /&gt;When I execute make I have an syntax error on the line of the for &lt;BR /&gt;instruction. This code works properly on Tru64 Unix V5&lt;BR /&gt;I tested the code changing it this way&lt;BR /&gt;&lt;BR /&gt;$(TARGET_MORE): $(DEPEND_FILE) $(SOURCE_MORE.cc) $(LIBS)&lt;BR /&gt; for var in one two three ; do&lt;BR /&gt;  echo $var&lt;BR /&gt; done&lt;BR /&gt;&lt;BR /&gt;and I still have a syntax error on the line of the for code.&lt;BR /&gt;In the second example the for cycle works properly if I execute it on the shell &lt;BR /&gt;out of the Makefile.&lt;BR /&gt;In all the Makefile this is the first point where there is the for instruction.&lt;BR /&gt;I have used the the gcc compiler, the korn shell, the posix shell.&lt;BR /&gt;What changes must I do so this Makefile works on HP-UX 11i v3.&lt;BR /&gt;&lt;BR /&gt;I Thank you in advance.&lt;BR /&gt;&lt;BR /&gt;Angelo Berardi&lt;BR /&gt;</description>
      <pubDate>Tue, 28 Oct 2008 14:45:18 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/porting-makefile/m-p/4295534#M688833</guid>
      <dc:creator>Berardi Angelo</dc:creator>
      <dc:date>2008-10-28T14:45:18Z</dc:date>
    </item>
    <item>
      <title>Re: porting Makefile</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/porting-makefile/m-p/4295535#M688834</link>
      <description>Hi,&lt;BR /&gt;&lt;BR /&gt;I'll guess this is something to do with different versions of make being used on the two platforms...&lt;BR /&gt;&lt;BR /&gt;Can we assume that you're using GNU make on HP-UX and Compaq/HP's make on Tru64 ?&lt;BR /&gt;&lt;BR /&gt;Seeing the exact commands you're running, and the exact output would be useful...&lt;BR /&gt;&lt;BR /&gt;Cheers,&lt;BR /&gt;&lt;BR /&gt;Rob</description>
      <pubDate>Tue, 28 Oct 2008 14:53:52 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/porting-makefile/m-p/4295535#M688834</guid>
      <dc:creator>Rob Leadbeater</dc:creator>
      <dc:date>2008-10-28T14:53:52Z</dc:date>
    </item>
    <item>
      <title>Re: porting Makefile</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/porting-makefile/m-p/4295536#M688835</link>
      <description>&lt;!--!*#--&gt;If I had a problem on HP-UX, I'd probably ask&lt;BR /&gt;about it in an HP-UX forum.&lt;BR /&gt;&lt;BR /&gt;&amp;gt; Can we assume that you're using GNU make &lt;BR /&gt;&amp;gt; on HP-UX [...]&lt;BR /&gt;&lt;BR /&gt;Why would we assume this (or anything)?&lt;BR /&gt;&lt;BR /&gt;&amp;gt; [...] a Makefile written for&lt;BR /&gt;Tru64 Unix V5 with this code:&lt;BR /&gt;&lt;BR /&gt;We can't see your "make" macro values, so we&lt;BR /&gt;can't know what "make" is trying to do.  (At&lt;BR /&gt;least we non-psychics can't know...)&lt;BR /&gt;&lt;BR /&gt;&amp;gt; I tested the code changing it this way&lt;BR /&gt;&lt;BR /&gt;There was a reason for all those "\"&lt;BR /&gt;characters on the action line in the original&lt;BR /&gt;"make" file.&lt;BR /&gt;&lt;BR /&gt;&amp;gt; echo $var&lt;BR /&gt;&lt;BR /&gt;"make" eats that "$".&lt;BR /&gt;&lt;BR /&gt;A simple test "make" file seems to work as&lt;BR /&gt;expected on my HP-UX system:&lt;BR /&gt;&lt;BR /&gt;dyi # cat makefile&lt;BR /&gt;target :&lt;BR /&gt;        for var in one two three ; do \&lt;BR /&gt;            echo $$var ; \&lt;BR /&gt;        done&lt;BR /&gt;&lt;BR /&gt;dyi # make&lt;BR /&gt;        for var in one two three ; do \&lt;BR /&gt;            echo $var ; \&lt;BR /&gt;        done&lt;BR /&gt;one&lt;BR /&gt;two&lt;BR /&gt;three&lt;BR /&gt;dyi # &lt;BR /&gt;&lt;BR /&gt;Note that "$$var" in the "make" file becomes&lt;BR /&gt;"$var" for the shell.  Note also that with&lt;BR /&gt;the "\" characters, that's one "make" action&lt;BR /&gt;line, so only the first physical line really&lt;BR /&gt;needs to begin with a Tab, but it looks&lt;BR /&gt;better when all three physical lines begin&lt;BR /&gt;with a Tab.&lt;BR /&gt;&lt;BR /&gt;dyi # uname -a&lt;BR /&gt;HP-UX dyi B.11.31 U ia64 4235313755 unlimited-user license&lt;BR /&gt;&lt;BR /&gt;dyi # type make&lt;BR /&gt;make is hashed (/usr/bin/make)&lt;BR /&gt;&lt;BR /&gt;You might try some "make" options like "-d"&lt;BR /&gt;or "-p" to see if they tell you anything.&lt;BR /&gt;Or, you could add some "echo" action lines to&lt;BR /&gt;show what's true:&lt;BR /&gt;&lt;BR /&gt;dyi # cat makefile2&lt;BR /&gt;LIST=one two three&lt;BR /&gt;&lt;BR /&gt;target :&lt;BR /&gt;        echo "LIST: &amp;gt;$(LIST)&amp;lt;"&lt;BR /&gt;        for var in $(LIST) ; do \&lt;BR /&gt;            echo $$var ; \&lt;BR /&gt;        done&lt;BR /&gt;&lt;BR /&gt;dyi # make -f makefile2&lt;BR /&gt;        echo "LIST: &amp;gt;one two three&amp;lt;"&lt;BR /&gt;LIST: &amp;gt;one two three&amp;lt;&lt;BR /&gt;        for var in one two three ; do \&lt;BR /&gt;            echo $var ; \&lt;BR /&gt;        done&lt;BR /&gt;one&lt;BR /&gt;two&lt;BR /&gt;three&lt;BR /&gt;dyi #</description>
      <pubDate>Tue, 28 Oct 2008 17:51:52 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/porting-makefile/m-p/4295536#M688835</guid>
      <dc:creator>Steven Schweda</dc:creator>
      <dc:date>2008-10-28T17:51:52Z</dc:date>
    </item>
  </channel>
</rss>

