Skip to content

Fix build by removing auto generated files#75

Closed
kopasiak wants to merge 1 commit into
hyperrealm:masterfrom
kopasiak:remove_auto_gen_files
Closed

Fix build by removing auto generated files#75
kopasiak wants to merge 1 commit into
hyperrealm:masterfrom
kopasiak:remove_auto_gen_files

Conversation

@kopasiak
Copy link
Copy Markdown

Remove auto generated files to prevent build failures.
Everything can be build using:

$ autoreconf -i
$ ./cofigure
$ make

This fixes issues: #66 #61 #53

Files generated by flex or autotools should not be stored
inside repository. This may lead to compilation errors
as reported by a few users.

Signed-off-by: Krzysztof Opasiak <k.opasiak@samsung.com>
@rdebath
Copy link
Copy Markdown

rdebath commented Jun 18, 2017

Removing the auto**** generated files from a VCS is usually a real pain if you just want to build it; eg: for testing on your unusual setup. You end up having to hunt down the exact version of auto**** that the input files were written for because auto****'s upgradability is so poor. I would suggest a better solution is to keep the generated files in the repository in such a way that

  • They are NOT normally regenerated
  • If they get regenerated they will normally be reverted on a make distclean ; make
  • They can be regenerated and saved with a supplied script. (If your auto**** doesn't error)

Note the last one MUST generate then save so that when the version of auto**** is too different the (probably) working scripts are not deleted.

BTW: This isn't a dig against the scripts that auto**** generates they are normally very, very, portable it's just that those are what you're supposed to run on the varied target machines, not autoreconf, the autoreconf program is supposed to be run only on the main developer's machine. This seems to be because according to the auto**** folks github isn't a distribution method, after all auto****'s method of operation was basically 'set in stone' back in the days when you built zip files of your source and uploaded them to FTP sites.

As for the scanner.c that should be done in a similar way, except it should normally be regenerated UNLESS the regeneration tool isn't available. In which case the "here's one I made earlier" would be trotted out.

Edit: distclean not clean

@hyperrealm
Copy link
Copy Markdown
Owner

I'm OK with removing these files from the repo.

I've already removed the scanner.[ch] and grammar.[ch], however the problem with those is that Windows developers will have no way to regenerate these files, because the Visual Studio solution doesn't have rules to regenerate them with flex and bison, the assumption being that the typical Windows developer wouldn't have these tools installed. So I may end up putting those files back in.

@hyperrealm
Copy link
Copy Markdown
Owner

All the autotools files are removed, but I left the flex- and bison- generated files in the repo, for the benefit of Windows developers. It isn't a problem to have these in the repo as long as we ensure that they are kept up to date with respect to the .l and .y files.

@hyperrealm hyperrealm closed this Oct 29, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants