Re: issue with dmake clean

2020-12-16 Thread Don Lewis
On 16 Dec, Arrigo Marchiori wrote:
> Hello all,
> 
> On Tue, Dec 15, 2020 at 05:56:48PM -0500, Carl Marcum wrote:
> 
>> On 12/15/20 3:37 PM, Peter Kovacs wrote:
>> > 
>> > On 15.12.20 20:14, Jim Jagielski wrote:
>> > > 
>> > > > On Dec 15, 2020, at 12:57 PM, Matthias Seidel
>> > > >  wrote:
>> > > > 
>> > > > Hi Carl,
>> > > > 
>> > > > Am 13.12.20 um 23:43 schrieb Carl Marcum:
>> > > > > Hi Matthias,
>> > > > > 
>> > > > > On 12/13/20 4:29 PM, Matthias Seidel wrote:
>> > > > > > Hi Carl,
>> > > > > > 
>> > > > > > Am 13.12.20 um 19:02 schrieb Carl Marcum:
>> > > > > > > Hi all,
>> > > > > > > 
>> > > > > > > Just ran into something.
>> > > > > > > 
>> > > > > > > I ran 'dmake clean' from main probably without having ran source
>> > > > > > >  and it removed all of my directories under 
>> > > > > > > main.
>> > > > > > Tried to do that on Windows (Cygwin64), went into main,
>> > > > > > did "autoconf",
>> > > > > > "dmake clean":
>> > > > > > 
>> > > > > > $ dmake clean
>> > > > > > -bash: dmake: command not found
>> > > > > > 
>> > > > > > Only after "source winenv.set.sh" it did clean up what it should...
>> > > > > It could be because I have a built and installed dmake on my system.
>> > > > > 
>> > > > > Thanks for checking!
>> > > > If an installed dmake does have this consequence we should have
>> > > > a closer
>> > > > look at it...
>> > > > 
>> > > It must be getting those commands from a makefile somewhere
>> > > though... dmake itself has no concept of 'clean' independent of what
>> > > a makefile tells it it is AFAIK
>> > 
>> > there is a makefile on that level. However I think it is for make and
>> > not for dmake. At least when I want to reset the build for sure I do a
>> > dmake clean (from instsetoo_native)first, followed by a make clean
>> > (main).
>> > 
>> > And the make clean has this rm command and removes all sorts of stuff.
>> > Could it be that if you execute dmake clean on main folder will let
>> > dmake read the make file ment for gnumake?
> [...]
>> I've had it happen twice now and it's a pain when it happens but probably
>> not dmake's fault.
> 
> If main/makefile.mk is used by dmake, then that could be the culprit.
> 
> The clean target does:
> 
>> clean .PHONY:
>> -rm -rf */$(INPATH)
> [... the rest is uninportant ...]
> 
> The INPATH variable is set by the Env.sh script
> If the env.sh script is not set, then the command is interpreted as:
> rm -rf */
> 
> I don't know dmake, but if it was GNU Make a possible fix would be
> something like:
> 
>> clean .PHONY:
>> if [ -z "$(INPATH)" ]; then echo "Environment not set!"; exit 1; fi
>> -rm -rf */$(INPATH)
> [... the rest same as above ...]

Something like that is what I would recommend.



-
To unsubscribe, e-mail: dev-unsubscr...@openoffice.apache.org
For additional commands, e-mail: dev-h...@openoffice.apache.org



Re: issue with dmake clean

2020-12-15 Thread Arrigo Marchiori
Hello all,

On Tue, Dec 15, 2020 at 05:56:48PM -0500, Carl Marcum wrote:

> On 12/15/20 3:37 PM, Peter Kovacs wrote:
> > 
> > On 15.12.20 20:14, Jim Jagielski wrote:
> > > 
> > > > On Dec 15, 2020, at 12:57 PM, Matthias Seidel
> > > >  wrote:
> > > > 
> > > > Hi Carl,
> > > > 
> > > > Am 13.12.20 um 23:43 schrieb Carl Marcum:
> > > > > Hi Matthias,
> > > > > 
> > > > > On 12/13/20 4:29 PM, Matthias Seidel wrote:
> > > > > > Hi Carl,
> > > > > > 
> > > > > > Am 13.12.20 um 19:02 schrieb Carl Marcum:
> > > > > > > Hi all,
> > > > > > > 
> > > > > > > Just ran into something.
> > > > > > > 
> > > > > > > I ran 'dmake clean' from main probably without having ran source
> > > > > > >  and it removed all of my directories under 
> > > > > > > main.
> > > > > > Tried to do that on Windows (Cygwin64), went into main,
> > > > > > did "autoconf",
> > > > > > "dmake clean":
> > > > > > 
> > > > > > $ dmake clean
> > > > > > -bash: dmake: command not found
> > > > > > 
> > > > > > Only after "source winenv.set.sh" it did clean up what it should...
> > > > > It could be because I have a built and installed dmake on my system.
> > > > > 
> > > > > Thanks for checking!
> > > > If an installed dmake does have this consequence we should have
> > > > a closer
> > > > look at it...
> > > > 
> > > It must be getting those commands from a makefile somewhere
> > > though... dmake itself has no concept of 'clean' independent of what
> > > a makefile tells it it is AFAIK
> > 
> > there is a makefile on that level. However I think it is for make and
> > not for dmake. At least when I want to reset the build for sure I do a
> > dmake clean (from instsetoo_native)first, followed by a make clean
> > (main).
> > 
> > And the make clean has this rm command and removes all sorts of stuff.
> > Could it be that if you execute dmake clean on main folder will let
> > dmake read the make file ment for gnumake?
[...]
> I've had it happen twice now and it's a pain when it happens but probably
> not dmake's fault.

If main/makefile.mk is used by dmake, then that could be the culprit.

The clean target does:

> clean .PHONY:
> -rm -rf */$(INPATH)
[... the rest is uninportant ...]

The INPATH variable is set by the Env.sh script
If the env.sh script is not set, then the command is interpreted as:
rm -rf */

I don't know dmake, but if it was GNU Make a possible fix would be
something like:

> clean .PHONY:
> if [ -z "$(INPATH)" ]; then echo "Environment not set!"; exit 1; fi
> -rm -rf */$(INPATH)
[... the rest same as above ...]

The GNU Make Makefile main/Makefile prevents this error. Its clean
target is in fact:

> clean:
> . ./*Env.Set.sh && \
> dmake clean

In English: first include the file ending with "Env.Set.sh" and only
then run "dmake clean".

I can issue a PR to fix makefile.mk but it will take me one or two
days; if no one can react any quicker, please let me know and I will
put this in my to-do list.

Regards,
-- 
rigo

http://rigo.altervista.org

-
To unsubscribe, e-mail: dev-unsubscr...@openoffice.apache.org
For additional commands, e-mail: dev-h...@openoffice.apache.org



Re: issue with dmake clean

2020-12-15 Thread Carl Marcum




On 12/15/20 3:37 PM, Peter Kovacs wrote:


On 15.12.20 20:14, Jim Jagielski wrote:


On Dec 15, 2020, at 12:57 PM, Matthias Seidel 
 wrote:


Hi Carl,

Am 13.12.20 um 23:43 schrieb Carl Marcum:

Hi Matthias,

On 12/13/20 4:29 PM, Matthias Seidel wrote:

Hi Carl,

Am 13.12.20 um 19:02 schrieb Carl Marcum:

Hi all,

Just ran into something.

I ran 'dmake clean' from main probably without having ran source
 and it removed all of my directories under main.
Tried to do that on Windows (Cygwin64), went into main, did 
"autoconf",

"dmake clean":

$ dmake clean
-bash: dmake: command not found

Only after "source winenv.set.sh" it did clean up what it should...

It could be because I have a built and installed dmake on my system.

Thanks for checking!
If an installed dmake does have this consequence we should have a 
closer

look at it...

It must be getting those commands from a makefile somewhere though... 
dmake itself has no concept of 'clean' independent of what a makefile 
tells it it is AFAIK


there is a makefile on that level. However I think it is for make and 
not for dmake. At least when I want to reset the build for sure I do a 
dmake clean (from instsetoo_native)first, followed by a make clean 
(main).


And the make clean has this rm command and removes all sorts of stuff. 
Could it be that if you execute dmake clean on main folder will let 
dmake read the make file ment for gnumake?


In total I do not have a high confidence in general in our build 
system. It is complicated and complex. And if some things do not fit 
it will do unexpected things.




It could very well be the result of me using the same session for many 
builds and switching back and forth between branches in the same 
terminal session.


I've had it happen twice now and it's a pain when it happens but 
probably not dmake's fault.


I'll see if I can recreate it in a consistent way and report back.

Thanks,
Carl

-
To unsubscribe, e-mail: dev-unsubscr...@openoffice.apache.org
For additional commands, e-mail: dev-h...@openoffice.apache.org



Re: issue with dmake clean

2020-12-15 Thread Peter Kovacs



On 15.12.20 20:14, Jim Jagielski wrote:



On Dec 15, 2020, at 12:57 PM, Matthias Seidel  
wrote:

Hi Carl,

Am 13.12.20 um 23:43 schrieb Carl Marcum:

Hi Matthias,

On 12/13/20 4:29 PM, Matthias Seidel wrote:

Hi Carl,

Am 13.12.20 um 19:02 schrieb Carl Marcum:

Hi all,

Just ran into something.

I ran 'dmake clean' from main probably without having ran source
 and it removed all of my directories under main.

Tried to do that on Windows (Cygwin64), went into main, did "autoconf",
"dmake clean":

$ dmake clean
-bash: dmake: command not found

Only after "source winenv.set.sh" it did clean up what it should...

It could be because I have a built and installed dmake on my system.

Thanks for checking!

If an installed dmake does have this consequence we should have a closer
look at it...


It must be getting those commands from a makefile somewhere though... dmake 
itself has no concept of 'clean' independent of what a makefile tells it it is 
AFAIK


there is a makefile on that level. However I think it is for make and 
not for dmake. At least when I want to reset the build for sure I do a 
dmake clean (from instsetoo_native)first, followed by a make clean (main).


And the make clean has this rm command and removes all sorts of stuff. 
Could it be that if you execute dmake clean on main folder will let 
dmake read the make file ment for gnumake?


In total I do not have a high confidence in general in our build system. 
It is complicated and complex. And if some things do not fit it will do 
unexpected things.


--
This is the Way! http://www.apache.org/theapacheway/index.html

-
To unsubscribe, e-mail: dev-unsubscr...@openoffice.apache.org
For additional commands, e-mail: dev-h...@openoffice.apache.org



Re: issue with dmake clean

2020-12-15 Thread Jim Jagielski


> On Dec 15, 2020, at 12:57 PM, Matthias Seidel  
> wrote:
> 
> Hi Carl,
> 
> Am 13.12.20 um 23:43 schrieb Carl Marcum:
>> Hi Matthias,
>> 
>> On 12/13/20 4:29 PM, Matthias Seidel wrote:
>>> Hi Carl,
>>> 
>>> Am 13.12.20 um 19:02 schrieb Carl Marcum:
 Hi all,
 
 Just ran into something.
 
 I ran 'dmake clean' from main probably without having ran source
  and it removed all of my directories under main.
>>> Tried to do that on Windows (Cygwin64), went into main, did "autoconf",
>>> "dmake clean":
>>> 
>>> $ dmake clean
>>> -bash: dmake: command not found
>>> 
>>> Only after "source winenv.set.sh" it did clean up what it should...
>> It could be because I have a built and installed dmake on my system.
>> 
>> Thanks for checking!
> 
> If an installed dmake does have this consequence we should have a closer
> look at it...
> 

It must be getting those commands from a makefile somewhere though... dmake 
itself has no concept of 'clean' independent of what a makefile tells it it is 
AFAIK



Re: issue with dmake clean

2020-12-15 Thread Matthias Seidel
Hi Carl,

Am 13.12.20 um 23:43 schrieb Carl Marcum:
> Hi Matthias,
>
> On 12/13/20 4:29 PM, Matthias Seidel wrote:
>> Hi Carl,
>>
>> Am 13.12.20 um 19:02 schrieb Carl Marcum:
>>> Hi all,
>>>
>>> Just ran into something.
>>>
>>> I ran 'dmake clean' from main probably without having ran source
>>>  and it removed all of my directories under main.
>> Tried to do that on Windows (Cygwin64), went into main, did "autoconf",
>> "dmake clean":
>>
>> $ dmake clean
>> -bash: dmake: command not found
>>
>> Only after "source winenv.set.sh" it did clean up what it should...
> It could be because I have a built and installed dmake on my system.
>
> Thanks for checking!

If an installed dmake does have this consequence we should have a closer
look at it...

I remember this bug in Steam:

https://www.theregister.com/2015/01/17/scary_code_of_the_week_steam_cleans_linux_pcs/

Regards,

   Matthias

>
>>
>> Regards,
>>
>>     Matthias
>>
>>> Looks like it ran 'rm -rf */'
>>>
>>> Best regards,
>>> Carl
>>>
>>> -
>>> To unsubscribe, e-mail: dev-unsubscr...@openoffice.apache.org
>>> For additional commands, e-mail: dev-h...@openoffice.apache.org
>>>
>
>
> -
> To unsubscribe, e-mail: dev-unsubscr...@openoffice.apache.org
> For additional commands, e-mail: dev-h...@openoffice.apache.org
>



smime.p7s
Description: S/MIME Cryptographic Signature


Re: issue with dmake clean

2020-12-13 Thread Carl Marcum

Hi Matthias,

On 12/13/20 4:29 PM, Matthias Seidel wrote:

Hi Carl,

Am 13.12.20 um 19:02 schrieb Carl Marcum:

Hi all,

Just ran into something.

I ran 'dmake clean' from main probably without having ran source
 and it removed all of my directories under main.

Tried to do that on Windows (Cygwin64), went into main, did "autoconf",
"dmake clean":

$ dmake clean
-bash: dmake: command not found

Only after "source winenv.set.sh" it did clean up what it should...

It could be because I have a built and installed dmake on my system.

Thanks for checking!



Regards,

    Matthias


Looks like it ran 'rm -rf */'

Best regards,
Carl

-
To unsubscribe, e-mail: dev-unsubscr...@openoffice.apache.org
For additional commands, e-mail: dev-h...@openoffice.apache.org




-
To unsubscribe, e-mail: dev-unsubscr...@openoffice.apache.org
For additional commands, e-mail: dev-h...@openoffice.apache.org



Re: issue with dmake clean

2020-12-13 Thread Matthias Seidel
Hi Carl,

Am 13.12.20 um 19:02 schrieb Carl Marcum:
> Hi all,
>
> Just ran into something.
>
> I ran 'dmake clean' from main probably without having ran source
>  and it removed all of my directories under main.

Tried to do that on Windows (Cygwin64), went into main, did "autoconf",
"dmake clean":

$ dmake clean
-bash: dmake: command not found

Only after "source winenv.set.sh" it did clean up what it should...

Regards,

   Matthias

>
> Looks like it ran 'rm -rf */'
>
> Best regards,
> Carl
>
> -
> To unsubscribe, e-mail: dev-unsubscr...@openoffice.apache.org
> For additional commands, e-mail: dev-h...@openoffice.apache.org
>



smime.p7s
Description: S/MIME Cryptographic Signature


issue with dmake clean

2020-12-13 Thread Carl Marcum

Hi all,

Just ran into something.

I ran 'dmake clean' from main probably without having ran source 
 and it removed all of my directories under main.


Looks like it ran 'rm -rf */'

Best regards,
Carl

-
To unsubscribe, e-mail: dev-unsubscr...@openoffice.apache.org
For additional commands, e-mail: dev-h...@openoffice.apache.org