473,405 Members | 2,167 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,405 software developers and data experts.

script in makefile problem

I wish to put a number of .db2 scripts in my makefile. However,
some of the db2 scripts tries to revoke privileges from users that
might do not have that privilege already, thus returns an error to
the
shell. I do not want the makefile to stop there, but simply ignore the
errors.

For example, I have the following in my makefile

run:
db2 -td@ script1.db2
db2 -td@ script2.db2
suppose one of the commands in script1.db2 fails (but does not
create a problem at all, like trying to drop a table that does not
exist),
the makefile will not proceed to the second script file.

How do i revise the commands so the makefile will run the second
script even if some of the commands in the first script fails?

Apr 16 '07 #1
1 2031
%NAME% wrote:
I wish to put a number of .db2 scripts in my makefile. However,
some of the db2 scripts tries to revoke privileges from users that
might do not have that privilege already, thus returns an error to
the
shell. I do not want the makefile to stop there, but simply ignore the
errors.

For example, I have the following in my makefile

run:
db2 -td@ script1.db2
db2 -td@ script2.db2
suppose one of the commands in script1.db2 fails (but does not
create a problem at all, like trying to drop a table that does not
exist), the makefile will not proceed to the second script file.

How do i revise the commands so the makefile will run the second
script even if some of the commands in the first script fails?
Standard prefixes for command lines in makefiles are @ and -. The @
means 'do not echo', and the '-' means ignore errors. Put a '-' in
front of each command that might fail. It goes after the leading tab
and before anything else (except, perhaps, the @).

There are other more radical ways of ignoring errors in makefiles (-k
option is OK in context, but this isn't one of those contexts; -i is
usually not OK; and .IGNORE doesn't bear thinking about).

--
Jonathan Leffler #include <disclaimer.h>
Email: jl******@earthlink.net, jl******@us.ibm.com
Guardian of DBD::Informix v2007.0226 -- http://dbi.perl.org/
Apr 17 '07 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: Bryan Olson | last post by:
Here's the problem: Suppose we use: import socket f = some_socket.makefile() Then: f.read() is efficient, but verbose, and incorrect (or at least does not play will with others);
3
by: rkoida | last post by:
Hello All I am working on a Problem to convert makefile in to a python script. Are there any Modules? Please try to comment. Thanks rkoida
1
by: Gg | last post by:
Hi, I have a project that depends on other projets. So I have a Makefile that calls Makefile of sub-projects to build the libs if needed. Once libs are built, the main Makefile link everything...
2
by: Juhan Voolaid | last post by:
Hello I need help with my makefile, so that when I compile my project the source code files would be separated from the object (*.o) files. So if I have: main.cpp and classes.cpp - the...
5
by: Efrat Regev | last post by:
Hello, I need to call GNU/make from within a Python script. This raised some problems: 1. The script is not in the directory of the makefile, and changing the locations of either is not an...
6
by: dolphin | last post by:
Hi! I am learing makefile recently.Now I have a problem. I write a very simple program just like "hello world" I write two makefile for it.One is included in another. the first is makefile...
6
by: ahlongxp | last post by:
socket.makefile() may lose data when "connection reset by peer". and socket.recv() will never lose the data. change the "1" to "0" in the client code to see the difference. confirmed on both...
1
by: rpjanaka | last post by:
I am using an open source library called IGI_UDP for measure the available bandwidth of a link (http://www.cs.cmu.edu/%7Ehnn/igi/ ). with that library they have provided a "Makefile" which is not an...
16
by: pereges | last post by:
Do you see anything wrong about this method ? For eg. I write a shell script a.sh containing : cc -o test file1.c file2.c file3.c and then execute the shell script ( sh a.sh) to compile and...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.