diff --git a/packages/Makefile b/packages/Makefile index 27359ebbb47484cbf7b0fd4222758ed2d9082033..c6c6659f916f11963b6bea38a08ae637c97c116e 100644 --- a/packages/Makefile +++ b/packages/Makefile @@ -258,7 +258,7 @@ welcome_install: echo "<link rel=\"stylesheet\" type=\"text/css\" href=\"http://puredata.org/ploneCustom.css\" />" >> $(WELCOME_FILE) echo "</head>" >> $(WELCOME_FILE) echo "<body><p><p>" >> $(WELCOME_FILE) - echo "<h2>Pd-l2ork version $(PD_L2ORK_VERSION) ($(PD_TEST_VERSION))</h2>" >> $(WELCOME_FILE) + echo "<h2>Pd-l2ork version $(PD_L2ORK_VERSION) ($(PD_BUILD_VERSION))</h2>" >> $(WELCOME_FILE) echo "<p>Pd-l2ork was written by Ivica Bukvic and Jonathan Wilkes. It is a fork of Hans-Christoph Steiner's Pd-extended, which in turn is based on Miller S. Puckette's Pd. The included Pd abstractions and externals are the work of many people whose contributions are gratefully acknowledged.</p>" >> $(WELCOME_FILE) echo "<font size=\"-1\">" >> $(WELCOME_FILE) echo "<p>`grep -A9 ACKNOWLEDG $(pd_src)/README.txt`</p>" >> $(WELCOME_FILE) @@ -279,7 +279,7 @@ readme_install: echo "<link rel=\"stylesheet\" type=\"text/css\" href=\"http://puredata.org/plone.css\" />" >> $(README_FILE) echo "</head>" >> $(README_FILE) echo "<body>" >> $(README_FILE) - echo "<h2>Pd-l2ork version $(PD_L2ORK_VERSION) ($(PD_TEST_VERSION))</h2>" >> $(README_FILE) + echo "<h2>Pd-l2ork version $(PD_L2ORK_VERSION) ($(PD_BUILD_VERSION))</h2>" >> $(README_FILE) echo "<p>Pd is a real-time, graphical programming language for media processing created by Miller S. Puckette. It provides an environment for audio analysis, synthesis, and processing, with a rich set of multimedia capabilities. You can get Pd for Linux, Windows, MacOS X, BSD, or IRIX.</p>" >> $(README_FILE) echo "<p>Pd-l2ork is a version of Pd based on Hans-Christoph Steiner's Pd-extended which features many bugfixes and enhancements, especially in the user interface. Pd-l2ork was created by Ivica Ico Bukvic and is maintained by a team of volunteers including Jonathan Wilkes who ported it to the Mac and Windows. It is available for Linux, Windows and MacOS X.</p>" >> $(README_FILE) echo "<p>For general information about Pd, go to: <a href=\"http://puredata.org\" target=\"pd\">http://puredata.org</a>. More information about Pd-l2ork can be found on the <a href=\"http://l2ork.music.vt.edu/main/make-your-own-l2ork/software/\" target=\"pd-l2ork\">Pd-l2ork website</a>.</p>" >> $(README_FILE) @@ -476,26 +476,26 @@ devsymlinks_clean: # 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, let's generate m_pd.h from -# m_pd.h.in, where the latter is kept in the repo and the former gets created -# from the latter when needed. +# 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. -git_version: $(pd_src)/src/m_pd.h.in +git_version: $(pd_src)/src/s_stuff.h.in cd $(pd_src)/src/ && \ - sed 's|^\(#define PD_TEST_VERSION "\).*"|\1$(GIT_VERSION)"|' m_pd.h.in > m_pd.h + sed 's|^\(#define PD_BUILD_VERSION "\).*"|\1$(PD_BUILD_VERSION)"|' s_stuff.h.in > s_stuff.h set_version: # change Pd's version number to reflect the extended build # this needs the complete_version_defines patch to work cd $(pd_src)/src/ && \ - sed 's|^\(#define PD_TEST_VERSION "\).*"|\1$(GIT_VERSION)"|' m_pd.h > \ + sed 's|^\(#define PD_TEST_VERSION "\).*"|\1$(PD_BUILD_VERSION)"|' m_pd.h > \ m_pd.h.tmp && mv m_pd.h.tmp m_pd.h unset_version: # change the version number back to the original # this needs the complete_version_defines patch to work cd $(pd_src)/src && \ - sed 's|^\(#define PD_TEST_VERSION ".*\)$(GIT_VERSION_PREFIX).*"|\1"|' \ + sed 's|^\(#define PD_TEST_VERSION ".*\)$(PD_BUILD_VERSION_PREFIX).*"|\1"|' \ m_pd.h > m_pd.h.tmp && \ mv m_pd.h.tmp m_pd.h @@ -560,7 +560,7 @@ patch_pd_devel: # change Pd's version number to reflect the extended build # this needs the complete_version_defines patch to work cd $(pd_src)/src/ && \ - sed 's|^\(#define PD_TEST_VERSION "\).*"|\1$(GIT_VERSION)"|' m_pd.h > \ + sed 's|^\(#define PD_TEST_VERSION "\).*"|\1$(PD_BUILD_VERSION)"|' m_pd.h > \ m_pd.h.tmp && mv m_pd.h.tmp m_pd.h @echo " " @echo "patching completed." @@ -570,7 +570,7 @@ unpatch_pd_devel: # change the version number back to the original # this needs the complete_version_defines patch to work cd $(pd_src)/src && \ - sed 's|^\(#define PD_TEST_VERSION ".*\)$(GIT_VERSION)"|\1"|' \ + sed 's|^\(#define PD_TEST_VERSION ".*\)$(PD_BUILD_VERSION)"|\1"|' \ m_pd.h > m_pd.h.tmp && \ mv m_pd.h.tmp m_pd.h # apply all platform-specific patches @@ -617,7 +617,7 @@ distclean: cruft_clean test_locations: @echo "PD_VERSION: $(PD_VERSION)" - @echo "GIT_VERSION: $(GIT_VERSION)" + @echo "PD_BUILD_VERSION: $(PD_BUILD_VERSION)" @echo "CWD $(CWD)" @echo "DESTDIR $(DESTDIR)" @echo "PREFIX $(prefix)" diff --git a/packages/Makefile.buildlayout b/packages/Makefile.buildlayout index 2aa13174c205f535d511cf9c3e0d56153f30d7e6..496ed7eb719bcb9cc94efba0e640ff7037f1d295 100644 --- a/packages/Makefile.buildlayout +++ b/packages/Makefile.buildlayout @@ -168,52 +168,40 @@ installdirs: $(DESTDIR) $(bindir) $(examplesdir) $(pddocdir) $(includedir) $(hel #==============================================================================# -# AG: "Abandon hope all ye who enter here." Past this point lies madness. Most -# of Pd's version information is kept in m_pd.h, but some of it needs to be -# generated at build time to keep in sync with git sources. Since we don't -# want to have files in the repo which get updated with every build, we use a -# template m_pd.h.in for m_pd.h instead. The stable version parts (only -# updated by editing m_pd.h.in manually) can be read from there. - -PD_MAJOR_VERSION := $(shell grep PD_MAJOR_VERSION $(pd_src)/src/m_pd.h.in | \ +PD_MAJOR_VERSION := $(shell grep PD_MAJOR_VERSION $(pd_src)/src/m_pd.h | \ sed 's|^.define *PD_MAJOR_VERSION *\([0-9]*\).*|\1|' ) -PD_MINOR_VERSION := $(shell grep PD_MINOR_VERSION $(pd_src)/src/m_pd.h.in | \ +PD_MINOR_VERSION := $(shell grep PD_MINOR_VERSION $(pd_src)/src/m_pd.h | \ sed 's|^.define *PD_MINOR_VERSION *\([0-9]*\).*|\1|' ) -PD_BUGFIX_VERSION := $(shell grep PD_BUGFIX_VERSION $(pd_src)/src/m_pd.h.in | \ +PD_BUGFIX_VERSION := $(shell grep PD_BUGFIX_VERSION $(pd_src)/src/m_pd.h | \ sed 's|^.define *PD_BUGFIX_VERSION *\([0-9]*\).*|\1|' ) -#PD_TEST_VERSION := $(shell grep PD_TEST_VERSION $(pd_src)/src/m_pd.h | \ -# sed 's|^.define *PD_TEST_VERSION *"\(.*\)".*|\1|' ) +PD_TEST_VERSION := $(shell grep PD_TEST_VERSION $(pd_src)/src/m_pd.h | \ + sed 's|^.define *PD_TEST_VERSION *"\(.*\)".*|\1|' ) #PD_VERSION = $(PD_MAJOR_VERSION).$(PD_MINOR_VERSION).$(PD_BUGFIX_VERSION) #ifneq ($(PD_TEST_VERSION),) # PD_VERSION := $(PD_VERSION)-$(PD_TEST_VERSION) #endif # AG: Pd-l2ork version number. This becomes part of the PD_VERSION. -# It comes from the m_pd.h.in file and will be something like 1.x for +# It comes from the m_pd.h file and will be something like 1.x for # "classic" Pd-l2ork and 2.x for the new nw.js version. -PD_L2ORK_VERSION := $(shell grep PD_L2ORK_VERSION $(pd_src)/src/m_pd.h.in | \ +PD_L2ORK_VERSION := $(shell grep PD_L2ORK_VERSION $(pd_src)/src/m_pd.h | \ sed 's|^.define *PD_L2ORK_VERSION *"\(.*\)".*|\1|' ) -# AG: version number based on the actual git revision and date. We use this -# both for the PD_TEST_VERSION and for the package name and accompanying +# AG: build version number based on the actual git revision and date. This is +# substituted into s_stuff.h (rather than m_pd.h which we really don't want to +# touch) so that it's available in the source. We use this in lieu of of +# PD_TEST_VERSION for -version and for the package name and accompanying # materials (ReadMe files and such). Note that this will only work when # building directly from a clone of the git repo, and of course you'll need to # have git installed. -GIT_VERSION := $(shell git log -1 --format=%cd --date=short | sed -e 's/-//g')-rev.$(shell git rev-parse --short HEAD) - -# AG: Untangle the hall of mirrors that is PD_TEST_VERSION. m_pd.h won't exist -# or will at least be outdated when the build starts, so we can't simply read -# it from there. Since we always use the package version (git revision and -# date, see GIT_VERSION below), we just set it directly instead. - -PD_TEST_VERSION := $(GIT_VERSION) +PD_BUILD_VERSION := $(shell git log -1 --format=%cd --date=short | sed -e 's/-//g')-rev.$(shell git rev-parse --short HEAD) # AG: This is being used for the package name and accompanying materials. For # Pd-l2ork the vanilla Pd version numbers are rather meaningless (they are # mainly kept around so that 3rd party externals and abstractions know what # iteration of the vanilla API they have available). Instead, we use a version -# number derived from PD_L2ORK_VERSION and PD_TEST_VERSION. -PD_VERSION := $(PD_L2ORK_VERSION)-$(PD_TEST_VERSION) +# number derived from PD_L2ORK_VERSION and PD_BUILD_VERSION. +PD_VERSION := $(PD_L2ORK_VERSION)-$(PD_BUILD_VERSION) VERSION_DATE := $(shell date +%Y%m%d) diff --git a/packages/darwin_app/Makefile b/packages/darwin_app/Makefile index ee3e1323cf30f88367c5eff1ddd6df0a76b13e5d..fb0f951dcc618cd0371e477f66b325d6145a8d33 100644 --- a/packages/darwin_app/Makefile +++ b/packages/darwin_app/Makefile @@ -286,7 +286,7 @@ test_locations: @echo "OPT_CFLAGS: $(OPT_CFLAGS)" @echo "PD_VERSION: $(PD_VERSION)" @echo "PACKAGE_NAME: $(PACKAGE_NAME)" - @echo "PD-EXTENDED_VERSION: $(PD-EXTENDED_VERSION)" + @echo "PD_BUILD_VERSION: $(PD_BUILD_VERSION)" @echo "CWD $(CWD)" @echo "DESTDIR $(DESTDIR)" @echo "PREFIX $(prefix)" diff --git a/packages/linux_make/Makefile b/packages/linux_make/Makefile index 44d52cb89886c55354c716728b8e665ef7ca4912..5b9cf1ff67bec595d1d8f0d9f28d6ee576836346 100644 --- a/packages/linux_make/Makefile +++ b/packages/linux_make/Makefile @@ -264,7 +264,7 @@ test_locations: @echo -------------------------------------------------- @echo "PD_VERSION: $(PD_VERSION)" @echo "DEB_PD_VERSION: $(DEB_PD_VERSION)" - @echo "PD-EXTENDED_VERSION: $(PD-EXTENDED_VERSION)" + @echo "PD_BUILD_VERSION: $(PD_BUILD_VERSION)" @echo "CWD $(CWD)" @echo "DESTDIR $(DESTDIR)" @echo "PACKAGE_TYPE $(PACKAGE_TYPE)" diff --git a/packages/win32_inno/Makefile b/packages/win32_inno/Makefile index 7080d93b2242a63d431e2de63150e9d3bc91161f..9ee533f5b9b6e6fe948d68d61831e444b6691fb5 100755 --- a/packages/win32_inno/Makefile +++ b/packages/win32_inno/Makefile @@ -145,7 +145,7 @@ $(PD_INNO_SETUP): $(PD_INNO_SETUP).in cat "$(PD_INNO_SETUP).in" | \ sed 's/PACKAGE_NAME/$(PACKAGE_NAME)/g' | \ sed 's/PD_VERSION/$(PD_VERSION)/g' | \ - sed 's/GIT_VERSION/$(GIT_VERSION)/g' > \ + sed 's/PD_BUILD_VERSION/$(PD_BUILD_VERSION)/g' > \ $(PD_INNO_SETUP) # start $(PD_INNO_SETUP) @@ -182,7 +182,7 @@ test_package: test_locations: @echo -------------------------------------------------- @echo "PD_VERSION: $(PD_VERSION)" - @echo "GIT_VERSION: $(GIT_VERSION)" + @echo "PD_BUILD_VERSION: $(PD_BUILD_VERSION)" @echo "CWD $(CWD)" @echo "DESTDIR $(DESTDIR)" @echo "PREFIX $(prefix)" diff --git a/pd/src/import.c b/pd/src/import.c index 886a8092264b2c509e9c76ad937abca48da2e153..039dce878b1909b550028799a79832141d2f12a1 100644 --- a/pd/src/import.c +++ b/pd/src/import.c @@ -174,5 +174,5 @@ void import_setup(void) //post("\tcompiled against Pd version %d.%d.%d", PD_MAJOR_VERSION, // PD_MINOR_VERSION, PD_BUGFIX_VERSION); post("\tcompiled against Pd-l2ork version %s (%s)", PD_L2ORK_VERSION, - PD_TEST_VERSION); + PD_BUILD_VERSION); } diff --git a/pd/src/m_pd.h.in b/pd/src/m_pd.h similarity index 99% rename from pd/src/m_pd.h.in rename to pd/src/m_pd.h index 58861f5a94d459545393c07c8a12d7563be7f5bc..4cb8aa87a10482e6a6c6fbb54e8b75b03242098b 100644 --- a/pd/src/m_pd.h.in +++ b/pd/src/m_pd.h @@ -13,7 +13,7 @@ extern "C" { #define PD_MAJOR_VERSION 0 #define PD_MINOR_VERSION 43 #define PD_BUGFIX_VERSION 10 -#define PD_TEST_VERSION "date/revision goes here" +#define PD_TEST_VERSION "" #define PD_L2ORK_VERSION "1.99" #define PDL2ORK extern int pd_compatibilitylevel; /* e.g., 43 for pd 0.43 compatibility */ diff --git a/pd/src/makefile.in b/pd/src/makefile.in index 79ca85d1070c4f9856a972db526262f5ac288429..70318c4f560fae880a2e2be55d7b4a2a65caaa57 100644 --- a/pd/src/makefile.in +++ b/pd/src/makefile.in @@ -98,8 +98,10 @@ ifneq ($(PD_TEST_VERSION),) PD_VERSION := $(PD_VERSION)-$(PD_TEST_VERSION) endif # AG: Pd-l2ork version number -PD_L2ORK_VERSION := $(shell grep PD_L2ORK_VERSION m_pd.h.in | \ +PD_L2ORK_VERSION := $(shell grep PD_L2ORK_VERSION m_pd.h | \ sed 's|^.define *PD_L2ORK_VERSION *"\(.*\)".*|\1|' ) +PD_BUILD_VERSION := $(shell grep PD_BUILD_VERSION s_stuff.h | \ + sed 's|^.define *PD_BUILD_VERSION *"\(.*\)".*|\1|' ) # # ------------------ targets ------------------------------------ @@ -203,7 +205,7 @@ install: all $(DESTDIR)$(pddocdir)/7.stuff/$$dir ; \ done mv $(ABOUT_FILE) $(ABOUT_FILE).tmp - cat $(ABOUT_FILE).tmp | sed 's|PD_VERSION|Pd-l2ork version $(PD_L2ORK_VERSION) ($(PD_TEST_VERSION))|' \ + cat $(ABOUT_FILE).tmp | sed 's|PD_VERSION|Pd-l2ork version $(PD_L2ORK_VERSION) ($(PD_BUILD_VERSION))|' \ > $(ABOUT_FILE) rm $(ABOUT_FILE).tmp rsync -ax --exclude=.git --exclude=.svn ../extra $(DESTDIR)$(libpddir)/ diff --git a/pd/src/s_main.c b/pd/src/s_main.c index b17e30cdb9963c72c1920b6275c7c2de6e4dc816..91ae1cfe4582aa1f1bbf2b7d62e8f2dafffe3e66 100644 --- a/pd/src/s_main.c +++ b/pd/src/s_main.c @@ -255,7 +255,7 @@ static void pd_makeversion(void) // PD_BUGFIX_VERSION, PD_TEST_VERSION); snprintf(foo, sizeof(foo), "Pd-L2Ork version %s (%s)\n", PD_L2ORK_VERSION, - PD_TEST_VERSION); + PD_BUILD_VERSION); pd_version = strdup(foo); } diff --git a/pd/src/s_stuff.h b/pd/src/s_stuff.h.in similarity index 97% rename from pd/src/s_stuff.h rename to pd/src/s_stuff.h.in index 107b3b809d5838f7cea38859de86365f86bc77a9..a5b72e89aaa8b8ac2ff2cbdb43df9dc0655d9a0b 100644 --- a/pd/src/s_stuff.h +++ b/pd/src/s_stuff.h.in @@ -10,6 +10,12 @@ in future releases. The public (stable) API is in m_pd.h. */ #ifndef __s_stuff_h_ #define __s_stuff_h_ +// AG: Generated build version number. Pd-l2ork uses this in lieu of vanilla's +// PD_TEST_VERSION. We wouldn't want to touch m_pd.h for this, so it's part of +// the internal API. Also note that this value gets substituted automatically +// at build time, so any manual edits will be lost. +#define PD_BUILD_VERSION "<build version>" + /* in s_path.c */ typedef struct _namelist /* element in a linked list of stored strings */