Skip to content

Commit

Permalink
Merge pull request #38 from mitsuki31/jmatrix-patch-1
Browse files Browse the repository at this point in the history
Added `INCLUDE-SRC` option to `Makefile` (See #35 )
  • Loading branch information
mitsuki31 authored Jun 11, 2023
2 parents 616dc68 + f827114 commit 4243350
Show file tree
Hide file tree
Showing 2 changed files with 34 additions and 6 deletions.
2 changes: 1 addition & 1 deletion META-INF/MANIFEST.MF
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@ Built-By: Ryuu Mitsuki
License-File: LICENSE
Main-Class: com.mitsuki.jmatrix.Main
Program-Name: JMatrix
Program-Version: v1.0.0-beta.x
Program-Version: v1.0.0-beta.7
38 changes: 33 additions & 5 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
# >> Created by Ryuu Mitsuki

# WARNING! Don't change this version manually, it's autogenerated!
VERSION := 1.0.0-beta.x
VERSION := 1.0.0-beta.7
PREFIX := [jmatrix]

CC := javac
Expand Down Expand Up @@ -51,6 +51,12 @@ else
endif
endif


# Define null variable, user should defines it on CLI arguments
# if want to activate it (the value should "true")
INCLUDE-SRC ?=


ifeq "$(ARG1)" "clean"
ifeq "$(strip $(HAS_OUTPUT))" ""
$(error $(PREFIX) Program is uncompiled, failed to clean working directory)
Expand Down Expand Up @@ -79,16 +85,28 @@ all:
\n * check-verbose - Check the verbose status. \
\n * usage - Print the example usages for build the project."

@echo "\nAdditional Options:"
@echo " * Activating verbose output"

@echo "\n \`export VERBOSE=true\`"
@echo "\n Or:"
@echo "\n \`make [options] VERBOSE=true\`\n"

@echo " * Include source files while packaging"

@echo "\n \`export INCLUDE-SRC=true\`"
@echo "\n Or:"
@echo "\n \`make [options] INCLUDE-SRC=true\`\n"

@echo "\nUsage:"
@echo " $$ make [option1] [option2] [...]"
@echo " $$ make compile package"

@echo "\nTips:"
@echo " - Combine the options, Makefile can understand multiple rules."
@echo " - Use command: 'export VERBOSE=true' for activating verbose output, \
and check the verbose with 'check-verbose' option."

@echo "\nCreated by Ryuu Mitsuki"
@echo "\nAuthor:"
@echo " Ryuu Mitsuki"


check-verbose:
Expand Down Expand Up @@ -145,7 +163,17 @@ else
LICENSE -C $(CLASSES_PATH) .
endif

@echo "$(PREFIX) Successfully create jar file."
ifeq "$(INCLUDE-SRC)" "true"
@echo "\n$(PREFIX) INCLUDE-SRC option is ACTIVATED"
@echo "$(PREFIX) Adding the source files into jar..."
ifeq "$(MAKE_VERBOSE)" "true"
@jar uvf $(jar) -C $(SOURCES_PATH) .
else
@jar uf $(jar) -C $(SOURCES_PATH) .
endif
endif

@echo "$(PREFIX) Successfully created the jar file."
@echo "\nSAVED IN: \"$(jar)\""


Expand Down

0 comments on commit 4243350

Please sign in to comment.