[Search for users] [Overall Top Noters] [List of all Conferences] [Download this site]

Conference smurf::buildhelp

Title:USG buildhelp questions/answers
Moderator:SMURF::FILTER
Created:Mon Apr 26 1993
Last Modified:Mon Jan 20 1997
Last Successful Update:Fri Jun 06 1997
Number of topics:2763
Total number of notes:5802

310.0. "Makefile magic for symlinks" by SMURF::FILTER (Automatic Posting Software - mail to flume::puck) Thu Sep 09 1993 19:45

Date Of Receipt: 	 9-SEP-1993 12:47:18.96
From: 	ABYSS::jtkohl "John Kohl"
To: 	abyss::buildhelp
CC: 	
Subj: 	Makefile magic for symlinks

In the final output, I want to create a symlink between command names,
like so:

lrwxr-xr-x   1 root     system         8 Aug 25 18:51 /usr/sbin/vquotaoff -> vquotaon

How can I set this up in the Makefile for ./usr/sbin/vquotaon?

John

T.RTitleUserPersonal
Name
DateLines
310.1Re: Makefile magic for symlinksSMURF::FILTERAutomatic Posting Software - mail to flume::puckWed Sep 15 1993 16:1290
Date Of Receipt: 	14-SEP-1993 23:01:30.91
From: 	WASTED::jmf "Joshua M. Friedman ULTRIX SDE  14-Sep-1993 2302"
To: 	jtkohl@wasted:zko.dec
CC: 	buildhelp@wasted:zko.dec
Subj: 	Re: Makefile magic for symlinks

John, did you get an answer to this yet?  If you look in ./Makefile
in agosminor, you'll see this example.  If you look in the file
 ./usr/lib/makefiles/template.mk  you'll find some more description
for the SYMLINKS rules (actually, I've attached it below).

Simple example with same name in different directories:

SYMLINKS                = lib bin
SYMLINKDIR1             = usr
SYMLINKDIR2             = /

in this example, for each of the target names 'lib' and 'bin', an
expression is constructed internally something like:
    ln -s ./${SYMLINKDIR1}/<target> ./${SYMLINKDIR2}/<target>

What you want, requiring a different name, is more tricky, and
you may have to experiment slightly based on the rules, but I
think it would be as follows:

In ./usr/sbin/Makefile, add the rules:

SYMLINKS              = vquotaon
SYMLINKDIR1           = .
SYMLINKDIR2           = .
vquotaon_SYMLINK      = vquotaoff

This should create the following in the output tree:

/usr/sbin/vquotaoff -> ./vquotaon

-josh


------- Forwarded Message

Return-Path: [email protected] 
Delivery-Date: Thu, 09 Sep 93 12:47:56 -0400
Return-Path: [email protected]
Received: by flambe.zk3.dec.com; id AA13190; Thu, 9 Sep 1993 12:47:54 -0400
Received: by abyss.zk3.dec.com (5.65/DEC-USSG-ZK3-ULTRIX-09/27/91);
	id AA12685; Thu, 9 Sep 1993 12:47:42 -0400
Received: by mountain.zk3.dec.com; id AA24589; Thu, 9 Sep 1993 12:47:41 -0400
Date: Thu, 9 Sep 1993 12:47:41 -0400
From: John T Kohl <[email protected]>
Message-Id: <[email protected]>
To: [email protected]
Subject: Makefile magic for symlinks
X-Us-Snail: DEC, 110 Spit Brook Road, M/S ZKO3-3/U14, Nashua, NH  03062
Status: RO

In the final output, I want to create a symlink between command names,
like so:

lrwxr-xr-x   1 root     system         8 Aug 25 18:51 /usr/sbin/vquotaoff -> vquotaon

How can I set this up in the Makefile for ./usr/sbin/vquotaon?

John


------- End of Forwarded Message

# If there are symbolic links to be installed (created), the following list
# need to be defined.
#
# SYMLINKS              = enlogin lpd lat motd
# SYMLINKDIR1           = ../init.d
# SYMLINKDIR2           = /sbin/rc0.d   /sbin/rc2.d     /sbin/rc3.d
#
# enlogin_SYMLINK       = K00enlogin    S25enlogin      nolink
# lpd_SYMLINK           = K05lpd        K00lpd          S65lpd
# lat_SYMLINK           = K07lat        K03lat          S58lat
# motd_SYMLINK          = nolink        nolink          S60motd
#
# The 'nolink' is special basicly allows for that entry point in the table to
# be skipped.
#
# The *_SYMLINK allows for the name of the symlink to be different than that
# of which it is linked against.
#
# SYMLINKDIR1 is the path to the link.
# SYMLINKDIR2 is the path where the link will be placed.