1 # Armadillo File Manager
2 # Copyright (c) 2012, Robert Sesek <http://www.bluestatic.org>
4 # This program is free software: you can redistribute it and/or modify it under
5 # the terms of the GNU General Public License as published by the Free Software
6 # Foundation, either version 3 of the License, or any later version.
10 VERSION_NAMESPACE
=armadillo.Version
11 VERSION_FILE
=frontend
/version.js.proto2
12 VERSION_SOURCE
=$(basename $(VERSION_FILE
))
14 FRONTEND_SOURCES
=frontend
/jquery-1.7
.1.js \
17 frontend
/tv_renamer.js \
18 frontend
/path_control.js \
22 FRONTEND_BIN
=frontend
/armadillo.js
29 frontend
: $(FRONTEND_BIN
)
31 $(FRONTEND_BIN
): $(FRONTEND_SOURCES
)
32 echo
$(foreach f
,$^
,"document.write('<script src="fe
/$(notdir $f)"></script>');\n") > $(FRONTEND_BIN
)
36 compiled
: SOURCES_FLAGS
=$(foreach f
,$(FRONTEND_SOURCES
),--js
=$f)
38 java
-jar closure-compiler.jar \
40 --js_output_file
=$(FRONTEND_BIN
) \
41 --compilation_level
=SIMPLE_OPTIMIZATIONS
46 version
: STAMP
=$(shell date
+%s
)
47 version
: BUILD
=$(shell gitcrement current
)
49 @echo
"// This file is automatically generated." > $(VERSION_FILE
)
50 @echo
>> $(VERSION_FILE
)
51 @echo
"$$.namespace('$(VERSION_NAMESPACE)');" >> $(VERSION_FILE
)
52 @echo
>> $(VERSION_FILE
)
53 echo
"$(VERSION_NAMESPACE).MAJOR = $(VERSION_MAJOR);" >> $(VERSION_FILE
)
54 echo
"$(VERSION_NAMESPACE).MINOR = $(VERSION_MINOR);" >> $(VERSION_FILE
)
55 echo
"$(VERSION_NAMESPACE).BUILD = $(BUILD);" >> $(VERSION_FILE
)
56 echo
"$(VERSION_NAMESPACE).STAMP = $(STAMP);" >> $(VERSION_FILE
)
58 stamp_version
: stamp version
59 cp
$(VERSION_FILE
) $(VERSION_SOURCE
)
60 git commit
$(VERSION_SOURCE
) \
61 --author
='Armadillo Build Script <armadillo@bluestatic.org>' \
62 -m
'Stamp version.js @ $(shell gitcrement current)'