Sponsored Content
Top Forums UNIX for Dummies Questions & Answers Simple make file questions....i think, thnx Post 302163470 by Roxydogg28 on Friday 1st of February 2008 04:39:30 AM
Old 02-01-2008
Simple make file questions....i think, thnx

Hello,

I'm a noob when comes to make files....

My intentions for the use of my make file are not that of a usual compilation, etc.

It is simply to copy some files from a RCS controlled area to a public area which has read rights only for a web page.

My dilemma comes in the form of sub directories and how to handle them and the files in them.

Let say that I have the following dir structures.

mydomain/public_htm/test1/test1sub/

mydomain/sourc_htm/test1/test1sub/

I want to copy all files from
mydomain/sourc_htm/test1
to
mydomain/public_htm/test1

as well as all the files in the sub directories.

i.e.
copy
mydomain/sourc_htm/test1/test1sub/
to
mydomain/public_htm/test1/test1sub/

Here is what I have so far:

DESTDIR1 = mydomain/public_htm/test1
DESTDIR2 = mydomain/public_htm/test1/test1sub

TARGETS1 = test1.html
TARGETS2 = testsub1.html .htaccess user.pass
SOURCES = test1.html testsub1.html .htaccess user.pass


all: $(TARGETS1) $(TARGETS2)


install1: $(TARGETS1)
if [ ! -d $(DESTDIR1) ] ; then mkdir -p $(DESTDIR1); fi
@for f in $(TARGETS1) ; \
do \
/usr/sbin/install -c $(DESTDIR1) -m 444 $$f ; \
done
install2: $(TARGETS2)
if [ ! -d $(DESTDIR2) ] ; then mkdir -p $(DESTDIR2); fi
@for f in $(TARGETS2) ; \
do \
/usr/sbin/install -c $(DESTDIR2) -m 444 $$f ; \
done

install: install1 install2


BTW, this make file resides in the dir:
mydomain/sourc_htm/test1/


I have used this approach when only one directory and multiple files need to be copied and it has worked.

I've read the man pages and the info pages and I'm still a bit lost on how to implement this.

I've seen the suggestions of having another make file in the sub directory, etc, etc, etc.

I really want to know what the best approach is, and some hints on how to implement it.

A few other things to note, it doesn't seem to want to copy over the .htaccess file, any suggestions.


Thank you in advance.

Matt
 

9 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Simple grep questions

Hi all, My boss wants me to find out how often e-m users are accessing their account:confused:. The mail server keeps log of all logins. I want to use grep the 'usernames', but it should come out the moment it first encounters the username in the log. Can I do that? I want to avoid 10+ greps... (2 Replies)
Discussion started by: nitin
2 Replies

2. UNIX for Dummies Questions & Answers

Simple questions

hi, i am a total dummy of unix. i want to find out the following information from my Sun Solaris 8 Unix machine: 1) The command to display physical and virtual memory 2) The command to display the CPU 3) The command to display the total harddisk space. thank u very much and have a nice... (3 Replies)
Discussion started by: champion
3 Replies

3. UNIX for Dummies Questions & Answers

2 Simple Questions

Hi, I am a dummy in unix. I have 2 simple questions. 1) I am the adminstrator. I want to set a alias that applied to all the users. I do not want to update each user's .profile or .cshrc file. So is there a way to update it in one file so that it applies to all users ? Example : I want... (1 Reply)
Discussion started by: champion
1 Replies

4. UNIX for Dummies Questions & Answers

2 simple questions the linux pros will be able to get. Pleese help!

Allright the situation is that i have a dual boot set up with windows xp and red hat 9.0. the problem is that my modem and sound card dont work with linux. I found a driver, and i have to download it with xp. My question is..... How do i actually copy the file to the linux... (4 Replies)
Discussion started by: nregenwether
4 Replies

5. Solaris

Questions about make -C in SunOS

I am using a SunOS to compile a project. The Makefile contains commands "$(MAKE) -C $$dir". However, in "man make" there is no -C option. I tried using MAKE=gmake but it failed too. My questions: 1. The make options for this SunOS is different from the gnu make options. Is it because of the... (4 Replies)
Discussion started by: yzhang
4 Replies

6. UNIX for Dummies Questions & Answers

Simple ed questions - insert line with dot

Hi I've got a trivial question on using ed (yes, I know, other editors are better!) How do I insert a line that is just a single dot? (That is, how do I insert a line that starts with a dot and then new line) Thanks Peter (4 Replies)
Discussion started by: peterl
4 Replies

7. Shell Programming and Scripting

Script to make simple recurring ascii file edit

Hi, I have an ascii file with recurring lines (the file is 36mb so lots of lines) which look like this: -2.5 -66.324-68.138 935.2 1.953 -0.664 272.617 73.684 -2.428 269.998 0.000 Every 14 lines there is a blank line. I would like to, for each non-blank line,... (2 Replies)
Discussion started by: blueade7
2 Replies

8. AIX

Simple AWK cleanup/questions AIX

I have an unfortunate need to redo a bunch of disk settings on a VIOS on AIX, so I was putting together a quick script to scrub everything it has, make the changes, and then put the mappings back. It works, I just am trying to get my awk a bit more up-to-snuff and wanted to know the proper way to... (2 Replies)
Discussion started by: Vryali
2 Replies

9. AIX

Simple questions about LPARs

Hello, I am looking into virtualizing AIX 7.1 on our p7 machine that already has AIX 7.1 installed on it. I have a few questions about them: 1) In order to gain LPAR functionality, do I need to purchase PowerVM software? 2) I read that LPARs are managed from locally attached graphical... (1 Reply)
Discussion started by: bstring
1 Replies
WDMD(8) 						      System Manager's Manual							   WDMD(8)

NAME
wdmd - watchdog multiplexing daemon SYNOPSIS
wdmd [OPTIONS] DESCRIPTION
This daemon opens /dev/watchdog and allows multiple independent sources to detmermine whether each KEEPALIVE is done. Every test interval (10 seconds), the daemon tests each source. If any test fails, the KEEPALIVE is not done. In a standard configuration, the watchdog timer will reset the system if no KEEPALIVE is done for 60 seconds ("fire timeout"). This means that if single test fails 5-6 times in row, the watchdog will fire and reset the system. With multiple test sources, fewer separate failures back to back can also cause a reset, e.g. T seconds, P pass, F fail T00: test1 P, test2 P, test3 P: KEEPALIVE done T10: test1 F, test2 F, test3 P: KEEPALIVE skipped T20: test1 F, test2 P, test3 P: KEEPALIVE skipped T30: test1 P, test2 F, test3 P: KEEPALIVE skipped T40: test1 P, test2 P, test3 F: KEEPALIVE skipped T50: test1 F, test2 F, test3 P: KEEPALIVE skipped T60: test1 P, test2 F, test3 P: KEEPALIVE skipped T60: watchdog fires, system resets (Depending on timings, the system may be reset sometime shortly before T60, and the tests at T60 would not be run.) A crucial aspect to the design and function of wdmd is that if any single source does not pass tests for the fire timeout, the watchdog is guaranteed to fire, regardless of whether other sources on the system have passed or failed. A spurious reset due to the combined effects of multiple failing tests as shown above, is an accepted side effect. wdmd will exit if a watchdog driver is not loaded. wdmd cannot be used on the system with any other program that needs to open /dev/watchdog, e.g. watchdog(8). Test Source: clients Using libwdmd, programs connect to wdmd via a unix socket, and send regular messages to wdmd to update an expiry time for their connection. Every test interval, wdmd will check if the expiry time for a connection has been reached. If so, the test for that client fails. (Other test sources such as scripts executed each test interval may be added in the future.) OPTIONS
-D Enable debugging to stderr and don't fork. -H num Enable (1) or disable (0) high priority features such as realtime scheduling priority and mlockall. Default 1. 2011-08-01 WDMD(8)
All times are GMT -4. The time now is 09:58 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy