where to put include files, multiple src directories


 
Thread Tools Search this Thread
Top Forums Programming where to put include files, multiple src directories
# 1  
Old 01-02-2012
where to put include files, multiple src directories

I have an issue with some fortran include files.

I have the following src directory structure,

trunk/src/client_main
trunk/src/client_models
trunk/src/server

The make file is at trunk/makefile.

In /src/client_main there are some included dependencies,
COMMON.BLK
PARAM.DAT
ERRORS.DAT

One complication is that there are nested includes such that the file PARAM.DAT has an include statement,

INCLUDE 'ERRORS.DAT'

These files also need to be included in src files in /src/client_models. In the past I have been able to do this by using a relative path for the include.
Code:
// trunk/src/client_models/SRC.FOR

INCLUDE '../client_main/PARAM.DAT'

Recently, when compiling under SUSE 12.1, the compiler complained about this. The problem was the INCLUDE 'ERRORS.DAT' in the PARAM.DAT file. While Cygwin, Cent, Scientific, and Ubuntu are able to locate the ERRORS.DAT file, the g++ 4 compiler under SUSE complained and gave me a file not found.

I would like to have this set up so that it will compile under all versions with the same syntax without doing some thing lame like putting a second copy of the dependencies in the src/client_models/ folder. Is there a baisc method for putting all of the included files in one place and being able to include them to src in different locations?

I have seen some thing implemented in the make where you specified an include location that was part of the compiler flags, but I'm not sure exactly how that worked.

I can probably post something to test if I haven't made this clear.

Thanks,

LMHmedchem
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Compress Files in Multiple Directories

I would like to compress the files in multiple directories. For some reason, it only compress the first directory (/Sanbox/logs1) but not the rest of the other directories ("/Sanbox/logs2" "/Sanbox/logs3" "/Sanbox/logs4" ). Any help would be appreciated. Here's my code: #!/bin/bash... (1 Reply)
Discussion started by: Loc
1 Replies

2. UNIX for Dummies Questions & Answers

Is there a good way to grep multiple directories without --include?

Hello. I consider myself a journeyman Unix user. I can handle most day to day tasks and have created some fairly complicated command queries, but this problem has defeated me so far. Any help would be greatly appreciated! We keep an archive in the file system with a directory structure in... (5 Replies)
Discussion started by: pauliesyllabic
5 Replies

3. Shell Programming and Scripting

Count files between multiple directories

Hi All, Everyday we will receive 33 files in our source directory(/prd/pk) with the current date. Once our jobs are completed all the 33 files immediately will be moved to backup folder (/prd/pk/backup). Now, I need to check between source file directory (/prd/pdk) and backup file directory... (3 Replies)
Discussion started by: suresh_target
3 Replies

4. Shell Programming and Scripting

perform 3 awk commands to multiple files in multiple directories

Hi, I have a directory /home/datasets/ which contains a bunch (720) of subdirectories called hour_1/ hour_2/ etc..etc.. in each of these there is a single text file called (hour_1.txt in hour_1/ , hour_2.txt for hour_2/ etc..etc..) and i would like to do some text processing in them. Each of... (20 Replies)
Discussion started by: amarn
20 Replies

5. Shell Programming and Scripting

FTP multiple files from multiple directories

I have multiple files that starts as TRADE_LOG spread across multiple folders in the given structure.. ./dir1/1/TRADE_LOG*.gz ./dir2/10/TRADE_LOG*.gz ./dir11/12/TRADE_LOG*.gz ./dir12/13/TRADE_LOG*.gz when I do ftp uisng mput from the "." dir I am getting the below given error mput... (1 Reply)
Discussion started by: prasperl
1 Replies

6. Shell Programming and Scripting

extract multiple cloumns from multiple files; skip rows and include filenames; awk

Hello, I am trying to write a bash shell script that does the following: 1.Finds all *.txt files within my directory of interest 2. reads each of the files (25 files) one by one (tab-delimited format and have the same data format) 3. skips the first 10 rows of the file 4. extracts and... (4 Replies)
Discussion started by: manishabh
4 Replies

7. Shell Programming and Scripting

Read multiple log files and create output file and put the result

OS : Linux 2.6.9-67 - Red Hat Enterprise Linux ES release 4 Looking for a script that reads the following log files that gets generated everynight between 2 - 5am Master_App_20090717.log Master_App1_20090717.log Master_App2_20090717.log Master_App3_20090717.log... (2 Replies)
Discussion started by: aavam
2 Replies

8. Shell Programming and Scripting

cd to multiple directories and gzipping files within

I am working on a Korn shell script that will cd into multiple directories that are listed in a flat file and gzip the contents of each directory. So far, this is what I have: 1) Find the 4 largest directories and place them into the file foo du -sk /some/directory/* | sort -rn | head -4... (0 Replies)
Discussion started by: sunsysadm2003
0 Replies

9. Shell Programming and Scripting

get files from multiple directories using FTP

Hi, I need to download multiple files in multiple directores from other Unix server. The files could have been created by differnet user. I can use root account but I want the preserve the owner and time of the remote file. Need help on how I can do this using FTP. Thanks, Amit (2 Replies)
Discussion started by: amit1209
2 Replies

10. UNIX for Dummies Questions & Answers

copy multiple files in different directories

I have a report file that is generated every day by a scheduled process. Each day the file is written to a directory named .../blah_blah/Y07/MM-DD-YY/reportmmddyy.tab I want to copy all of this reports to a separate directory without having to do it one by one. However, if I try cp... (3 Replies)
Discussion started by: ken2834
3 Replies
Login or Register to Ask a Question