mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
Add clean-srcs
Add `clean-srcs` target to clean sources in the build directory, and `realclean-srcs` target to clean autogenerated sources in the source directory. Also `realclean-srcs-extra` target to clean sources which are generatable but need to install extra commands, in addition. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@65947 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
65cec46e40
commit
8c8e72fb8b
2 changed files with 31 additions and 5 deletions
30
common.mk
30
common.mk
|
@ -622,12 +622,26 @@ distclean-spec: clean-spec
|
||||||
distclean-rubyspec: distclean-spec
|
distclean-rubyspec: distclean-spec
|
||||||
|
|
||||||
realclean:: realclean-ext realclean-local realclean-enc realclean-golf realclean-extout
|
realclean:: realclean-ext realclean-local realclean-enc realclean-golf realclean-extout
|
||||||
realclean-local:: distclean-local
|
realclean-local:: distclean-local realclean-srcs-local
|
||||||
|
|
||||||
|
clean-srcs:: clean-srcs-local clean-srcs-ext
|
||||||
|
realclean-srcs:: realclean-srcs-local realclean-srcs-ext
|
||||||
|
|
||||||
|
clean-srcs-local::
|
||||||
$(Q)$(RM) parse.c parse.h lex.c enc/trans/newline.c revision.h
|
$(Q)$(RM) parse.c parse.h lex.c enc/trans/newline.c revision.h
|
||||||
$(Q)$(RM) id.c id.h probes.dmyh
|
$(Q)$(RM) id.c id.h probes.dmyh probes.h
|
||||||
|
$(Q)$(RM) encdb.h transdb.h verconf.h ruby-runner.h
|
||||||
|
$(Q)$(RM) mjit_build_dir.c mjit_config.h rb_mjit_header.h
|
||||||
|
$(Q)$(RM) $(MJIT_MIN_HEADER) $(MJIT_MIN_HEADER:.h=)$(MJIT_HEADER_SUFFIX:%=*).h
|
||||||
|
|
||||||
|
realclean-srcs-local:: clean-srcs-local
|
||||||
$(Q)$(CHDIR) $(srcdir) && $(exec) $(RM) parse.c parse.h lex.c enc/trans/newline.c $(PRELUDES) revision.h
|
$(Q)$(CHDIR) $(srcdir) && $(exec) $(RM) parse.c parse.h lex.c enc/trans/newline.c $(PRELUDES) revision.h
|
||||||
$(Q)$(CHDIR) $(srcdir) && $(exec) $(RM) id.c id.h probes.dmyh
|
$(Q)$(CHDIR) $(srcdir) && $(exec) $(RM) id.c id.h probes.dmyh
|
||||||
$(Q)$(CHDIR) $(srcdir) && $(exec) $(RM) configure aclocal.m4 tool/config.guess tool/config.sub gems/*.gem
|
$(Q)$(CHDIR) $(srcdir) && $(exec) $(RM) configure aclocal.m4 tool/config.guess tool/config.sub gems/*.gem
|
||||||
|
|
||||||
|
clean-srcs-ext::
|
||||||
|
realclean-srcs-ext:: clean-srcs-ext
|
||||||
|
|
||||||
realclean-ext:: PHONY
|
realclean-ext:: PHONY
|
||||||
realclean-golf: distclean-golf
|
realclean-golf: distclean-golf
|
||||||
$(Q)$(RM) $(GOLFPRELUDES)
|
$(Q)$(RM) $(GOLFPRELUDES)
|
||||||
|
@ -970,10 +984,16 @@ EXT_SRCS = $(srcdir)/ext/ripper/ripper.c \
|
||||||
# EXT_SRCS
|
# EXT_SRCS
|
||||||
|
|
||||||
srcs-ext: $(EXT_SRCS)
|
srcs-ext: $(EXT_SRCS)
|
||||||
|
realclean-srcs-ext::
|
||||||
|
$(Q)$(RM) $(EXT_SRCS)
|
||||||
|
|
||||||
srcs-extra: $(srcdir)/ext/json/parser/parser.c \
|
EXTRA_SRCS = $(srcdir)/ext/json/parser/parser.c \
|
||||||
$(srcdir)/ext/date/zonetab.h \
|
$(srcdir)/ext/date/zonetab.h \
|
||||||
$(empty)
|
$(empty)
|
||||||
|
|
||||||
|
srcs-extra: $(EXTRA_SRCS)
|
||||||
|
realclean-srcs-extra::
|
||||||
|
$(Q)$(RM) $(EXTRA_SRCS)
|
||||||
|
|
||||||
LIB_SRCS = $(srcdir)/lib/unicode_normalize/tables.rb
|
LIB_SRCS = $(srcdir)/lib/unicode_normalize/tables.rb
|
||||||
|
|
||||||
|
|
|
@ -193,3 +193,9 @@ rdoc\:%: PHONY
|
||||||
|
|
||||||
test_%.rb test/%: programs PHONY
|
test_%.rb test/%: programs PHONY
|
||||||
+$(Q)$(exec) $(RUNRUBY) "$(srcdir)/test/runner.rb" --ruby="$(RUNRUBY)" $(TEST_EXCLUDES) $(TESTOPTS) $(patsubst test/%,%,$@)
|
+$(Q)$(exec) $(RUNRUBY) "$(srcdir)/test/runner.rb" --ruby="$(RUNRUBY)" $(TEST_EXCLUDES) $(TESTOPTS) $(patsubst test/%,%,$@)
|
||||||
|
|
||||||
|
clean-srcs-ext::
|
||||||
|
$(Q)$(RM) $(patsubst $(srcdir)/%,%,$(EXT_SRCS))
|
||||||
|
|
||||||
|
clean-srcs-extra::
|
||||||
|
$(Q)$(RM) $(patsubst $(srcdir)/%,%,$(EXTRA_SRCS))
|
||||||
|
|
Loading…
Reference in a new issue