Skip to content
Snippets Groups Projects
Commit ff9e9a09 authored by Albert Gräf's avatar Albert Gräf
Browse files

Make things work when building in a static snapshot of the repo (not git).

parent ce6e3b76
No related branches found
No related tags found
No related merge requests found
......@@ -28,6 +28,8 @@
# realclean: put the sources into pristine state again (WARNING: this will get
# rid of any uncommitted source changes, too); use this as a last resort to
# get the sources into a compilable state again after things have gone awry
# NOTE: this target only works in a working copy of the git repo, not in
# static tarball snapshots of the source
all:
cd l2ork_addons && ./tar_em_up.sh -Tk
......@@ -48,9 +50,11 @@ clean:
cd Gem/ && rm -f gemglutwindow.pd_linux Gem.pd_linux
realclean:
git submodule deinit --all -f
git checkout .
git clean -dff
# git clean doesn't see these, but we need to get rid of them to prevent
# subsequent mysterious build failures
rm -rf pd/lib $(addprefix externals/disis/, flext/configure stk/configure)
# The rest require a working copy of the git repo.
test -d .git || (echo "Not a git repository, bailing out." && false)
git submodule deinit --all -f
git checkout .
git clean -dff
......@@ -292,7 +292,7 @@ then
# s_stuff.h when we copy it below. XXXNOTE AG: The build seems
# to work just fine even when skipping all this, so why again
# is this needed?
make -C .. git_version
test -f ../../pd/src/s_stuff.h || make -C .. git_version
cp ../../pd/src/g_all_guis.h ../../externals/build/include
cp ../../pd/src/g_canvas.h ../../externals/build/include
cp ../../pd/src/m_imp.h ../../externals/build/include
......
......@@ -373,13 +373,15 @@ doc_format:
# AG: The set_version target is broken since it modifies m_pd.h in-place
# during the build, which is a bad thing to do to files which are supposed to
# be kept in a source code repository. Instead, we create s_stuff.h from
# s_stuff.h.in, where the latter is kept in the repo and the former gets created
# from the latter by substituting PD_BUILD_VERSION.
# s_stuff.h.in, where the latter is kept in the repo and the former gets
# created from the latter by substituting PD_BUILD_VERSION. NOTE: This may
# fail if we're building in a static tarball snapshop of the repo, in which
# case we assume that a pre-generated s_stuff.h is supplied.
git_version: $(pd_src)/src/s_stuff.h.in
@cd $(pd_src)/src/ && \
@test -d $(cvs_root_dir)/.git && cd $(pd_src)/src/ && \
sed 's|^\(#define PD_BUILD_VERSION "\).*"|\1$(PD_BUILD_VERSION)"|' s_stuff.h.in > s_stuff.h.new && \
(test -f s_stuff.h && diff -q s_stuff.h s_stuff.h.new > /dev/null && rm -f s_stuff.h.new && echo s_stuff.h unchanged || (rm -f s_stuff.h && mv s_stuff.h.new s_stuff.h))
(test -f s_stuff.h && diff -q s_stuff.h s_stuff.h.new > /dev/null && rm -f s_stuff.h.new && echo s_stuff.h unchanged || (rm -f s_stuff.h && mv s_stuff.h.new s_stuff.h)) || test -f $(pd_src)/src/s_stuff.h
set_version:
# change Pd's version number to reflect the extended build
......@@ -422,7 +424,9 @@ distclean: cruft_clean
$(MAKE) -C $(abstractions_src) distclean
-$(MAKE) -C $(extensions_src) distclean
$(MAKE) -C $(externals_src) distclean
-$(MAKE) -C $(pd_src) distclean
# Make sure that we don't remove the precious s_stuff.h file if we're building
# outside of the repo.
-test -d $(cvs_root_dir)/.git && $(MAKE) -C $(pd_src) distclean || $(MAKE) -C $(pd_src) clean
test_locations:
@echo "PD_VERSION: $(PD_VERSION)"
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment