Skip to content

Commit

Permalink
Let rake be responsible for templates
Browse files Browse the repository at this point in the history
* In CRuby the template files are committed,
  and this Makefile is not used, instead common.mk is used.
  • Loading branch information
eregon committed Jun 29, 2023
1 parent 6bf9f1b commit d8ff272
Showing 1 changed file with 2 additions and 14 deletions.
16 changes: 2 additions & 14 deletions Makefile.in
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ CPPFLAGS := @DEFS@ -Iinclude
CFLAGS := @CFLAGS@ -std=c99 -Wall -Werror -Wextra -Wpedantic -Wundef -Wsign-conversion -fPIC -fvisibility=hidden
CC := @CC@

HEADERS := $(shell find include -name '*.h') include/yarp/ast.h
HEADERS := $(shell find include -name '*.h')
SOURCES := $(shell find src -name '*.c')
SHARED_OBJECTS := $(subst src/,build/shared/,$(SOURCES:.c=.o))
STATIC_OBJECTS := $(subst src/,build/static/,$(SOURCES:.c=.o))
Expand Down Expand Up @@ -42,22 +42,10 @@ build/static/%.o: src/%.c Makefile $(HEADERS)
$(Q) mkdir -p $(@D)
$(Q) $(CC) $(DEBUG_FLAGS) -DYP_STATIC $(CPPFLAGS) $(CFLAGS) -c -o $@ $<

include/yarp/ast.h: templates/include/yarp/ast.h.erb
$(ECHO) "generating $@"
$(Q) rake $@

clean:
$(Q) rm -f -r build

clobber: clean
$(Q) rm -f \
ext/yarp/api_node.c \
include/yarp/ast.h \
java/org/yarp/{AbstractNodeVisitor.java,Loader.java,Nodes.java} \
lib/yarp/{node,serialize}.rb \
src/{node.c,prettyprint.c,serialize.c,token_type.c}

.PHONY: clean clobber
.PHONY: clean

all-no-debug: DEBUG_FLAGS := -DNDEBUG=1
all-no-debug: OPTFLAGS := -O3
Expand Down

0 comments on commit d8ff272

Please sign in to comment.