wrcad / xictools

XicTools: Xic graphical editor, WRspice circuit simulator, and accessories. for electronic design.
http://wrcad.com
135 stars 39 forks source link

When building xictools, the error messages come out with the incorrect directory references #24

Open ElderDelp opened 3 weeks ago

ElderDelp commented 3 weeks ago

Hi Stephen,

I have been building the tools from source. When I run it, unexpected crashes happen and I cannot tell what I did. As a help, I wanted to check the various compiler warnings. For the most part, from emacs, compile-mode has trouble finding the files. I think that it comes from a common structure used by many:

distclean:
    -@for a in $(SUBDIRS) packages; do \
        if [ -d $$a ]; then \
            (cd $$a; make $@) \
        fi; \
    done
    -@rm -f config.cache config.log config.status configure Makefile
    -@rm -rf lib autom4te.cache
    -@rm -f include/config.h

The cd is not reported by make, so it leads to a problem for me as I try to find the sources.

I put in a pull request modifying (cd $$a; make $@) \ to ${MAKE} -C $$a $@; \.

distclean:
    -@for a in $(SUBDIRS) packages; do \
        if [ -d $$a ]; then \
            ${MAKE} -C $$a $@; \
        fi; \
    done
    -@rm -f config.cache config.log config.status configure Makefile
    -@rm -rf lib autom4te.cache
    -@rm -f include/config.h

With that modification, emacs takes me to the correct source all the time.

https://github.com/wrcad/xictools/pull/23

There were several place were the gcc -Wall complained about using an object after it is freed. They have all gone away. That part is a mystery.

=====================

Parallelization of recursive jobs in GNU make sugests using the template:

SUBDIRS = a b c
default: all
$(SUBDIRS)::
    $(MAKE) -C $@ $(MAKECMDGOALS)
all clean : $(SUBDIRS)

or, if there are some dependancies use this template:

SUBDIRS = app lib doc

default: all

app: lib

.PHONY: $(SUBDIRS)

$(SUBDIRS):
    $(MAKE) -C $@ $(MAKECMDGOALS)

all clean install: $(SUBDIRS)
ElderDelp commented 3 weeks ago

@wrcad just commited the first part of this issue, Thanks. If you would like another pull request that supports the parallel builds of subdirs, I would be happy to prepare one for that.

wrcad commented 3 weeks ago

Yes, a pull request for enabling parallel builds would be great. Thanks!

On Jun 13, 2024, at 11:56 AM, Elder Delp @.***> wrote:

@wrcad https://github.com/wrcad just commited the first part of this issue, Thanks. If you would like another pull request that supports the parallel builds of subdirs, I would be happy to prepare one for that.

— Reply to this email directly, view it on GitHub https://github.com/wrcad/xictools/issues/24#issuecomment-2166558608, or unsubscribe https://github.com/notifications/unsubscribe-auth/AEZ4PVEX4FTEY3W3HH7QJEDZHHTNVAVCNFSM6AAAAABJHGSKNWVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDCNRWGU2TQNRQHA. You are receiving this because you were mentioned.

ElderDelp commented 3 weeks ago

I am working on a pull request for enabling parallel builds .

For now I am deferring the wrspice module. Parts of that module are created from a .tgz file, e.g., the examples. That is a impressive set of scripts... I will work on that a bit later when I have clear mind to load up the full sequence.