Sponsored Content
Top Forums Programming Makefile instructions to create directories (CentOS7 , GNU Make 3.82) Post 303043474 by disedorgue on Wednesday 29th of January 2020 11:18:21 AM
Old 01-29-2020
Hi,
You have bad declare TESTDIR variable ( Forgot '$' for '(OS)' ) :
Code:
TESTDIR = ./test/$(OS)_$(KERN).$(ARCH)_$(CNAME)_$(FNAME)_$(ver)

These 2 Users Gave Thanks to disedorgue For This Post:
 

10 More Discussions You Might Find Interesting

1. Programming

about create Makefile

hello! i want to create a Makefile on the freebsd 4.5,so i vi the hello.c #include int main(int argc, char** argv) { printf(''Hello, GNU!\n''); return 0; } #autoscan #cp configure.scan configure.in #vi configure.in modify:AC_OUTPUT AC_OUTPUT(Makefile) #aclocal #autoconf... (0 Replies)
Discussion started by: mzp
0 Replies

2. UNIX for Dummies Questions & Answers

make and clean in a single rule in the makefile.

Hi, This stems from the following thread https://www.unix.com/showthread.php?t=18299 I have a makefile which makes either executables or a shared library. i.e. make -f unix.mak will create the executables and make -f unix.mak libolsv will create the shared library. Since these have to be... (4 Replies)
Discussion started by: vino
4 Replies

3. Shell Programming and Scripting

check if multiple directories exist else create missing directories

Hi , I 'm trying to check if multiple directories exist on a server, if not create the missing ones and print " creating missing directory. how to write this in a simple script, I have made my code complex if ; then taskStatus="Schema extract directory exists, checking if SQL,Count and... (7 Replies)
Discussion started by: ramky79
7 Replies

4. Programming

A question about Makefile run by GNU make

Hello everybody, Currently I'm learning how to build projects (C programming) with GNU make. I have a problem with one Makefile and I would appreciate if you could kindly give me a hand. Here is the environment: OS: Redhat linux 5 compiler: gcc (GCC) 4.1.2 20080704 (Red Hat 4.1.2-44)... (2 Replies)
Discussion started by: dariyoosh
2 Replies

5. Shell Programming and Scripting

automake does not create Makefile.in

hi all, I have written a simple C program hello.c and a Makefile.ac but when i try to run automake it does not create Makefile.in hence I am not able to run ./configure command in my directory. Following are the containts of my prog. hello.c -------- Code: #include<stdio.h> main() {... (0 Replies)
Discussion started by: useless79
0 Replies

6. Shell Programming and Scripting

Need help with a script to make makefile

How do we create a shell script that creates a makefile? what if we want to use the #include header files too? (2 Replies)
Discussion started by: sslokhan
2 Replies

7. Programming

Makefile No rule to make target

I am trying to create a makefile to build a program and am getting the following error: make -f tsimplex.mk make: *** No rule to make target `/main/tsimplex_main.cpp', needed by `tsimplex_main.o'. Stop. OPSYS = $(shell uname -s ) TARGET = tsimplex ROOTDIR = ../../.. GTSDIR =... (1 Reply)
Discussion started by: kristinu
1 Replies

8. Shell Programming and Scripting

Bash script from makefile - it is called each time i call make

I've created a tag in the makefile: mytag: $(shell ${PWD}/script.sh) When i do: make clean - the script is executed When i perform make or make mytag the script is again executed with the output: make: Nothing to be done for mytag What i want ? I want script.sh to be executed only... (0 Replies)
Discussion started by: Pufo
0 Replies

9. Homework & Coursework Questions

Create Makefile from source files

1. The problem statement, all variables and given/known data: Create a makefile for a set of source files. Several sources files are given but we are not allowed to modify them. The goal is to create a makefile such that if a change is made to any of the source code files, the project can be... (5 Replies)
Discussion started by: pintu1228
5 Replies

10. Solaris

SunOS 5.5.1 usage of Makefile command in make file

I am new to Solaris and compilation using make files. I have a code base which is organized into different folders. At the root folder is a master make file and in the sub directories, there are make files for that particular folder. In the make files present in subdirectories, I am seeing... (2 Replies)
Discussion started by: rajujayanthy
2 Replies
Makefile::Parser::GmakeDB(3pm)				User Contributed Perl Documentation			    Makefile::Parser::GmakeDB(3pm)

NAME
Makefile::Parser::GmakeDB - GNU makefile parser using GNU make's database dump VERSION
This document describes Makefile::Parser::GmakeDB 0.215 released on 18 August 2011. SYNOPSIS
use Makefile::Parser::GmakeDB; my $db_listing = `make --print-data-base -pqRrs -f Makefile`; my $ast = Makefile::Parser::GmakeDB->parse($db_listing); DESCRIPTION
This module serves as a parser for GNU makefiles. However, it does not parse user's original makefile directly. Instead it uses Makefile::DOM to parse the "data base output listing" produced by GNU make (via its "--print-data-base" option). So essentially it reuses the C implementation of GNU make. This parser has been tested as a component of the pgmake-db utility and has successfully passed 51% of GNU make 3.81's official test suite. The result of the parser is a makefile AST defined by Makefile::AST. The "data base output listing" generated by "make --print-data-base" is a detailed listing for GNU make's internal data structures, which is essentially the AST used by "make". According to GNU make's current maintainer, Paul Smith, this feature is provided primarily for debugging the user's own makefiles, and it also helps the GNU make developer team to diagnose the flaws in make itself. Incidentally this output is conformed to the GNU makefile syntax, and a lot of important information is provided in the form of makefile comments. Therefore, my GmakeDB parser is able to reuse the Makefile::DOM module to parse this output listing. The data base output from GNU make can be divided into several clearly-separated segments. They're file header, "Variables", "Files", "VPATH Search Paths", as well as the last resource stats information. The contents of these segments are mostly obvious. The Files segment may deserve some explanation. It is the place for explicit rules. Now let's take the Variables segment as an example to demonstrate the format of the data base listing: # Variables # automatic <D = $(patsubst %/,%,$(dir $<)) # automatic ?F = $(notdir $?) # environment DESKTOP_SESSION = default # automatic ?D = $(patsubst %/,%,$(dir $?)) # environment GTK_RC_FILES = /etc/gtk/gtkrc:/home/agentz/.gtkrc-1.2-gnome2 # environment ... It's shown that the flavor and origin of the makefile variables are given in the previous line as comments. Hence feeding this back into GNU make again makes little sense. Similarly, the Files segment for explicit rules also puts big amount of the important information into makefile comments: # Files # Not a target: bar.c: # Implicit rule search has not been done. # Modification time never checked. # File has not been updated. all: foo.o bar.o # Implicit rule search has been done. # File does not exist. # File has not been updated. # variable set hash-table stats: # Load=0/32=0%, Rehash=0, Collisions=0/0=0% foo.o: foo.c # Implicit rule search has not been done. # Implicit/static pattern stem: `foo' # File does not exist. # File has not been updated. # variable set hash-table stats: # Load=0/32=0%, Rehash=0, Collisions=0/0=0% # commands to execute (from `ex2.mk', line 8): $(CC) -c $(CFLAGS) $< -o $@ ... From the previous two data base listing snippets, it's not hard to see that the variable references in rule commands and recursively- expanded variables's values are not expanded. Experiments have shown that GNU make will do implicit rule search for the first rule that needs to, but no more. This behavior means testing our own implicit rule searching algorithm requires specifying at least two goals that require matching. DEPENDENCIES
GNU make 3.81 At least the make executable of GNU make 3.81 is required to work with this module. Makefile::DOM BUGS
o GNU make does not escape meta characters appeared in rule targets and prerequisites in its data base listing. Examples are ":", "", and "#". This bug has been reported to the GNU make team as "Savannah bug #20067". This bug has not yet been fixed on the "make" side, so I have to work around this issue by preprocessing the data base listing in the makesimple script. o The data base listing produced by GNU make lacks the information regarding the "export" and "unexport" directives. It gives rise to the lack of information in the resulting AST structures constructed by this module. Hence the current AST and runtime do not implement the "export" and "unexport" directives. To make it even worse, there's no known way to work around it. I've already reported this issue to the GNU make team as Savannah bug #20069. CODE REPOSITORY
For the very latest version of this script, check out the source from http://github.com/agentzh/makefile-parser-pm <http://github.com/agentzh/makefile-parser-pm>. There is anonymous access to all. AUTHOR
Zhang "agentzh" Yichun "<agentzh@gmail.com>" COPYRIGHT AND LICENSE
Copyright (c) 2005-2008 by Zhang "agentzh" Yichun (agentzh). This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself. SEE ALSO
Makefile::AST, Makefile::AST::Evaluator, Makefile::DOM, makesimple, pgmake-db. perl v5.12.4 2011-10-01 Makefile::Parser::GmakeDB(3pm)
All times are GMT -4. The time now is 11:42 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy