Makefile: extract script to generate gitweb.js
Similar to the preceding commit, also extract the script to generate the "gitweb.js" file. While the logic itself is trivial, it helps us avoid duplication of logic across build systems and ensures that the build systems will remain in sync with each other in case the logic ever needs to change. Signed-off-by: Patrick Steinhardt <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
This commit is contained in:
1 parent
d2507bbbf4
commit
19d8fe7da6
2 files changed
+14
-1
No files matched your search
+2
-1
@@ -115,9 +115,10 @@ $(MAK_DIR_GITWEB)gitweb.cgi: $(MAK_DIR_GITWEB)gitweb.perl
|
||||
$(MAK_DIR_GITWEB)generate-gitweb-cgi.sh $(MAK_DIR_GITWEB)/GITWEB-BUILD-OPTIONS ./GIT-VERSION-FILE $< $@+ && \
|
||||
mv $@+ $@
|
||||
|
||||
$(MAK_DIR_GITWEB)static/gitweb.js: $(MAK_DIR_GITWEB)generate-gitweb-js.sh
|
||||
$(MAK_DIR_GITWEB)static/gitweb.js: $(addprefix $(MAK_DIR_GITWEB),$(GITWEB_JSLIB_FILES))
|
||||
$(QUIET_GEN)$(RM) $@ $@+ && \
|
||||
cat $^ >$@+ && \
|
||||
$(MAK_DIR_GITWEB)generate-gitweb-js.sh $@+ $^ && \
|
||||
mv $@+ $@
|
||||
|
||||
### Installation rules
|
||||
|
||||
Executable
+12
@@ -0,0 +1,12 @@
|
||||
#!/bin/sh
|
||||
|
||||
if test "$#" -lt 2
|
||||
then
|
||||
echo >&2 "USAGE: $0 <OUTPUT> <INPUT>..."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
OUTPUT="$1"
|
||||
shift
|
||||
|
||||
cat "$@" >"$OUTPUT"
|
||||
Reference in new issue
Block a user