Sponsored Content
Top Forums Programming [Makefile]File + constant problem Post 302636917 by Chrisdot on Tuesday 8th of May 2012 05:50:28 AM
Old 05-08-2012
[Makefile]File + constant problem

Hi guys,
I am writing a Makefile with some strange features.
What I have is:
list of files *.efi
list of guids (guid is just a number)

one *.efi file is supposed to be used with one guid, so efi file and guid is a pair.

What I need is:
list of files *.fv

How to make *.fv file from *.efi file?
Code:
 
$(SOME_COMMAND)  efi_file -some_flags   # produces *.efi.xyz file
$(ANOTHER_COMMAND) efi_xyz_file -some_flags guid # produces *.fv file

So $(SOME_COMMAND) and ($ANOTHER_COMMAND) must be done for each of *.efi - guid pair.

E.g

Code:
 
files = first.efi second.efi
guid = 544 123
 
#what must be done is:
$(SOME_COMMAND)  first.efi -some_flags   # produces first.efi.xyz file
$(ANOTHER_COMMAND) first.efi.xyz -some_flags 544 # prudces first.fv
 
$(SOME_COMMAND)  second.efi -some_flags   # produces second.efi.xyz file
$(ANOTHER_COMMAND) second.efi.xyz -some_flags 123 # produces second.fv

Do you have any concept how to prepare such a makefile? I tried with for loop but it's not designed to be used inside makefiles...
 

7 More Discussions You Might Find Interesting

1. Programming

File descriptor constant

I have a requirement to close all the file descriptors from 3 to 1024 for a particular application. Right now, this is how I do it .. for ( int i = 3 ; i <= 1024; ++i ) close(i); The change I am looking at is, I want to do away with the number 1024 and replace it with a constant which... (4 Replies)
Discussion started by: vino
4 Replies

2. Programming

Problem with a Makefile

Hi, I am very new with makefile topics , maybe this is a very symple question... I have this code wich compile very good ( I get it from the net), I will call it code A. I have to add it with a program that is all ready in use, (code B) that also compile good. When I put together it doesnt... (7 Replies)
Discussion started by: pmoren
7 Replies

3. Programming

Problem with makefile

My make file is CFLAGS = -Wall -g LDFLAGS = -lm CC = g++ all: server client rc4.o: rc4.cpp rc4.h ${CC} ${CFLAGS} -c rc4.cpp server.o: server.cpp rc4.h ${CC} ${CFLAGS} -c .cpp client.o: client.cpp rc4.h ${CC} ${CFLAGS} -c client.cpp server: server.o... (2 Replies)
Discussion started by: neerajgoyal12
2 Replies

4. UNIX for Advanced & Expert Users

Makefile problem - How to run module load in a Makefile

Hi, I'm trying to run the module load command in a Makefile and i'm getting the following error: make: module: command not found Why is this? Is there any way to run this command in a Makefile? NOTE: command - module load msjava/sunjdk/1.5.0 works fine outside of the Makefile (2 Replies)
Discussion started by: hernandinho
2 Replies

5. Programming

Problem with Makefile

Hi, Here is my makefile http://pastie.org/1104332. I am trying to compile different .c files and .s files (assembly files) from different sub directories into E:/em35x/build/mfg-sample-app-cortexm3-iar-em357-em3xx-dev0680/ then the linker should link all the .o files from the build directory... (1 Reply)
Discussion started by: blade2008
1 Replies

6. Emergency UNIX and Linux Support

Problem With Makefile

I had created a Makefile for my project. my project file hierarchy is like this: 1. a source folder with main.c and Makefile in it 2. and a top level Makefile here is the Makefile in src folder all: program program: main.c gcc -o program main.c clean: rm programand here is top... (3 Replies)
Discussion started by: majid.merkava
3 Replies

7. Shell Programming and Scripting

Reading from one file and updating other file with constant entries

Hi All, Thaks for the help in my last thread. I have one more question. I have two files with ldap entries in it. One file contains all the user LDAP parameter entries (26 MB) and other file contains only the user id's that have to be inactivated. Unix script has to read from the file that has... (8 Replies)
Discussion started by: Samingla
8 Replies
SYSTEMD-EFI-BOOT-GENERATOR(8)				    systemd-efi-boot-generator				     SYSTEMD-EFI-BOOT-GENERATOR(8)

NAME
systemd-efi-boot-generator - Generator for automatically mounting the EFI System Partition used by the current boot to /boot SYNOPSIS
/usr/lib/systemd/system-generators/systemd-efi-boot-generator DESCRIPTION
systemd-efi-boot-generator is a generator that automatically creates mount and automount units for the EFI System Partition (ESP), mounting it to /boot. Note that this generator will execute no operation on non-EFI systems, on systems where the boot loader does not communicate the used ESP to the OS, on systems where /boot is an explicitly configured mount (for example, listed in fstab(5)) or where the /boot mount point is non-empty. Since this generator creates an automount unit, the mount will only be activated on-demand, when accessed. systemd-efi-boot-generator implements the generator specification[1]. SEE ALSO
systemd(1), systemd.mount(5), systemd.automount(5), systemd-gpt-auto-generator(8), gummiboot(8), fstab(5) NOTES
1. generator specification http://www.freedesktop.org/wiki/Software/systemd/Generators systemd 208 SYSTEMD-EFI-BOOT-GENERATOR(8)
All times are GMT -4. The time now is 10:02 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy