GNU make can handle Makefiles like:
When make is used as in this script:
produces:
I tried this on Solaris 10, without much hope, and I got the same error message you did.
In order to process this kind of Makefile on Solaris, you would need GNU make.
The topic of make and makefiles is complex, so perhaps the guidance below will be of some value.
Best wishes ... cheers, drl
Quote:
Title: Managing Projects with GNU Make
Author: R Mecklenburg
Edition: 3rd
Date: 2004
Publisher: O'Reilly
ISBN: 0-596-00610-1
Pages: 280
Categories: *nix, development, compiling, building, programming, tools
Comments: Visit O'Reilly Media - Spreading the knowledge of technology innovators to get the
Comments: corrections for a large number of errors.
Comments: GNU manual: GNU `make'
Comments: Google "linux tutorial make makefile"
Comments: Conflicting opinions amazon.com; 3.5 stars, 12 reviews, 2009.02.
Comments: see also cons, scons
Hi,
While trying compile a C++ file in UNIX with gcc whose make rule involves the usage of
/usr/ccs/bin/as, I get the following error:
/usr/ccs/bin/as: No such file or directory
/usr/ccs/bin/as: error: write error on output file "<filename>.o"
*** Error code 1
clearmake: Error: Build... (2 Replies)
Hi ,
While trying to compile a PRO*C code on unix using makefile i get the following errors. i am now working on a 10g migration (from 8i) ...
these makefile perfectly work in previous version.
ld: fatal: file... (7 Replies)
Hey, can I #define something outside the source file ?
I have a C program which uses #ifdef..
#ifdef ABC
... do this..
#else
... that ...
#endif
The usual way that I know of defining ABC is in the source/header file
#define ABC
But is there any other way to do that ? Maybe as... (2 Replies)
I am compiling a software xchm on solaris 10.
First i run './configure'
There is no error.
But when i start compiling using 'gmake'
following error shown
/usr/local/include/wx-2.6/wx/x11/brush.h: In copy constructor `wxBrush::wxBrush(const wxBrush&)':... (3 Replies)
All,
I am facing problem with one makefile compilation. The following is the error I am getting
<Code>
/applns/ora10/rdbms/bin/proc sqlcheck=semantics userid=/ CHAR_MAP=VARCHAR2 DBMS=V7 DEFINE=UNIX DEFINE=SUN_SRC_COMPAT iname=mm5900.pc
sh: /applns/ora10/rdbms/bin/proc: not found
*** Error... (1 Reply)
All,
I am facing problem with one makefile compilation. The following is the error I am getting, Before proceeding to this I want to let you know all, only last week onwards I started working in solaris10, the same code is working in solaris 9. I dont know any link has to be created, or any path... (3 Replies)
Hi all,
I am trying to create an executable, but when the .pc file converting to .c file I am getting lots of warning message like
of these 3 lines.
Any idea why I am getting these lines?
Any configuration issues?
What exactly needs to be done to solve these warning messages?
... (0 Replies)
I want to be able to access an environment variable to control how a program is compiled.
So:
export MY_VERSN=9
Then ideally, within my C++ code, I would have
#if MY_VERSN = 9
iret = FRED9()
#else
iret = FRED()
#endif
The way I thought I could do it is that in the script that... (2 Replies)
I am getting the below given errors for the following program though all the variables have been declared and used appropriately. Please Help. The environment is AIX.
Error:
------
"gbsizeprofile.c", line 67.4: 1506-275 (S) Unexpected text 'void' encountered.
"gbsizeprofile.c", line 67.10:... (2 Replies)
Discussion started by: yschd
2 Replies
LEARN ABOUT FREEBSD
upscli_get
UPSCLI_GET(3) NUT Manual UPSCLI_GET(3)NAME
upscli_get - retrieve data from a UPS
SYNOPSIS
#include <upsclient.h>
int upscli_get(UPSCONN_t *ups, int numq, const char **query,
int *numa, char ***answer)
DESCRIPTION
The upscli_get() function takes the pointer ups to a UPSCONN_t state structure, and the pointer query to an array of numq query elements.
It builds a properly-formatted request from those elements and transmits it to upsd(8).
Upon success, the response will be split into separate components. A pointer to those components will be returned in answer. The number of
usable answer components will be returned in numa.
USES
This function implements the "GET" command in the protocol. As a result, you can use it to request many different things from the server.
Some examples are:
o GET NUMLOGINS <ups>
o GET UPSDESC <ups>
o GET VAR <ups> <var>
o GET TYPE <ups> <var>
o GET DESC <ups> <var>
o GET CMDDESC <ups> <cmd>
QUERY FORMATTING
To generate a request for GET NUMLOGINS su700, you would populate query and numq as follows:
int numq;
const char *query[2];
query[0] = "NUMLOGINS";
query[1] = "su700";
numq = 2;
All escaping of special characters and quoting of elements with spaces is handled for you inside this function.
ANSWER FORMATTING
The raw response from upsd to the above query would be NUMLOGINS su700 1. Since this is split up for you, the values work out like this:
numa = 3;
answer[0] = "NUMLOGINS"
answer[1] = "su700"
answer[2] = "1"
Notice that the value which you seek typically starts at answer[numq].
ERROR CHECKING
This function will check your query against the response from upsd(8). For example, if you send "VAR" "su700" "ups.status", it will expect
to see those at the beginning of the response.
If the results from upsd do not pass this case-insensitive test against your request, this function will return an error. When this
happens, upscli_upserror(3) will return UPSCLI_ERR_PROTOCOL.
ANSWER ARRAY LIFETIME
The pointers contained within the answer array are only valid until the next call to a upsclient function which references them. If you
need to use data from multiple calls, you must copy it somewhere else first.
The answer array and its elements may change locations, so you must not rely on previous addresses. You must only use the addresses which
were returned by the most recent call. You also must not attempt to use more than numa elements in answer. Such behavior is undefined, and
may yield bogus data or a crash.
The array will be deleted after calling upscli_disconnect(3). Any access after that point is also undefined.
RETURN VALUE
The upscli_get() function returns 0 on success, or -1 if an error occurs.
SEE ALSO upscli_list_start(3), upscli_list_next(3), upscli_strerror(3), upscli_upserror(3)Network UPS Tools 05/22/2012 UPSCLI_GET(3)