gnu

Is an empty target rule a viable substitute for .DEFAULT_GOAL in GNU Make?

GNU Make version 3.81 introduced a special variable named .DEFAULT_GOAL that can be used to tell Make which goal (or target) should be built if no target was specified on the command line. Otherwise Make will simply make the first target it encounters. Consider: bar: a b c ${MAKE_BAR_COMMANDS} foo: x y z ${MAKE_FOO_CO...

compiling c++ code using gnu/c getline() on mac osx?

...

How do I setup automake and autoconf to conditionally build programs (tests or otherwise)

I currently have 10 tests in my autotoolset project. Any time I make a change to one of my src/ files and recompile, each test is rebuilt and linked. This is starting to have a considerable impact on my development time. What is the best way to conditionally build binary programs, tests or otherwise, with GNU autotoolset? For instance, ...

How do I invoke a GNU make macro created using define?

Is there any difference in the two ways GREP is invoked in my Makefile? Any reason I should use one or the other? Both seem to produce the same result. define GREP $(word 3,$(shell echo "#define FOO 0xfff00100")) endef all: @echo $(GREP) @echo $(call GREP) ...

What is "Attempt to lookup host entry for bad IP address" error?

Hi All, Check this error and please help me. 2009-07-24 15:58:34.209 LBS[2636] Host 'staging.common.virtualearth.net' not found using 'gethostbyname()' - perhaps the hostname is wrong or networking is not set up on your machine 2009-07-24 15:58:34.209 LBS[2636] Attempt to lookup host entry for bad IP address (staging.common.virtualearth...

Format of parameter to display call graph for templated method with gprof?

What is the command line format to display function call graph for a method in templated class with gprof? For simple C method you would specify it like: gprof -f foo myprogram > gprof.output How do you specify method parse from the following: template <typename T> class A { public: template <typename X> bool parse(X& x,...

GNU C++ compiler

hi can anyone suggest me where ro download a GNU c++ compiler, which i can use in ubuntu and also on windows with Netbeans IDE. and also GNU tools. ...

How to get a foot into GNU developing?

Hi, I would like to start to contribute in some GNU software projects. Since some weeks I fancy with a specific project but I don't know how and when to start. I have the feel that you have to be firm with the following: A programming language gcc gdb make emacs the application itself patching CVS etc. So I'm trying to learn them a...

BSD md5 vs GNU md5sum output format?

Any one knows why BSD md5 program produces hash output in this format ... MD5 (checksum.md5) = 9eb7a54d24dbf6a2eb9f7ce7a1853cd0 ... while GNU md5sum produces much more sensible format like this? 9eb7a54d24dbf6a2eb9f7ce7a1853cd0 checksum.md5 As far as I can tell, the md5sum format is much easier to parse and makes more sense. How do...

Ensuring the existence of a user on a Debian GNU/Linux system

I'm currently working on a Debian package for an in-house program. As part of this package, I need to create the user which most of the functionality of the program runs as. I am doing this in the postinst script. The postinst script can be run several times (on upgrade, for example), so it's important to ensure that I'm not going to ...

Why does "find . -name *.txt | xargs du -hc" give multiple totals?

Hi All, I have a large set of directories for which I'm trying to calculate the sum total size of several hundred .txt files. I tried this, which mostly works: find . -name *.txt | xargs du -hc But instead of giving me one total at the end, I get several. My guess is that the pipe will only pass on so many lines of find's output at...

Changing the From address on emails from root

When we get sent emails from cron jobs etc., they tend to have a From address like "root [email protected]". Unfortunately, in Outlook, this only shows up as "root", which makes distinguishing between very similar emails from different machines quite tricky. How can I change the From address on these emails so it's something lik...

Can we include another Makefile in a GNU Makefile by using the relative path?

I have a Makefile in: project/all_app/myapp/src/Makefile I also have a master Depend.mk in project/Depend.mk Can I include the main Makefile by using the relative path? include ../../../../Depend.mk ...

Include problems when using CMake with Gnu on Qt project

Hi, I am starting a multiplatform (Win Xp, Linux) qt project. I want to use an out of source build so my directory structure is as followed: project/ CMakeLists.txt (global CMake file, includes other CMakeLists) build/ (my build directory) libA/ CMakeLists.txt mystuff/ subprojectA/ CMakeLists.txt s...

Writing a script to close screen session

I have a bunch of screen sessions running on my machine, but all of them are detached and unneeded. Is there a good way to just close all of them, so I have nothing when I type "screen -ls"? ...

Workaround for stack limit in windows with gnu g++

Hi, I have built and compiled a command line program with GNU g++ which "overflows" the stack for a number of reasons, mainly deep inheritance, lots of objects created, etc. So I followed this workaround on Mac OS X to solve the problem when linking: -Wl,-stack_size,0x10000000,-stack_addr,0xc0000000 Under Linux, I just tried ulimit -s...

Adding GNU GPL Licence to C# App

I know how to do this but I don't know is the StyleCop method true/working. Normally in StyleCop rules you must add this thing like this example to header (need to edit): //----------------------------------------------------------------------- // <copyright file="Widget.cs" company="Sprocket Enterprises"> // Copyright (c) Sprocket ...

How can I create directories using subversion version numbers in gnu make?

Thanks to 'Beta' my solution: RLS_DIRECTORY = $(shell svnversion -cn | sed 's/:/-/') SVN_VERSION = $(shell svnversion -cn | sed -r 's/.+://') RELEASE_NOTES = $(RLS_DIRECTORY:=/release-notes-$(SVN_VERSION:=.txt)) -include svn-version.mk SVN_OLD_VERSION ?= 0 .PHONY = all zip release release: $(RELEASE_NOTES) $(RLS_DIRECTORY): m...

Gnu Makefile - Handling dependencies

What approach do C++ programmers on Unix platform use to create and manage Makefiles? I was using hand made Makefiles for my projects but they don't handle header file changes and other dependencies. I googled around and found a good solution here. But I ran into a problem here in the sed command - sed -e 's/#.*//' -e 's/^[^:]*: ...

Kill detached screen session

I learned from somewhere a detached screen can be killed by screen -X -S [session # you want to kill] kill where [session # you want to kill] can be gotten from screen -ls . But this doesn't work. Anything wrong? What's the correct way? ...