Skip to content

Commit

Permalink
Remove Makefiles in compiler/ and frontend/ (chapel-lang#25907)
Browse files Browse the repository at this point in the history
Ever since PR chapel-lang#20920, we have been using `cmake` to build the compiler
and frontend library. However, we have left the old `Makefile`s lying
around and have continued to maintain them as we add or remove files.
These Makefiles have been unused, except for in TAGS support.

This PR changes the TAGS support to use a `find` command to gather
source files in these directories and then removes these Makefiles that
are now completely unused.

Reviewed by @arezaii - thanks!

- [x] full comm=none testing
  • Loading branch information
mppf authored Oct 8, 2024
2 parents 2605b1f + 126a45b commit f892edb
Show file tree
Hide file tree
Showing 47 changed files with 8 additions and 1,907 deletions.
43 changes: 0 additions & 43 deletions compiler/AST/Makefile

This file was deleted.

23 changes: 0 additions & 23 deletions compiler/AST/Makefile.include

This file was deleted.

81 changes: 0 additions & 81 deletions compiler/AST/Makefile.share

This file was deleted.

33 changes: 8 additions & 25 deletions compiler/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -40,33 +40,16 @@ ALL_HEADERS= */*.h ../frontend/include/chpl/*/*.h

# Generate tags command, dependent on if Make variable, TAGS == 1
ifeq ($(TAGS), 1)
TAGS_COMMAND=-@(which $(CHPL_TAGS_UTIL) > /dev/null 2>&1 && echo "Updating TAGS..." && $(CHPL_TAGS_UTIL) $(CHPL_TAGS_FLAGS) $(ALL_SRCS) $(ALL_HEADERS)) || echo "$(CHPL_TAGS_UTIL) not available"
EBROWSE_COMMAND=-@(which ebrowse > /dev/null 2>&1 && echo "Updating BROWSE..." && ebrowse $(ALL_SRCS) $(ALL_HEADERS)) || echo "ebrowse not available"
$(info Gathering source files for ctags/etags)
COMPILER_SOURCES=$(shell find . -name '*.h' -or -name '*.cpp' -or -name '*.c')
FRONTEND_SOURCES=$(shell find ../frontend/lib -name '*.h' -or -name '*.cpp' -or -name '*.c')
FRONTEND_HEADERS=$(shell find ../frontend/include -name '*.h')
ALL_SOURCES=$(COMPILER_SOURCES) $(FRONTEND_SOURCES) $(FRONTEND_HEADERS)
# create the TAGS_COMMAND and EBROWSE_COMMAND variables for use later
TAGS_COMMAND=-@(which $(CHPL_TAGS_UTIL) > /dev/null 2>&1 && echo "Updating TAGS..." && $(CHPL_TAGS_UTIL) $(CHPL_TAGS_FLAGS) $(ALL_SOURCES)) || echo "$(CHPL_TAGS_UTIL) not available"
EBROWSE_COMMAND=-@(which ebrowse > /dev/null 2>&1 && echo "Updating BROWSE..." && ebrowse $(ALL_SOURCES)) || echo "ebrowse not available"
endif

#
# include source subdirectories here
# include these subdirs so ETAGS builds tags for .cpp files too
include ../frontend/lib/immediates/Makefile.include
include ../frontend/lib/parsing/Makefile.include
include ../frontend/lib/framework/Makefile.include
include ../frontend/lib/resolution/Makefile.include
include ../frontend/lib/types/Makefile.include
include ../frontend/lib/uast/Makefile.include
include ../frontend/lib/util/Makefile.include

include adt/Makefile.include
include AST/Makefile.include
include backend/Makefile.include
include codegen/Makefile.include
include llvm/Makefile.include
include main/Makefile.include
include optimizations/Makefile.include
include passes/Makefile.include
include resolution/Makefile.include
include util/Makefile.include


TARGETS = $(CHPL)

LIBS = -lm
Expand Down
43 changes: 0 additions & 43 deletions compiler/adt/Makefile

This file was deleted.

23 changes: 0 additions & 23 deletions compiler/adt/Makefile.include

This file was deleted.

26 changes: 0 additions & 26 deletions compiler/adt/Makefile.share

This file was deleted.

44 changes: 0 additions & 44 deletions compiler/backend/Makefile

This file was deleted.

23 changes: 0 additions & 23 deletions compiler/backend/Makefile.include

This file was deleted.

25 changes: 0 additions & 25 deletions compiler/backend/Makefile.share

This file was deleted.

Loading

0 comments on commit f892edb

Please sign in to comment.