Software :: Makefile Conditional Does Not Work?

Jan 29, 2010

I'm trying to write a make file to deploy software in a production setup.

The first thing I'm trying to do is detect if the user running the make is root.

From the documentation scattered about, I came up with this:

Code:

USERID=$(shell id -u)
all:
$(info User Id is $(USERID))
ifeq ($(REQUIRED_USER),0)
$(info Running as root... OK)

[Code]....

As you can see, in both situations, make executes both branches of the conditional.

View 6 Replies


ADVERTISEMENT

Programming :: Cannot Get Conditional Statements To Work In XDialog/Dialog

Feb 5, 2011

I cannot seem to get if else statements to work. if $choice == Dog then i want it to say "you selected Dog" The variable choice has the value Dog in it as proved at the end by echo "yes $choice is $choice" following the error Code: ./test.sh: 37: [$choice: not found How do i get the conditional statement to work? What's wrong here? This is the full script:

Code:

#! /bin/sh
: ${DIALOG=dialog}
: ${DIALOG_OK=0}

[code]....

View 7 Replies View Related

Slackware :: Makefile:535: /usr/src/linux-2.6.33.4/arch/i486/Makefile: No Such File Or Directory

May 31, 2010

I just downloaded slackware 13.1(x86) and i'm trying to compile ndiswrapper-1.56 using the slackbuild from slackbuils.org and i'm getting this error:

Code:

Makefile:535: /usr/src/linux-2.6.33.4/arch/i486/Makefile: No such file or directory
make[2]: *** No rule to make target `/usr/src/linux-2.6.33.4/arch/i486/Makefile'. Stop.
make[1]: *** [modules] Error 2
make: *** [all] Error 2

looks like the folder i486 doesn't exist

View 2 Replies View Related

Programming :: Make Recursive Makefile Work?

Jun 8, 2011

I'm trying to make recursive makefile work but it's giving me two problems. I have a top folder with the main Makefile and one Makefile for each sub folder 'one' and 'two'. Makefile in subfolder 'one' and 'two' are identical. The top Makefile (still a bit messy) looking like this:

Code:
# Directories
CC = gcc
CFLAGS = -Wall -Wextra
TARGET_DIR = bin
MAIN_FILE = one.c

[Code]...

View 4 Replies View Related

Ubuntu :: Mousetrap Doesnot Work \ Error:make: *** No Targets Specified And No Makefile Found?

Dec 17, 2010

i have installed mouse trap by the Ubuntu "easy peasy" software center ,but for some reason it didn't work so i uninstalled it and start to install the mouse trap from herehttp://live.gnome.org/MouseTrap/Installationbut when did the "make" step it gave me that error:make: *** No targets specified and no makefile found. Stop.so how i fix thatand another problem that i have is when i go to a live radio on the net to listen it dose not work how do i change it to work like i changed to the "vlc player" to be the first program that opens

View 2 Replies View Related

Software :: Conditional Operator In C?

Feb 24, 2010

if anyone knows plz explain this conditional operator timeout ? : MAX SCHEDULE_TIMEOUT

View 2 Replies View Related

Ubuntu :: Bash If/then Conditional Syntax?

Feb 7, 2011

I pride myself on at least trying to help myself before I ask, but I've been staring at this a long time, I'm just not getting any traction.I've literally got 3 linux references on my desk right now that say that I should be able to use if conditionals, for example

[ -d FILE ]True if FILE exists and is a directory.
[ -e FILE ]True if FILE exists.
[ -f FILE ]True if FILE exists and is a regular file.

[code]....

View 7 Replies View Related

Server :: Conditional (on Ip Address) /etc/issue.net Possible?

May 27, 2010

I'm running Debian with openssh 1:5.1p1-5 and I've got an operational and legal /etc/issue.net but I'd like to make it depend on the incoming IP address. To be more specific, I'd like to achieve that no banner is shown when logging in from my company's IP range(s) or when logging in from home, but any unknown address (potential intruder) should be confronted with our legal warning.Is this at all possible?The server is located off-site and only has one ethernet device active (i.e. I cannot say eth0 is external, eth1 is internal)

View 3 Replies View Related

Programming :: Conditional Foreach Loop In Perl?

Jun 1, 2010

#!/usr/bin/perl -w
use strict;
my @files = `ls -1`;

[code]...

View 2 Replies View Related

CentOS 5 :: Application Hangs In Conditional Wait?

Dec 18, 2009

I am facing the following issue. My application runs perfectly in red hat linux(32bit, 64bit physical m/c and 32 bit vmWare m/c) and in one version of centOS(32bit physical m/c - don't remember the version:Sorry). However when I am running the same application in CentOS 5.4 (64bit version) I face the following issues -

a. the application gets stuck in the conditional wait even though the signal is sent after the application has moved to conditional wait. b. vsftpd service start fails from within the application even though the service starts and stops peroperly from console.

View 6 Replies View Related

General :: BASH Script Alphabetical Conditional Operator Query?

Mar 14, 2010

I am using "if" to force a word under the condition that the first letter of that word must be a letter of the alphabet, regardless of capitalization, using the " "" != "" " syntax.

Like so:

Code:
if [[ "$interface" != "WHAT DO I PUT HERE?" ]] ; then
echo "Invalid input"
exit 1
fi

View 5 Replies View Related

Ubuntu Installation :: Difference Between "makefile" And "makefile.am"s

Jan 4, 2010

I'm installing a package but that package doesn't has "makeFile" file, it only has "makefile.am" and "makefile.in". therefore when ever i use the "make" command i get: "make: *** No targets specified and no makefile found. Stop."

View 2 Replies View Related

Programming :: Makefile Flags ?

May 19, 2010

I have problems with linking object files.

This is what I get:

View 8 Replies View Related

General :: Debugging A Makefile ?

Feb 24, 2011

Is it possible to debug a makefile? In a bash script I can use "set -x" so that all variables are shown with their values. I am looking for such feature in makefile to see the variables and their values.

View 2 Replies View Related

Programming :: MY_DEFINES In Makefile

Jul 20, 2010

I want to define _LINUX in my makefile which I would be using in my source code like #if _Linux. I do not want to #define _Linux __linux__ in my source code.

View 2 Replies View Related

Programming :: Set Different Paths In Makefile?

Oct 8, 2010

at present I compile the same code for different systems (cross compilers)I need to call libs and include paths for the different processors. At present I simply comment out the paths not needed

eg
#INCDIR = -I/cross1/.......
#INCDIR = -I/cross2/.......

[code]....

View 2 Replies View Related

Debian :: No Targets Specified And No Makefile Found

Feb 21, 2016

I seem to be running into this issue a lot when installing various programs. I downloaded and installed a tar file (Linux Wacom Project. xf86-input-wacom-0.32.0 specifically) for my Bamboo tablet. Here's what I did:

Code: Select allsudo apt-get install build-essential

Looks like everything went well, but it asked me for a CD?... I just ignored that and went to the next step in the guide.

Code: Select allsudo apt-get build-dep wacom-tools

Looks like everything went well here. But near the end I get this...

Code: Select allchecking for doxygen... no
configure: WARNING: doxygen not found - documentation targets will be skipped
checking for rint in -lm... yes
checking for XORG... no
configure: error: in `/home/mason/Desktop/xf86-input-wacom-0.32.0':
configure: error: The pkg-config script could not be found or is too old.  Make sure it is in your PATH or set the PKG_CONFIG environment variable to the full path to pkg-config.

Alternatively, you may set the environment variables XORG_CFLAGS and XORG_LIBS to avoid the need to call pkg-config. See the pkg-config man page for more details.

I didn't really pay attention to THAT until I do...

Code: Select allcd ~/Desktop/linuxwacom-0.8.8-6
./configure --prefix=/usr
make

Where in I get this error message after I enter in Code: Select allmake at the terminal

Code: Select allmake: *** No targets specified and no makefile found.  Stop.

View 11 Replies View Related

Fedora :: Need Info On Makefile Basics?

Sep 27, 2010

Try to understand a Makefile. It has (all: $(VAR1) $(VAR20) Makefile). What does this "Makefile" mean?

View 2 Replies View Related

Fedora :: Installing The Driver From Makefile?

Oct 7, 2010

I have a linksys AE1000 wireless adapter, I have the proper driver, and I was able to install it on ubuntu to by typing cd (directory) make make install On Fedora 13 when i type su Cd (directory) make I get this after i hit enter after i type make

[root@Renegade wireless]# make
make -C tools
make[1]: Entering directory `/home/Renegade/wireless/tools'
gcc -g bin2h.c -o bin2h

[code].....

View 3 Replies View Related

General :: What Is Purpose Of Makefile In Nis Server

Aug 17, 2010

can anybody tell the use of make file in Nis server.

View 1 Replies View Related

General :: Why Some Makefile Is Missing After ./configure

Sep 1, 2010

I have encountered some cases that the ./configure log says:

config.status: creating xxx/Makefile

but when make fails on:

...
make[2]: Entering directory xxx
make[2]: *** No rule to make target `all', Stop
...

and xxx/Makefile is absent in the disk. Why does it happened?

View 1 Replies View Related

Installation :: How To Use A Makefile - Kernel Programming

Feb 25, 2009

I am a beginner in Linux. Never did any kernel programming in Linux/Windows before. I am now on a project and I am supposed to understand a Linux Device Driver Code. It contains 6 .c files and 1 Makefile.

The make file goes as this:

I have a.c b.c c.c d.c d.c e.c f.c in the director along with the Makefile mentioned.

I am using Fedora Red Hat Linux 32 bit.

How to compile the Makefile.

View 4 Replies View Related

General :: Can Source Filename Be Used In Makefile

May 7, 2010

in directory a_dir, have a file named a_file.i can type "source a_file" under directory a_dir and execute successfully.but if i write the command to a Makefile under directory b_dir, the "source" function can't be executed well. it will generate some error message like this:

./a_file: line 1: setenv: command not found
./a_file: line 2: setenv: command not found
./a_file: line 3: setenv: command not found
./a_file: line 5: setenv: command not found

View 3 Replies View Related

General :: How To Write Non Recursive Makefile

Dec 14, 2010

I want to write simple non recursive makefile, but I am not getting syntax of it. Please give me example with simple description. I had read docs, html's but I am not getting how that works please give simple example. consider I have following directory structure.

[Code]...

View 1 Replies View Related

General :: Writing Else If Condition In Makefile?

Mar 18, 2010

I need to write an else-if condition in a makefile, and though the format is posted on several websites, nothing seem to be working, andI get an error everytime. Could anybody please write a small example with an else-if conditional in a maekefile?

View 1 Replies View Related

Software :: [makefile] Complementing Env't Variables?

Jan 19, 2011

I'd like to write a top-level Makefile, and define environment variables further in deeper Makefiles:

/tmp# cat main.mk
Code:
export TEST=dummy
/tmp# cat sub.mk
Code:
include main.mk

[Code]...

1. How to complement an environment variable to add data as we chain multiple Makefiles?
2. How to actually export variables from Makefiles so that they are available in other Makefiles?

View 4 Replies View Related

Software :: No Targets Specified And Makefile Not Found

May 1, 2010

I download a package of tar.gz ...

1:firstly I extract it on desktop
2:Then use cd command and go to extracted folder
3:To install that package i use

sudo make install. Then I got a error message
"make: *** No targets specified and no makefile found. Stop."

View 4 Replies View Related

Software :: Makefile To Not Default Directories

Jun 3, 2010

I'm compiling some applications in a pc, using:

Code:
./configure
make
make install

but I want to run the applications in another pc, so I have used the option --prefix=/some/directory/ when executing ./configure, so I could just copy this folder to the other pc. However, my programs now need to have libraries and shared files in the same location that I used with --prefix, instead of /lib, /usr, etc.

View 2 Replies View Related

Software :: Why Makefile Is In Source Package

May 17, 2010

Makefile.in a file that is generated by tool, why it is in the source package? I am asking since , when I modified Makefile.am, I need to run automake to update the makefile.in, while I don't think this should be done manually.

View 2 Replies View Related

Programming :: Create A Simple Makefile Using C ?

Mar 26, 2011

How to create a simple Makefile using C....

View 3 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved