Makefile -> pc precedence over c


 
Thread Tools Search this Thread
Top Forums Programming Makefile -> pc precedence over c
# 8  
Old 08-17-2008
I think one reason.

If compiler failed on creating .o file from .c file, I must modifiy .pc file.
But I often have modified .c file at many times. And it works.

After a while. I create .c file from .pc file again.
But because my modified code is overrided, compiler notify me same Error again.

Therefore it's wrong that .c file exists at the time when Error raised.
So make may remove temporary file made automatically.

Hey, era . As you say, I write ".PRECIOUS: %.c" in Makefile.
And .c files don't be removed. It's interesting and fun! Thank you.

Regards.
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Programming

Makefile for g++

Hi All, We have moved our OS from Sun Solaris to Linux and also some of the compilers. Our old makefile used to be as below: CC=cc FLAGS=-G -KPIC -DLG_SOLARIS_OS DEFINES=-DSunOS SYSLIBS=-lc .SUFFIXES : .c .c.o : ;$(CC) -c $(FLAGS) $(DEFINES) $*.c -o $*.o ... (3 Replies)
Discussion started by: shash
3 Replies

2. UNIX for Dummies Questions & Answers

What should be precedence of using awk, sed, head and tail in UNIX?

Hi All, I am new to unix. In this forum some days back, I have read something like below: 1) Do not use perl if awk can do your work. 2) Do not use awk if sed can do your work. . . . I do not re-collect the whole thing. I think it is good to know the precedence of using these... (2 Replies)
Discussion started by: Prathmesh
2 Replies

3. Shell Programming and Scripting

Precedence in operators issue

Hello, I am trying to write a small acript to change directory to $HOME depending on the user logged in. However when i provide this command say, ABC_USER=myself cd ~${ABC_USER} i am getting the following error, ksh: ~myself: not found I know i am doing something really silly but... (4 Replies)
Discussion started by: arvindspr06
4 Replies

4. Homework & Coursework Questions

Help with Simple Multi-Level Makefile (Extremely New at Makefile)

Use and complete the template provided. The entire template must be completed. If you don't, your post may be deleted! 1. The problem statement, all variables and given/known data: Basically, the prompt is make a makefile with various sub makefiles in their respective subdirectories. All code... (1 Reply)
Discussion started by: Tatl
1 Replies

5. UNIX for Advanced & Expert Users

Makefile executing another Makefile first?

I have 2 libraries in 2 different directories that I build with Makefiles. library B depends on library A. If I modify a .cpp file in library A and run lib B's Makefile can I have B's makefile to automatically rebuild library A? I am now rebuilding A, followed by B... but I'd like B to... (0 Replies)
Discussion started by: wwuster
0 Replies

6. 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

7. High Performance Computing

help with makefile

I am new to creating makefiles. I have several fortran programs in a folder called as "test" and also have several subroutines in another folder (which is inside this test folder) called as libry My makefile is in the folder "test" I want to create a makefile which can access the files in... (2 Replies)
Discussion started by: explorer
2 Replies

8. Shell Programming and Scripting

setting precedence with getopts

Hi, I am re-writing a script I wrote which emulated the "rm" command, in my orginal script I had problems with precedence, I did find a way round it by creating a seperate case statements which checked the options and performed the actions accordingly, does anyone know if I can use getopts... (1 Reply)
Discussion started by: jack1981
1 Replies

9. Shell Programming and Scripting

precedence of stderr and stdout

#!/usr/bin/perl open(STDOUT, ">>$Textfile") open(STDERR, ">>$Textfile") print "program running\n"; $final = join("+", $initial,$final) #5 close (STDOUT); close (STDERR);Hi all, above is my perl code. Notice i have captured the stdout and stderr to the same textfile. my code is expected to... (1 Reply)
Discussion started by: new2ss
1 Replies

10. Programming

EOF & precedence of !=

Gurus, I am teaching myself C and have a question. I wrote a small prog that reads characters as entered at the prompt and checks the value for EOF. Unless I am 100% wrong, the value will be '1' until getchar() has anything to read in my stream. /* PROG 1 */ #include <stdio.h> ... (4 Replies)
Discussion started by: alan
4 Replies
Login or Register to Ask a Question
Makefile::AST(3pm)					User Contributed Perl Documentation					Makefile::AST(3pm)

NAME
Makefile::AST - AST for (GNU) makefiles DESCRIPTION
The structure of this (GNU) makefile AST is designed based on GNU make's data base listing output produced by "--print-data-base". This AST library provides the following classes: Makefile::AST The primary class for ASTs. Provides interface for node adding and querying, such as "add_implicit_rule", "apply_implicit_rules", "add_explicit_rule", "apply_explicit_rules", "add_var", "add_auto_var", "get_var", as well as lots of other utility functions, like method "eval_var_value" for computing the ultimate values of makefile variables, method "enter_pad" and "leave_pad" for local variable's scoping pad. Makefile::AST::Rule::Base This is the base class for the rule nodes in the AST. It has properties like "normal_prereqs", "order_prereqs", "commands", and "colon". Makefile::AST::Rule This class represents the de-sugared form of simple rules and implicite rules after application. It inherits from Makefile::AST::Rule::Base, and adds new properties "target" and "other_targets". Makefile::AST::Rule::Implicit This class represents the implicit rule nodes in the AST. It inherits from Makefile::AST::Rule::Base, and adds new properties "targets", "match_anything", and "is_terminal". Makefile::AST::StemMatch This class encapsulates the file pattern matching (file names containing "%") and stem substitution algorithms. Makefile::AST::Variable It represents the makefile variable nodes in the AST, including "name", "value", "flavor", and "origin". Makefile::AST::Command Used to encapsulate information regarding makefile rule commands (e.g. command body, command modifiers "@", "-", "+", and etc.) as a whole. LIMITATIONS AND TODO
Adding support for other flavors' makes into this AST library should make a huge amount of sense. The most interesting candiate is Microsoft's NMAKE. 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) 2007-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::Evaluator, Makefile::Parser::GmakeDB, makesimple, pgmake-db, Makefile::DOM. perl v5.12.4 2011-08-17 Makefile::AST(3pm)