Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

autoconf based build system #287

Merged
merged 20 commits into from
Apr 17, 2019
Merged

autoconf based build system #287

merged 20 commits into from
Apr 17, 2019

Conversation

norbusan
Copy link
Collaborator

@norbusan norbusan commented Dec 17, 2018

Convert the build system to autoconf (without automake). By dropping the (anyway nearly superfluous) automake dependency the build errors should be gone, and the Makefile is much more readable and close to the current status. This is an updated and improved version of #284

Release management:

  • update the version number in configure.ac
  • run autoconf : this will generate configure, onedrive.1, pacman/PKGBUILD, spec/onedrive.spec (these are all files in the git repo and thus need to be updated)
  • tag a release

This way, new releases can be used as downloaded from the auto-generated release packages at github.

Currently supported features/items (no change concerning the previous pull request)

  • D compiler is searched for automatically from dmd and ldmd2 (in this order)
  • DCFLAGS default to -w -g -O but can be overridden via env variables
  • SQLite and Curl is searched for via pkg-config, libs are automatically generated
  • enabling notifications can be done with --enable-notifications, which searches automatically for libnotify using pkg-config
  • systemd units are installed when the systemd system/user unit dir variable is found. These are again checked with pkg-config --variable=systemdsystemunitdir systemd etc.
  • if pkg-config is not available, one can use curl_LIBS and sqlite_LIBS to pass in the necessary libs, same for notify_LIBS
  • systemd service installation can be disabled by --with-systemdsystemunitdir=no or --with-systemduserunitdir=no
  • the following files are automaically generated with version numbers replaces pacman/PKGBUILD and spec/onedrive.spec, and the version number in the man page is also automatically replaced
  • The version file is now generated from the program version if no .git directory is found

Features from the current Makefile not carried over:

  • RedHat specific stuff, should be automatically done now via the pkg-config calls

Incomplete items

  • conversion of the pacman and spec file to use configure instead of the makefile directly (sorry, no experience with rpm/pacman)

@norbusan norbusan force-pushed the norbert/autoconf-new branch 4 times, most recently from 6d33a5a to 46f1119 Compare December 17, 2018 13:34
@abraunegg abraunegg added this to the 2.3.0 milestone Dec 18, 2018
@norbusan norbusan changed the title autoconf based build system WIP: autoconf based build system Mar 12, 2019
@norbusan norbusan changed the title WIP: autoconf based build system autoconf based build system Mar 12, 2019
@abraunegg abraunegg modified the milestones: 2.3.0, 2.3.1 Mar 21, 2019
@abraunegg
Copy link
Owner

@norbusan
Conflicts need resolving

@norbusan
Copy link
Collaborator Author

I am working on updating this branch for the current sources, I am not overly happy anyway with autoconf ;-)

@abraunegg abraunegg modified the milestones: 2.3.1, 2.3.2 Mar 25, 2019
@norbusan
Copy link
Collaborator Author

@abraunegg can we decide for either autoconf or meson/ninja, so that I don't have to update both? The meson/ninja would leave the current Makefile as is, and allow for two ways of building, either directly using make or using meson. The autoconf branch would drop the Makefile completely and require the ./configure ; make incantation.

What do you prefer?

@abraunegg
Copy link
Owner

@abraunegg can we decide for either autoconf or meson/ninja, so that I don't have to update both? The meson/ninja would leave the current Makefile as is, and allow for two ways of building, either directly using make or using meson. The autoconf branch would drop the Makefile completely and require the ./configure ; make incantation.

What do you prefer?

Having mainly always used ./configure myself in most of the source packages I have recompiled over the years, I probably lean more towards ./configure. The main aim of this work was to try and overcome the situations where the dependant libraries are not present, or even detect if DMD is installed or even active.

@norbusan
Copy link
Collaborator Author

Having mainly always used ./configure myself in most of the source packages I have recompiled over the years, I probably lean more towards ./configure. The main aim of this work was to try and overcome the situations where the dependant libraries are not present, or even detect if DMD is installed or even active.

Ok, I will update the PR according to the current master, lots of changes have happened ;-)

abraunegg
abraunegg previously approved these changes Apr 14, 2019
@abraunegg
Copy link
Owner

@norbusan
Whilst approved, I think this should be a v2.4.0 item as the configuration aspect (make clean; make PKGCONFIG=0 NOTIFICATIONS=0;) is changed ... thoughts?

If you are OK with this being in v2.3.3 then this is good to merge

@norbusan
Copy link
Collaborator Author

Fine with me waiting for 2.4.0. Let us release 2.3.3 at some point with the current fixes, and then merge 2.4.0 in the next run.

@abraunegg abraunegg modified the milestones: v2.3.3, v2.4.0 Apr 15, 2019
@norbusan
Copy link
Collaborator Author

@abraunegg Do we merge this now, or do you plan some other release before 3.4?

@abraunegg
Copy link
Owner

@norbusan
I dont see any issue in merging this into 'master' now, or maybe wait ~24hrs + then do the merge and a v2.4.0 release right away .. what are your thoughts?

@norbusan
Copy link
Collaborator Author

Fine with wating for some emergencies! Let's wait till tomorrow. Please approve now or later, when it is convenient for you (merged master)

@abraunegg abraunegg merged commit c8e47a4 into master Apr 17, 2019
@norbusan norbusan deleted the norbert/autoconf-new branch April 17, 2019 01:07
@norbusan
Copy link
Collaborator Author

Thanks

abraunegg added a commit that referenced this pull request Apr 23, 2019
* Update default Makefile with systemd service file changes introduced by #287. Now when not using ./configure before make, onedrive service files get correctly updated replacing @Prefix@ with PREFIX= entry
abraunegg added a commit that referenced this pull request Apr 23, 2019
* Update default Makefile with systemd service file changes introduced by #287 when not calling ./configure
@lock
Copy link

lock bot commented May 17, 2019

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@lock lock bot locked and limited conversation to collaborators May 17, 2019
@abraunegg abraunegg modified the milestones: v2.4.0, v2.3.3, v2.3.5, v2.3.4 Aug 6, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants