Sponsored Content
Top Forums Programming Makefile instructions to create directories (CentOS7 , GNU Make 3.82) Post 303043481 by LMHmedchem on Wednesday 29th of January 2020 12:37:43 PM
Old 01-29-2020
Quote:
Originally Posted by disedorgue
Another error that maybe explain why not work when to declare archdir before TESTDIR :
Code:
TESTDIR := ./test/$(OS)_$(KERN).$(ARCH)_$(CNAME)_$(FNAME)_$(ver)

So I wasn't expanding the components variables of TESTDIR correctly? I guess I should have at least noticed the TESTDIR was not being assigned using the same operator as BDIR.

I have tried now to use a similar method to copy files into the newly created directories and am having more issues. It seems to me as if the following code,
Code:
# create name for test directory
TESTDIR = ./test/$(OS)_$(KERN).$(ARCH)_$(CNAME)_$(FNAME)_$(ver)
# mkdir if the directory does not exist
${TESTDIR}:
    @mkdir -p ${TESTDIR}

overwrites the original value of TESTDIR which is,

./test/$(OS)_$(KERN).$(ARCH)_$(CNAME)_$(FNAME)_$(ver)

with the mkdir instruction such that if you printed ${TESTDIR} after the
second assignment, it would print,

mkdir -p ./test/$(OS)_$(KERN).$(ARCH)_$(CNAME)_$(FNAME)_$(ver)

with the variables such as $(OS) expanded. This would mean that you could no longer use $(TESTDIR) to refer to the location that was originally assigned.

Is this true or am I not understanding how this is working?

LMHmedchem
 

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
GMTLOGO(1gmt)						       Generic Mapping Tools						     GMTLOGO(1gmt)

NAME
gmtlogo - Adding a GMT graphics logo overlay to an illustration SYNOPSIS
gmtlogo dx dy [ -Gfill ] [ -W[pen] ] >> plot.ps DESCRIPTION
This scrips appends the GMT logo to an "open" PostScript file. The logo is 2 inches wide and 1 inch high and will be positioned with the lower left corner at the position (dx,dy) relative to the current plot origin. OPTIONS
-G Select color or pattern for filling the underlying box [Default is no fill]. (See SPECIFYING FILL below). -W Set pen attributes for the outline of the box [Default is no outline]. (See SPECIFYING PENS below). SPECIFYING PENS pen The attributes of lines and symbol outlines as defined by pen is a comma delimetered list of width, color and texture, each of which is optional. width can be indicated as a measure (points, centimeters, inches) or as faint, thin[ner|nest], thick[er|est], fat[ter|test], or obese. color specifies a gray shade or color (see SPECIFYING COLOR below). texture is a combination of dashes `-' and dots `.'. SPECIFYING FILL fill The attribute fill specifies the solid shade or solid color (see SPECIFYING COLOR below) or the pattern used for filling polygons. Patterns are specified as pdpi/pattern, where pattern gives the number of the built-in pattern (1-90) or the name of a Sun 1-, 8-, or 24-bit raster file. The dpi sets the resolution of the image. For 1-bit rasters: use Pdpi/pattern for inverse video, or append :Fcolor[B[color]] to specify fore- and background colors (use color = - for transparency). See GMT Cookbook & Technical Reference Appendix E for information on individual patterns. SPECIFYING COLOR color The color of lines, areas and patterns can be specified by a valid color name; by a gray shade (in the range 0-255); by a decimal color code (r/g/b, each in range 0-255; h-s-v, ranges 0-360, 0-1, 0-1; or c/m/y/k, each in range 0-1); or by a hexadecimal color code (#rrggbb, as used in HTML). See the gmtcolors manpage for more information and a full list of color names. SEE ALSO
GMT(1), gmtcolors(5), psimage(1) GMT 4.5.7 15 Jul 2011 GMTLOGO(1gmt)
All times are GMT -4. The time now is 05:35 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy