summaryrefslogtreecommitdiff
path: root/common.mk
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2018-11-24 04:34:00 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2018-11-24 04:34:00 +0000
commit8c8e72fb8bf316850a3b8b5ca5f149f59b0c1449 (patch)
treed428f1b5cb7e6e109f222501bf2b593db3686b40 /common.mk
parent65cec46e40132b84f1b3a725a136955e0be602df (diff)
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
Diffstat (limited to 'common.mk')
-rw-r--r--common.mk30
1 files changed, 25 insertions, 5 deletions
diff --git a/common.mk b/common.mk
index 3398caaba0..1a7fc52d23 100644
--- a/common.mk
+++ b/common.mk
@@ -622,12 +622,26 @@ distclean-spec: clean-spec
distclean-rubyspec: distclean-spec
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) 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) id.c id.h probes.dmyh
$(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-golf: distclean-golf
$(Q)$(RM) $(GOLFPRELUDES)
@@ -970,10 +984,16 @@ EXT_SRCS = $(srcdir)/ext/ripper/ripper.c \
# EXT_SRCS
srcs-ext: $(EXT_SRCS)
+realclean-srcs-ext::
+ $(Q)$(RM) $(EXT_SRCS)
+
+EXTRA_SRCS = $(srcdir)/ext/json/parser/parser.c \
+ $(srcdir)/ext/date/zonetab.h \
+ $(empty)
-srcs-extra: $(srcdir)/ext/json/parser/parser.c \
- $(srcdir)/ext/date/zonetab.h \
- $(empty)
+srcs-extra: $(EXTRA_SRCS)
+realclean-srcs-extra::
+ $(Q)$(RM) $(EXTRA_SRCS)
LIB_SRCS = $(srcdir)/lib/unicode_normalize/tables.rb