- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: porting Makefile
Operating System - HP-UX
1753613
Members
6016
Online
108797
Solutions
Forums
Categories
Company
Local Language
юдл
back
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Discussions
Discussions
Forums
Forums
Discussions
юдл
back
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Blogs
Information
Community
Resources
Community Language
Language
Forums
Blogs
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО10-28-2008 07:45 AM
тАО10-28-2008 07:45 AM
porting Makefile
I am trying to port to HP-UX 11i v3 system an application
in C++ language written for a Tru64 Unix V5.
I am trying to execute on HP-UX 11i v3 a Makefile written for
Tru64 Unix V5 with this code:
$(TARGET_MORE): $(DEPEND_FILE) $(SOURCE_MORE.cc) $(LIBS)
@for i in $(TARGET_MORE); do \
$(LINK_MORE); \
done
The for instruction and the instrutions under has a tab on the front.
When I execute make I have an syntax error on the line of the for
instruction. This code works properly on Tru64 Unix V5
I tested the code changing it this way
$(TARGET_MORE): $(DEPEND_FILE) $(SOURCE_MORE.cc) $(LIBS)
for var in one two three ; do
echo $var
done
and I still have a syntax error on the line of the for code.
In the second example the for cycle works properly if I execute it on the shell
out of the Makefile.
In all the Makefile this is the first point where there is the for instruction.
I have used the the gcc compiler, the korn shell, the posix shell.
What changes must I do so this Makefile works on HP-UX 11i v3.
I Thank you in advance.
Angelo Berardi
in C++ language written for a Tru64 Unix V5.
I am trying to execute on HP-UX 11i v3 a Makefile written for
Tru64 Unix V5 with this code:
$(TARGET_MORE): $(DEPEND_FILE) $(SOURCE_MORE.cc) $(LIBS)
@for i in $(TARGET_MORE); do \
$(LINK_MORE); \
done
The for instruction and the instrutions under has a tab on the front.
When I execute make I have an syntax error on the line of the for
instruction. This code works properly on Tru64 Unix V5
I tested the code changing it this way
$(TARGET_MORE): $(DEPEND_FILE) $(SOURCE_MORE.cc) $(LIBS)
for var in one two three ; do
echo $var
done
and I still have a syntax error on the line of the for code.
In the second example the for cycle works properly if I execute it on the shell
out of the Makefile.
In all the Makefile this is the first point where there is the for instruction.
I have used the the gcc compiler, the korn shell, the posix shell.
What changes must I do so this Makefile works on HP-UX 11i v3.
I Thank you in advance.
Angelo Berardi
2 REPLIES 2
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО10-28-2008 07:53 AM
тАО10-28-2008 07:53 AM
Re: porting Makefile
Hi,
I'll guess this is something to do with different versions of make being used on the two platforms...
Can we assume that you're using GNU make on HP-UX and Compaq/HP's make on Tru64 ?
Seeing the exact commands you're running, and the exact output would be useful...
Cheers,
Rob
I'll guess this is something to do with different versions of make being used on the two platforms...
Can we assume that you're using GNU make on HP-UX and Compaq/HP's make on Tru64 ?
Seeing the exact commands you're running, and the exact output would be useful...
Cheers,
Rob
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО10-28-2008 10:51 AM
тАО10-28-2008 10:51 AM
Re: porting Makefile
If I had a problem on HP-UX, I'd probably ask
about it in an HP-UX forum.
> Can we assume that you're using GNU make
> on HP-UX [...]
Why would we assume this (or anything)?
> [...] a Makefile written for
Tru64 Unix V5 with this code:
We can't see your "make" macro values, so we
can't know what "make" is trying to do. (At
least we non-psychics can't know...)
> I tested the code changing it this way
There was a reason for all those "\"
characters on the action line in the original
"make" file.
> echo $var
"make" eats that "$".
A simple test "make" file seems to work as
expected on my HP-UX system:
dyi # cat makefile
target :
for var in one two three ; do \
echo $$var ; \
done
dyi # make
for var in one two three ; do \
echo $var ; \
done
one
two
three
dyi #
Note that "$$var" in the "make" file becomes
"$var" for the shell. Note also that with
the "\" characters, that's one "make" action
line, so only the first physical line really
needs to begin with a Tab, but it looks
better when all three physical lines begin
with a Tab.
dyi # uname -a
HP-UX dyi B.11.31 U ia64 4235313755 unlimited-user license
dyi # type make
make is hashed (/usr/bin/make)
You might try some "make" options like "-d"
or "-p" to see if they tell you anything.
Or, you could add some "echo" action lines to
show what's true:
dyi # cat makefile2
LIST=one two three
target :
echo "LIST: >$(LIST)<"
for var in $(LIST) ; do \
echo $$var ; \
done
dyi # make -f makefile2
echo "LIST: >one two three<"
LIST: >one two three<
for var in one two three ; do \
echo $var ; \
done
one
two
three
dyi #
about it in an HP-UX forum.
> Can we assume that you're using GNU make
> on HP-UX [...]
Why would we assume this (or anything)?
> [...] a Makefile written for
Tru64 Unix V5 with this code:
We can't see your "make" macro values, so we
can't know what "make" is trying to do. (At
least we non-psychics can't know...)
> I tested the code changing it this way
There was a reason for all those "\"
characters on the action line in the original
"make" file.
> echo $var
"make" eats that "$".
A simple test "make" file seems to work as
expected on my HP-UX system:
dyi # cat makefile
target :
for var in one two three ; do \
echo $$var ; \
done
dyi # make
for var in one two three ; do \
echo $var ; \
done
one
two
three
dyi #
Note that "$$var" in the "make" file becomes
"$var" for the shell. Note also that with
the "\" characters, that's one "make" action
line, so only the first physical line really
needs to begin with a Tab, but it looks
better when all three physical lines begin
with a Tab.
dyi # uname -a
HP-UX dyi B.11.31 U ia64 4235313755 unlimited-user license
dyi # type make
make is hashed (/usr/bin/make)
You might try some "make" options like "-d"
or "-p" to see if they tell you anything.
Or, you could add some "echo" action lines to
show what's true:
dyi # cat makefile2
LIST=one two three
target :
echo "LIST: >$(LIST)<"
for var in $(LIST) ; do \
echo $$var ; \
done
dyi # make -f makefile2
echo "LIST: >one two three<"
LIST: >one two three<
for var in one two three ; do \
echo $var ; \
done
one
two
three
dyi #
The opinions expressed above are the personal opinions of the authors, not of Hewlett Packard Enterprise. By using this site, you accept the Terms of Use and Rules of Participation.
News and Events
Support
© Copyright 2024 Hewlett Packard Enterprise Development LP