Issue 66706 - Why is udkversion.mk in sal/inc?
Summary: Why is udkversion.mk in sal/inc?
Status: CLOSED FIXED
Alias: None
Product: Build Tools
Classification: Code
Component: solenv (show other issues)
Version: current
Hardware: All All
: P5 (lowest) Trivial (vote)
Target Milestone: OOo 2.0.4
Assignee: jsc
QA Contact: issues@tools
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-06-24 04:15 UTC by quetschke
Modified: 2006-10-19 08:54 UTC (History)
3 users (show)

See Also:
Issue Type: DEFECT
Latest Confirmation in: ---
Developer Difficulty: ---


Attachments
Move udkversion.mk to solenv/inc (2.33 KB, patch)
2006-07-03 20:11 UTC, quetschke
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this issue.
Description quetschke 2006-06-24 04:15:10 UTC
This is a follow-up to issue 66531:

------- Additional comments from vq Mon Jun 19 08:57:40 -0700 2006 -------

udkversion.mk lives in sal/inc/ and only sets UDK_{MAJOR,MINOR,MICRO} and
these doesn't seem to be used very often:

<http://go-oo.org/lxr/ident?i=UDK_MAJOR>

That file should move into solenv/inc/ and maybe we then move the .INCLUDE
into the projects that need the three macros. - Or set the three variables
in *env.set / solarenv (or what it is called) then we don't need the .INCLUDE.

------- Additional comments from hjs Mon Jun 19 09:43:33 -0700 2006 -------

@jsc: are the reasons not to put udkversion.mk into solenv still valid?
Comment 1 jsc 2006-06-26 07:48:57 UTC
 i think we still want to have this place to modify the UDK version numbers and
the udkversion.mk file is a simple way to administrate this numbers independent
from the build environment. 

The file is hosted in sal because sal is the first "real" source module and we
want to have this information in place in all later built modules. Dependent on
the mk file we generate a header file in sal which is used in other mouldes
later and even in sal to generate library names dependent on the udk version number.

Why move it? I don't see any real benefit and all people who would maybe change
the version numbers know where it is and don't have to search anywhere else.
Comment 2 quetschke 2006-06-26 17:15:53 UTC
> Why move it?
Because this:

%udkversion.mk : $(PRJ)$/inc$/udkversion.mk
	@+$(COPY) $(PRJ)$/inc$/udkversion.mk $@
 
.INCLUDE .IGNORE : $(SOLARVERSION)$/$(INPATH)$/inc$(UPDMINOREXT)$/udkversion.mk

is done for every dmake call, and thanks to our current infrastructure
and use of build.pl that are quite a few. Basically the toplevel makefile tries
to do the job of the module and creates/delivers udkversion.mk. Why do we have
per module makefiles? Can't we move all comands to settings.mk?

So you always trigger the inference and then you ignore if it doesn't work.

Luckily sal is one of the first modules, so that the inference stopps early.
After that you just needlessly clutter the toplevel makefiles.

And all this for three variables that are defined in a non-standard,
undocumented location.

(IMHO these three variables should go into solarenv / <os>env.set )
Comment 3 jsc 2006-06-27 08:30:07 UTC
ok i see, this rules are really nonsense i wasn't aware of them. I thought that
udkversion.mk is just delivered from sal. Under this circumstances i would agree
and we should move it into solenv/inc

A different approach would be to

.INCLUDE : $(PRJ)/inc/udkversion.mk
in sal before settings.mk and deliver the mk file normally.
In the place where the nonsense rule currently takes places
simply remove the .IGNORE and put an if around the inlcude

.IF "$(PRJNAME)"!="SAL"
.INCLUDE : $(SOLARVERSION)$/$(INPATH)$/inc$(UPDMINOREXT)$/udkversion.mk
.ENDIF

But of course moving the file into solenv/inc is probably the better or cleaner
solution.

> And all this for three variables that are defined in a non-standard,
undocumented location.
mmh, "non-standard, undocumented location" ... I am looking forward to a nicely
well documented overview of all variables, rules, ...  and a docu of the whole
build environment ;-)

So the question is open who will fix the issue. Do anybody of you have an
appropriate cws and can do it?

Comment 4 quetschke 2006-06-27 21:58:17 UTC
I complained, so I should fix it ;)

I would go with your

.IF "$(PRJNAME)"!="SAL"
.INCLUDE : $(SOLARVERSION)$/$(INPATH)$/inc$(UPDMINOREXT)$/udkversion.mk
.ENDIF

solution, but unfortunately sal is not the first module here, most often
the build starts with solenv and some external modules, so that would fail
without a .IGNORE .

So if you don't mind I'm going to move the file to solenv.

> mmh, "non-standard, undocumented location" ... I am looking forward to a
> nicely well documented overview of all variables, rules, ...  and a docu
> of the whole build environment ;-)

Oh, yeah! Me too ;-)
Comment 5 jsc 2006-06-28 08:51:16 UTC
We should move it into solenv/inc to be save.
Comment 6 quetschke 2006-07-03 20:11:34 UTC
Created attachment 37474 [details]
Move udkversion.mk to solenv/inc
Comment 7 quetschke 2006-07-03 20:18:06 UTC
Done in vq33. Reassining for verification.
Comment 8 quetschke 2006-07-03 20:18:35 UTC
@jsc: Please verify.
Comment 9 quetschke 2006-07-04 03:55:26 UTC
Hmm, this failed in odk. Tesing this fix now:

+++ odk/util/makefile.pmk       4 Jul 2006 02:52:54 -0000
@@ -188,7 +188,7 @@
 INCLUDEDIRLIST:={$(subst,/,$/ $(shell $(FIND) $(INCLUDETOPDIRLIST) -type d -pri
nt))}
 
 INCLUDEFILELIST=\
-    $(INCOUT)$/udkversion.mk \
+    $(SOLARENV)$/inc$/udkversion.mk \
     $(INCOUT)$/com$/sun$/star$/uno$/Any.h \
     $(INCOUT)$/com$/sun$/star$/uno$/Any.hxx \
     $(INCOUT)$/com$/sun$/star$/uno$/genfunc.h \
Comment 10 quetschke 2006-07-04 18:03:42 UTC
Already committed to vq33. Build finished without further problems.

@jsc: Please verify.
Comment 11 jsc 2006-07-10 13:21:02 UTC
all changes seems to be ok. Only one file was moved and a copy rule in the odk
module was adapted -> verified
Comment 12 jsc 2006-10-19 08:54:23 UTC
closed