9front - general discussion about 9front
 help / color / mirror / Atom feed
* replica mkfile patch
@ 2020-07-19  3:06 Amavect
  2020-07-19  3:40 ` [9front] " ori
  0 siblings, 1 reply; 4+ messages in thread
From: Amavect @ 2020-07-19  3:06 UTC (permalink / raw)
  To: 9front

[-- Attachment #1: Type: text/plain, Size: 545 bytes --]

description:
replica: fix mkfile script installation

The $SCRIPTS were added to $TARG, which complicates the all rule, as 
each script's object file must be suppressed.
Fix by removing $SCRIPTS from $TARG, removing the script object file 
suppression rule, and overriding the install rule.

The script bin install rule assumes that only one script install is 
called at a time. Valid calls like 'mk -a /$objtype/replica/changes 
/$objtype/replica/pull' will fail.
Fix by adding a for loop.

Remove the unused $UPDATE variable.

Thanks,
Amavect

[-- Attachment #2: replica.diff --]
[-- Type: text/plain, Size: 934 bytes --]

diff -r 38dcaeaa222c sys/src/cmd/replica/mkfile
--- a/sys/src/cmd/replica/mkfile	Sun May 24 17:50:37 2020 +0200
+++ b/sys/src/cmd/replica/mkfile	Sun Jul 19 02:36:32 2020 -0500
@@ -12,7 +12,6 @@
 	applylog\
 	compactdb\
 	updatedb\
-	$SCRIPTS\
 
 OFILES=\
 	db.$O\
@@ -20,29 +19,16 @@
 
 HFILES=all.h
 
-UPDATE=\
-	mkfile\
-	/sys/man/1/replica\
-	/sys/man/8/replica\
-	${OFILES:%.$O=%.c}\
-	revproto.c\
-	$HFILES\
-	applychanges.c\
-	updatedb.c\
-	${TARG:%=/386/bin/replica/%}\
-	${SCRIPTS:%=/rc/bin/replica/%}\
-	/rc/bin/replica/defs\
-
-
 BIN=/$objtype/bin/replica
 </sys/src/cmd/mkmany
 
 $O.applychanges: revproto.$O
 
 ${SCRIPTS:%=$BIN/%}:
-	{ echo '#!/bin/rc'; echo 'exec /rc/bin/replica/'^`{basename $target}^' $*' } >$target
+	for(i in $target){
+		echo '#!/bin/rc'
+		echo 'exec /rc/bin/replica/'^`{basename $i}^' $*'
+	} >$i
 	chmod +x $target
 
-${SCRIPTS:%=$O.%}:QV:
-	;
-
+install:V: ${TARG:%=$BIN/%} ${SCRIPTS:%=$BIN/%}


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [9front] replica mkfile patch
  2020-07-19  3:06 replica mkfile patch Amavect
@ 2020-07-19  3:40 ` ori
  2020-07-21  0:26   ` Amavect
  0 siblings, 1 reply; 4+ messages in thread
From: ori @ 2020-07-19  3:40 UTC (permalink / raw)
  To: amavect, 9front

> -UPDATE=\
> -	mkfile\
> -	/sys/man/1/replica\
> -	/sys/man/8/replica\
> -	${OFILES:%.$O=%.c}\
> -	revproto.c\
> -	$HFILES\
> -	applychanges.c\
> -	updatedb.c\
> -	${TARG:%=/386/bin/replica/%}\
> -	${SCRIPTS:%=/rc/bin/replica/%}\
> -	/rc/bin/replica/defs\
> -
> -
>  BIN=/$objtype/bin/replica
>  </sys/src/cmd/mkmany
>  

Looks good to me -- also, looking at UPDATE,
I see that we have a default update rule in
mkmany:

	update:V:
		update $UPDATEFLAGS $UPDATE

But we have no update binary. Anyone have
any idea what the goal of this rule was?

(Can we just delete it?)



^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [9front] replica mkfile patch
  2020-07-19  3:40 ` [9front] " ori
@ 2020-07-21  0:26   ` Amavect
  2020-07-21  1:59     ` ori
  0 siblings, 1 reply; 4+ messages in thread
From: Amavect @ 2020-07-21  0:26 UTC (permalink / raw)
  To: ori, 9front

> But we have no update binary. Anyone have
> any idea what the goal of this rule was?

If I remember, update was used to update the labs sources.
Clearly long gone.

Will this be committed soon?

Thanks,
Amavect


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [9front] replica mkfile patch
  2020-07-21  0:26   ` Amavect
@ 2020-07-21  1:59     ` ori
  0 siblings, 0 replies; 4+ messages in thread
From: ori @ 2020-07-21  1:59 UTC (permalink / raw)
  To: amavect, ori, 9front

>> But we have no update binary. Anyone have
>> any idea what the goal of this rule was?
> 
> If I remember, update was used to update the labs sources.
> Clearly long gone.
> 
> Will this be committed soon?
> 
> Thanks,
> Amavect

Yeah. I thought kvik was taking care of it, but since
he doesn't seem to have gotten to it yet, just did.

Thanks!



^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2020-07-21  1:59 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-07-19  3:06 replica mkfile patch Amavect
2020-07-19  3:40 ` [9front] " ori
2020-07-21  0:26   ` Amavect
2020-07-21  1:59     ` ori

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).