473,511 Members | 12,747 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

'clear' shell command in Makefile

Hello world,
I was just wondering why the clear-line in my Makefile does not work:

main:main.o $(ADDOBJS)
clear
@g++ -o main $(LDFLAGS) $+

As far as I understood it, it should be possible to add multiple
shell-commands.. Nevertheless, this does compile the files, but the
'clear' before does not work..

Anyone knows why?

Jul 1 '06 #1
9 5018
In article <11**********************@m73g2000cwd.googlegroups .com>,
silversurfer <ki****@web.de> wrote:
I was just wondering why the clear-line in my Makefile does not work: main:main.o $(ADDOBJS)
clear
@g++ -o main $(LDFLAGS) $+ As far as I understood it, it should be possible to add multiple
shell-commands.. Nevertheless, this does compile the files, but the
'clear' before does not work.. Anyone knows why?


That is not a question about C. Try asking in a newsgroup that
deals with the version of Make you are using. As you are using g++
it appears that you might be using FSF's gmake and so might want
to ask in one of the gnu newsgroups.
[In my opinion, putting a clear command into a Makefile is
a bad idea. But that's irrelevant in comp.lang.c]

--
All is vanity. -- Ecclesiastes
Jul 1 '06 #2
Sorry, I found many many posts about makefiles in this group so I did
not think it was a big deal..I'll ask somewhere else...thanks for the
lesson.

Walter Roberson schrieb:
In article <11**********************@m73g2000cwd.googlegroups .com>,
silversurfer <ki****@web.de> wrote:
I was just wondering why the clear-line in my Makefile does not work:

main:main.o $(ADDOBJS)
clear
@g++ -o main $(LDFLAGS) $+

As far as I understood it, it should be possible to add multiple
shell-commands.. Nevertheless, this does compile the files, but the
'clear' before does not work..

Anyone knows why?


That is not a question about C. Try asking in a newsgroup that
deals with the version of Make you are using. As you are using g++
it appears that you might be using FSF's gmake and so might want
to ask in one of the gnu newsgroups.
[In my opinion, putting a clear command into a Makefile is
a bad idea. But that's irrelevant in comp.lang.c]

--
All is vanity. -- Ecclesiastes


Jul 1 '06 #3
On 1 Jul 2006 08:45:08 -0700, "silversurfer" <ki****@web.de> wrote in
comp.lang.c:
Hello world,
I was just wondering why the clear-line in my Makefile does not work:

main:main.o $(ADDOBJS)
clear
@g++ -o main $(LDFLAGS) $+

As far as I understood it, it should be possible to add multiple
shell-commands.. Nevertheless, this does compile the files, but the
'clear' before does not work..

Anyone knows why?


You are posting to the wrong group, this is not a C language question
at all. You need to ask in a group that supports your particular OS
and development tool combination. Based on headers on your post, you
probably want news:comp.os.linux.development.apps.

--
Jack Klein
Home: http://JK-Technology.Com
FAQs for
comp.lang.c http://c-faq.com/
comp.lang.c++ http://www.parashift.com/c++-faq-lite/
alt.comp.lang.learn.c-c++
http://www.contrib.andrew.cmu.edu/~a...FAQ-acllc.html
Jul 1 '06 #4
silversurfer wrote:
Hello world,
I was just wondering why the clear-line in my Makefile does not work:

main:main.o $(ADDOBJS)
clear
@g++ -o main $(LDFLAGS) $+

As far as I understood it, it should be possible to add multiple
shell-commands.. Nevertheless, this does compile the files, but the
'clear' before does not work..

Anyone knows why?
I'm sure lots of people know. They probably hang out on groups where
things like make files are topical. This is not such a group. This group
discusses the C programming language. It might be that
comp.unix.programmer would be more appropriate, but check the group out
before posting since I could be wrong.

<OT>
Perhaps when run from with a makefile it does not see a terminal type
that supports clearing the screen.
</OT>
--
Flash Gordon, living in interesting times.
Web site - http://home.flash-gordon.me.uk/
comp.lang.c posting guidelines and intro:
http://clc-wiki.net/wiki/Intro_to_clc
Jul 1 '06 #5
silversurfer wrote:
Sorry, I found many many posts about makefiles in this group so I did
not think it was a big deal..I'll ask somewhere else...thanks for the
lesson.
<snip>

You obviously failed to read all the responses to the questions about
makefiles. Had you done so you would have seen that in almost every case
the questioner has been told that this is the wrong group.

Also, your reply belongs after the text you are replying to, not before.
With irrelevant material snipped, of course.
--
Flash Gordon, living in interesting times.
Web site - http://home.flash-gordon.me.uk/
comp.lang.c posting guidelines and intro:
http://clc-wiki.net/wiki/Intro_to_clc
Jul 1 '06 #6
silversurfer wrote:
Sorry, I found many many posts about makefiles in this group so I did
not think it was a big deal..I'll ask somewhere else...thanks for the
lesson.
Then you would have found that in every case there were several replies
explaining that such posts are off-topic. Just because there were posts
on a topic before does not mean that they received meaningful answers,
or that they were on topic.

That said, you seem to be lucky in this case in that Flash Gordon gave
you an off-topic answer which was also my first guess at why your
problem may be occurring. However that answer may not be correct, and
since the experts on 'make' and 'clear' inhabit other groups they
probably won't be here to correct the answer for you.

In future please also bottom-post (place your reply below the text that
it is replying to, and trim away any irrelevant text from the quote).

--
Simon.
Jul 3 '06 #7
In article <44**********@news.peopletelecom.com.au>,
Simon Biber <ne**@ralmin.ccwrote:
>In future please also bottom-post (place your reply below the text that
it is replying to, and trim away any irrelevant text from the quote).
"mid-post" is the preferred style.
(Selected Quotation, relevant response) repeat.
In very simple cases [eg. this post] this is equivilent to
bottom-posting, but "bottom-posting" implies putting -all- of the
quoted material at the top, followed by all of the response, even
if multiple topics are dealt with.
--
"law -- it's a commodity"
-- Andrew Ryan (The Globe and Mail, 2005/11/26)
Jul 3 '06 #8
ro******@ibd.nrc-cnrc.gc.ca (Walter Roberson) writes:
In article <44**********@news.peopletelecom.com.au>,
Simon Biber <ne**@ralmin.ccwrote:
>>In future please also bottom-post (place your reply below the text that
it is replying to, and trim away any irrelevant text from the quote).

"mid-post" is the preferred style.
(Selected Quotation, relevant response) repeat.
In very simple cases [eg. this post] this is equivilent to
bottom-posting, but "bottom-posting" implies putting -all- of the
quoted material at the top, followed by all of the response, even
if multiple topics are dealt with.
True, but the term "mid-post" is also consistent with top-posting; it
doesn't make it clear that the each piece of the response goes below
the piece of the previous article to which it responds.

I don't think we have a single term for the preferred style -- which
means we need to explain it each time. My usual way to explain it is:

Please don't top-post. See <http://www.caliburn.nl/topposting.html>.

--
Keith Thompson (The_Other_Keith) ks***@mib.org <http://www.ghoti.net/~kst>
San Diego Supercomputer Center <* <http://users.sdsc.edu/~kst>
We must do something. This is something. Therefore, we must do this.
Jul 3 '06 #9
silversurfer <ki****@web.dewrote:
Hello world,
I was just wondering why the clear-line in my Makefile does not work:

main:main.o $(ADDOBJS)
clear
@g++ -o main $(LDFLAGS) $+

As far as I understood it, it should be possible to add multiple
shell-commands.. Nevertheless, this does compile the files, but the
'clear' before does not work..

Anyone knows why?
Regardless of whether it's off-topic or whatever, (by the way, i have
a suspicion on why it works, but it's speculative), i think the much
more important issue is

why the @#$! do you want to do this? The first thing i would do on
encountering a makefile that cleared the screen at all, worse, in the
*middle* of the build would be to delete the offending line.
Jul 4 '06 #10

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

Similar topics

19
105746
by: Dave | last post by:
Hi, I have done some research, trying to Clear The Screen in java code. The first option was the obv: system.out.print("\n\n\n\n\n\n\n\n\n\n\n\n"); then i heard about this method:...
4
4053
by: rkoida | last post by:
Hello evryone I am a newbie to python. I have a makefile which i can compile in UNIX/LINUX, But i I am planning to write a python script which actually does what my MAKEFILE does. The make file...
8
1333
by: Siemel Naran | last post by:
Hi. I'm writing a command shell that reads commands from standard input. At this point I have the command in a std::string. Now I want to execute this command in the shell. From the Borland...
7
631
by: Dave | last post by:
Does anyone know of a Windows compatible command line tool that capable of parsing Microsoft's VC++ workspace/project (e.g., .dsw, .dsp, .sln, ..vcproj, etc.) files and generating an...
3
15980
by: brianj | last post by:
I have an older version of Cygwin (B20) under which "make" works fine. I recently installed the latest version of Cygwin. When I type "make" at the command prompt, I get the message: bash:...
22
4198
by: mp | last post by:
i have a python program which attempts to call 'cls' but fails: sh: line 1: cls: command not found i tried creating an alias from cls to clear in .profile, .cshrc, and /etc/profile, but none...
0
1386
by: chandan agarwal | last post by:
hi I have been given the task of building vc++ programs at the command line using make software. i have installed gnu make-3.81 version. i was able to build and run makefiles for turbo c++. but...
1
1539
by: Dave Programmer | last post by:
In a Makefile, I have something like the following: # makefile start X = "default_x" Y = "default_y" targA: dosomething -x $(X) -y $(Y)
1
7384
by: Shawn Minisall | last post by:
Does anyone know how to clear the shell screen completely ? I tried import os and then os.system("clear") was said to have worked in Windows XP, but it's just bringing up another window, then it...
0
7251
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
7148
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
7430
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...
1
7089
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
5673
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
4743
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3217
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
790
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
451
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

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.