/
githubmirror
/
jtreg
Обзор
Документация
Войти
/
githubmirror
/
jtreg
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
master
make/Rules.gmk
123 строки
4 KB
Christian Stein
7903989: Default to no error if existing, make parent directories as needed
15 апр 2025, 17:58
15 апр 2025, 17:58
19cdb84
Код
Авторство
О чём код?
# # Copyright (c) 1996, 2025, Oracle and/or its affiliates. All rights reserved. # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. # # This code is free software; you can redistribute it and/or modify it # under the terms of the GNU General Public License version 2 only, as # published by the Free Software Foundation. Oracle designates this # particular file as subject to the "Classpath" exception as provided # by Oracle in the LICENSE file that accompanied this code. # # This code is distributed in the hope that it will be useful, but WITHOUT # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or # FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License # version 2 for more details (a copy is included in the LICENSE file that # accompanied this code). # # You should have received a copy of the GNU General Public License version # 2 along with this work; if not, write to the Free Software Foundation, # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. # # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA # or visit www.oracle.com if you need additional information or have any # questions. # #--------------------------------------------------------------------- # # Copy resources (*.properties) into classes directory from source tree $(CLASSDIR)/%.properties: $(JAVADIR)/%.properties $(RM) $@ $(MKDIR) $(@D) $(CP) $(@:$(CLASSDIR)/%=$(JAVADIR)/%) $@ $(CLASSDIR)/%.gif: $(JAVADIR)/%.gif $(RM) $@ $(MKDIR) $(@D) $(CP) $(@:$(CLASSDIR)/%=$(JAVADIR)/%) $@ $(CLASSDIR)/%.png: $(JAVADIR)/%.png $(RM) $@ $(MKDIR) $(@D) $(CP) $(@:$(CLASSDIR)/%=$(JAVADIR)/%) $@ $(CLASSDIR)/META-INF/services/%: $(JAVADIR)/META-INF/services/% $(RM) $@ $(MKDIR) $(@D) $(CP) $(@:$(CLASSDIR)/%=$(JAVADIR)/%) $@ #--------------------------------------------------------------------- $(CLASSDIR) $(BUILDDIR) $(BUILDDIR)/testClasses $(BUILDDIR)/testWork $(BUILDDIR)/testReport: $(MKDIR) $@ #---------------------------------------------------------------------- # # Build a JAR file containing the contents of any classes/* files # listed in the FILES.JAR.% # default copyright; override as necessary JAR_COPYRIGHT = -C $(TOPDIR) COPYRIGHT DATE_FMT = +%B %d, %Y ifdef SOURCE_DATE_EPOCH BUILD_DATE ?= $(shell LC_ALL=C date -u -d "@$(SOURCE_DATE_EPOCH)" "$(DATE_FMT)" 2>/dev/null || LC_ALL=C date -u -r "$(SOURCE_DATE_EPOCH)" "$(DATE_FMT)" 2>/dev/null || date -u "$(DATE_FMT)") else BUILD_DATE ?= $(shell date "$(DATE_FMT)") endif $(IMAGES_DIR)/%.jar: pkgsToFiles.sh $(RM) $@ $(@:$(IMAGES_DIR)/%.jar=$(BUILDDIR)/jarData/%) $(MKDIR) $(@D) $(MKDIR) $(@:$(IMAGES_DIR)/%.jar=$(BUILDDIR)/jarData/%) ( if [ -n "$(JAR_MAINCLASS)" ]; then echo "Main-class: $(JAR_MAINCLASS)" ; fi ; \ if [ -n "$(JAR_CLASSPATH)" ]; then echo "Class-Path: $(JAR_CLASSPATH)" ; fi ; \ echo "$(@F:%.jar=%)-Name: $(@F:%.jar=%)" ; \ if [ -n "$(BUILD_VERSION_STRING)" ]; then echo "$(@F:%.jar=%)-VersionString: $(BUILD_VERSION_STRING)" ; fi ; \ echo "$(@F:%.jar=%)-Version: $(BUILD_VERSION)" ; \ echo "$(@F:%.jar=%)-Milestone: $(BUILD_MILESTONE)" ; \ echo "$(@F:%.jar=%)-Build: $(BUILD_NUMBER)" ; \ echo "$(@F:%.jar=%)-BuildJavaVersion: `$(JDKJAVA) -fullversion 2>&1 | awk '{print $$NF}' | \ sed -e 's|^"\(.*\)"$$|Java(TM) 2 SDK, Version \1|'`" ; \ echo "$(@F:%.jar=%)-BuildDate: $(BUILD_DATE)" ; \ ) \ > $(@:$(IMAGES_DIR)/%.jar=$(BUILDDIR)/jarData/%/manifest.txt) sh pkgsToFiles.sh $(CLASSDIR) $($(@F:%.jar=PKGS.JAR.%)) > $(@:$(IMAGES_DIR)/%.jar=$(BUILDDIR)/jarData/%/includes.txt) $(JAR) -cmf $(@:$(IMAGES_DIR)/%.jar=$(BUILDDIR)/jarData/%/manifest.txt) $@ \ $(JAR_COPYRIGHT) \ @$(@:$(IMAGES_DIR)/%.jar=$(BUILDDIR)/jarData/%/includes.txt) \ $(patsubst $(CLASSDIR)/%,-C $(CLASSDIR) %,$(sort $(FILES.JAR.$(@F:%.jar=%)))) \ $(JAR_EXTRAS) $(CHMOD) a-w $@ #---------------------------------------------------------------------- # # Build zips with verbose names %-$(VERBOSE_ZIP_SUFFIX).zip: %.zip $(CP) $(@:%-$(VERBOSE_ZIP_SUFFIX).zip=%.zip) $@ %-$(NEW_VERBOSE_ZIP_SUFFIX).zip: %.zip $(RM) $@ $(LN) $(@:%-$(NEW_VERBOSE_ZIP_SUFFIX).zip=%.zip) $@ #---------------------------------------------------------------------- # # cancel implicit rules %: %.o %: %.obj %: %.dll %: %.c %: %.cc %: %.cpp %: %.C %: %.p %: %.f %: %.s %: %.F %: %.r %: %.S %: %.mod %: %.sh