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
Mail::Message::Construct::Text(3pm)			User Contributed Perl Documentation		       Mail::Message::Construct::Text(3pm)

NAME
Mail::Message::Construct::Text - capture a Mail::Message as text SYNOPSIS
my $text = $msg->string; my $text = "$msg"; # via overload my @text = $msg->lines; my @text = @$lines; # via overload my $fh = $msg->file; my $line = <$fh>; $msg->printStructure; DESCRIPTION
Complex functionality on Mail::Message objects is implemented in different files which are autoloaded. This file implements the functionality related to creating message replies. METHODS
The whole message as text $obj->file() Returns the message as file-handle. $obj->lines() Returns the whole message as set of lines. In LIST context, copies of the lines are returned. In SCALAR context, a reference to an array of lines is returned. $obj->printStructure([FILEHANDLE|undef],[INDENT]) Print the structure of a message to the specified FILEHANDLE or the selected filehandle. When explicitly "undef" is specified as handle, then the output will be returned as string. The message's subject and the types of all composing parts are displayed. INDENT specifies the initial indentation string: it is added in front of each line. The INDENT must contain at least one white-space. example: my $msg = ...; $msg->printStructure(*OUTPUT); $msg->printStructure; my $struct = $msg->printStructure(undef); # Possible output for one message: multipart/mixed: forwarded message from Pietje Puk (1550 bytes) text/plain (164 bytes) message/rfc822 (1043 bytes) multipart/alternative: A multipart alternative (942 bytes) text/plain (148 bytes, deleted) text/html (358 bytes) $obj->string() Returns the whole message as string. Flags SEE ALSO
This module is part of Mail-Box distribution version 2.105, built on May 07, 2012. Website: http://perl.overmeer.net/mailbox/ LICENSE
Copyrights 2001-2012 by [Mark Overmeer]. For other contributors see ChangeLog. This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself. See http://www.perl.com/perl/misc/Artistic.html perl v5.14.2 2012-05-07 Mail::Message::Construct::Text(3pm)
All times are GMT -4. The time now is 10:55 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy