Skip to content

Commit

Permalink
Automatically generate a diff file
Browse files Browse the repository at this point in the history
  • Loading branch information
depressed-pho committed Jan 6, 2019
1 parent f16ad2a commit 2aa6543
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 6 deletions.
24 changes: 22 additions & 2 deletions am/mcpack.am
@@ -1,11 +1,31 @@
pack_base = $(PACKAGE_TARNAME)-$(PACKAGE_VERSION)
pack_name = $(pack_base).mcpack
pack_files = $(MCPACK_FILES:%.yaml=%.json)
pack_files = $(MCPACK_FILES:%.yaml=%.json) $(pack_base).diff

noinst_DATA += $(pack_name)
noinst_DATA += $(pack_name) $(pack_base).diff
CLEANFILES += $(pack_name)
EXTRA_DIST += $(filter-out manifest.json,$(filter-out manifest.yaml,$(MCPACK_FILES)))

$(pack_base).diff: $(MCPACK_FILES)
$(AM_V_GEN)
$(AM_V_at)(cd $(top_srcdir) && \
echo "This file contains all the differences from vanilla to $(PACKAGE_STRING)." | fold -s -w 79; \
echo; \
LC_ALL=C $(DIFF) \
--ignore-all-space \
--minimal \
--recursive \
--unidirectional-new-file \
--unified \
--exclude="$@" \
--exclude="*.svg" \
--exclude="*.in" \
--exclude="*.in~" \
--exclude="Makefile*" \
--exclude="manifest.*" \
orig src | \
$(SED) -e '/^Only in /d') > $@

$(pack_name): $(pack_files) $(MCPACK_EXTRA_FILES)
$(AM_V_GEN)
$(AM_V_at)rm -rf $(pack_base)
Expand Down
5 changes: 5 additions & 0 deletions configure.ac
Expand Up @@ -62,6 +62,11 @@ AS_IF([test x"$enable_perlin_stars" != x"no"],
[Define to introduce randomness in the brighness of stars.])])

# Checks for programs.
AC_ARG_VAR([DIFF], [The diff command @<:@autodetected@:>@])
AC_CHECK_PROGS([DIFF], [diff])
AS_IF([test "x$DIFF" = x],
[AC_MSG_ERROR([You need to install a diff command.])])

AC_ARG_VAR([SED], [The sed command @<:@autodetected@:>@])
AC_PROG_SED
AS_IF([test "x$SED" = x],
Expand Down
4 changes: 0 additions & 4 deletions src/shaders/glsl/renderchunk.fragment
Expand Up @@ -71,10 +71,6 @@ vec4 inColor = color;
diffuse.a *= inColor.a;
#endif

#if !defined(ALWAYS_LIT)
// diffuse *= texture2D( TEXTURE_1, uv1 );
#endif

#ifndef SEASONS
#if !USE_ALPHA_TEST && !defined(BLEND)
diffuse.a = inColor.a;
Expand Down

0 comments on commit 2aa6543

Please sign in to comment.