-
Notifications
You must be signed in to change notification settings - Fork 28
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update install process to fix class ucode link directives #255
base: master
Are you sure you want to change the base?
Conversation
d9a6012
to
e328749
Compare
@brucerennie DESTDIR can be passed in as an environment variable. It is used by the Debian package build system That is why your PR fails that test now, and the error shows as:
|
5a39cc9
to
77af74a
Compare
Changes made to the install process for make 1). addition of the compilation and execution of the program fixalllinks after the installation of the Unicon system into the current system 2). addition of additional class directories that should be transferred on install Signed-off-by: Bruce Rennie <[email protected]>
77af74a
to
a74dccc
Compare
It appears that the Debian install process requires ./fixalllinks instead of fixalllinks without the path specifier. Signed-off-by: Bruce Rennie <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank @brucerennie , I made a few suggestions, pleas let me know what you think.
@@ -234,7 +244,7 @@ Tbins=unicon icont iconx iconc unicont uniconx uniconc udb uprof unidep unidoc \ | |||
ui ivib patchstr iyacc rt.a rt.h | |||
|
|||
Tdirs=$(DESTDIR)$(ULB) $(DESTDIR)$(UIPL) $(DESTDIR)$(UPLUGINS) | |||
Udirs=lib 3d gui unidoc unidep xml parser | |||
Udirs=lib 3d gui ide unidoc unidep xml parser udb udb/dta udb/lib unicon |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why are we installing these extra directories? Are they being used as libraries similar to the existing dirs ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The extra directories contain useful ucode files. In addition, they also have updateable link directives. I added them for completeness. If you do not want to include them that is your prerogative.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The reason those are not included as the other ones is that they don't contain library files intended to be used by end users. ide, unicon, udb, etc, are meant to be used in their binary forms. They are also not on the IPATH/LPATH like the other ones, and that is why they are not included by default.
@@ -0,0 +1,130 @@ | |||
############################################################################ | |||
# | |||
# File: fixalllinks.icn |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
let us give the a more descriptive name in this context, maybe fixucodelinks.icn ?
Also, let us move the file down to a subdirectory. I suggest to uni/progs since we already have utilities there such as idxGen.icn that we use with docs.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Any required name changes or location placement changes that you require are a "go" as far as I am concerned. Let me know exactly want you want here and I'll make the appropriate changes.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @brucerennie
# | ||
# fixalllinks install.dir | ||
# | ||
# Within the Makefile, the install.dir is $(ULB) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The install location for "unicon library files" is $(ULB)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not a problem, I will update the comments shortly.
fname, | ||
bname, | ||
line, | ||
subdirectories := ["3d", "gui", "ide", "lib", "parser", "udb", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It is better if these subdirectories re passed in from the command line. Actually, we don't even have to do them all it was, but we could. Since the Makefile already does the follopwing:
@for d in $(Udirs); do \
echo "Installing uni/$$d to $(DESTDIR)$(ULB)/$$d ..."; \
$(INST) -m 644 uni/$$d/*.* $(DESTDIR)$(ULB)/$$d; \
done
we can just add a call to fix links as we go one directory at a time.
The reason for this is that we don't have change the file itself if we add/remove new subdirectory or if installing some of them became conditionals. Also, by generalizing it, a user can use it to patch ucode files for any reason when they are moved around.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'll check first that we can run it in this position and make sure that the code doesn't break.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It is better if these subdirectories re passed in from the command line. Actually, we don't even have to do them all it was, but we could. Since the Makefile already does the follopwing:
@for d in $(Udirs); do \ echo "Installing uni/$$d to $(DESTDIR)$(ULB)/$$d ..."; \ $(INST) -m 644 uni/$$d/*.* $(DESTDIR)$(ULB)/$$d; \ done
we can just add a call to fix links as we go one directory at a time.
The reason for this is that we don't have change the file itself if we add/remove new subdirectory or if installing some of them became conditionals. Also, by generalizing it, a user can use it to patch ucode files for any reason when they are moved around.
If we change to command line parameters, Bruce will have to change the present treatment of the log file. Currently, it is opened with "w" (which will erase the previous log file). We will need a way of starting again at the beginning of a fresh install.
if exists(destdir || "/" || sd || "/" || infilename || ".old") then { | ||
remove(destdir || "/" || sd || "/" || infilename || ".old") | ||
} | ||
rename(destdir || "/" || sd || "/" || infilename, destdir || "/" || sd || "/" || infilename || ".old") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Rename can fail. Is it worth checking for that?
# | ||
every sd := !subdirectories do { | ||
writes(logfile, "sub-directory:") | ||
destdirfs := open(write(logfile, destdir || "/" || sd), "r") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I wonder if it's worth computing prefix := destdir || "/" || sd || "/" and then replacing the multiple instances of destdir || "/" || sd // "/" || ... with prefix || ...
It might not make all that much difference to the run time, but it might make the code slightly easier to read.
No worries if you disagree.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks OK. I've made a couple of very minor comments but there are no show-stoppers that I can see.
Hi @brucerennie , any updates on this PR ? |
I have converted this pull request to a draft as I have been unable to get back to it due to various other matters. I will look at this again in the new year and make all appropriate updates per the various suggestions that have been made. |
Changes made to the install process for make
1). addition of the compilation and execution of the program fixalllinks
after the installation of the Unicon system into the current system
2). addition of additional class directories that should be transferred on install
3). update the call of fixalllinks to ./fixalllinks (caused problem with debian install process)
Signed-off-by: Bruce Rennie [email protected]