Skip to content
Snippets Groups Projects
Forked from DM / dm-docs
261 commits behind, 86 commits ahead of the upstream repository.
Code owners
Assign users and groups as approvers for specific file changes. Learn more.
Makefile 1.08 KiB
TOP=../../..
ANT=dm-ant
ANT_ARGS=-Dlibs.CopyLibs.classpath=lib/org-netbeans-modules-java-j2seproject-copylibstask.jar 
BUILD_PROPERTIES_FILE=nbproject/private/private.properties
GENERIC_BUILD_PROPERTIES_FILE=$(BUILD_PROPERTIES_FILE).generic.build

all install: dist

clean clean-all clean-install distclean: ant-clean

.PHONY: propertiesFile
propertiesFile:
	if [ ! -f $(BUILD_PROPERTIES_FILE) ]; then cmd="cat $(GENERIC_BUILD_PROPERTIES_FILE) | sed 's?DM_GLASSFISH_DIR?$${DM_GLASSFISH_DIR}?g' > $(BUILD_PROPERTIES_FILE)" && eval $$cmd ; fi

.PHONY: ant-clean
ant-clean: propertiesFile
	$(ANT) $(ANT_ARGS)  clean

# For compiling from command line, we have to use generic build properties file
.PHONY: dist
dist: propertiesFile
	if [ -f $(BUILD_PROPERTIES_FILE) ]; then mv $(BUILD_PROPERTIES_FILE) $(BUILD_PROPERTIES_FILE).orig; fi
	cmd="cat $(GENERIC_BUILD_PROPERTIES_FILE) | sed 's?DM_GLASSFISH_DIR?$${DM_GLASSFISH_DIR}?g' > $(BUILD_PROPERTIES_FILE)" && eval $$cmd
	$(ANT) $(ANT_ARGS) dist 
	if [ -f $(BUILD_PROPERTIES_FILE).orig ]; then mv $(BUILD_PROPERTIES_FILE).orig $(BUILD_PROPERTIES_FILE); fi